[brcm63xx] add WPS button support for nb4 boards
authorRaphaël Huck <rhk@cksum.org>
Thu, 29 Apr 2010 12:51:41 +0000 (12:51 +0000)
committerRaphaël Huck <rhk@cksum.org>
Thu, 29 Apr 2010 12:51:41 +0000 (12:51 +0000)
SVN-Revision: 21254

target/linux/brcm63xx/patches-2.6.32/100-reset_buttons.patch
target/linux/brcm63xx/patches-2.6.32/200-extended-platform-devices.patch
target/linux/brcm63xx/patches-2.6.32/221-board-NB4.patch
target/linux/brcm63xx/patches-2.6.33/100-reset_buttons.patch
target/linux/brcm63xx/patches-2.6.33/200-extended-platform-devices.patch
target/linux/brcm63xx/patches-2.6.33/221-board-NB4.patch

index 7b8501e9e4a3e285f38e2c00d84065620a92741e..45f506bb75415bcf2d45c1d01b170f9bd5318a57 100644 (file)
@@ -93,7 +93,7 @@
        struct gpio_led leds[5];
 +
 +      /* Reset button */
-+      struct gpio_button reset_buttons[1];
++      struct gpio_button reset_buttons[2];
  };
  
  #endif /* ! BOARD_BCM963XX_H_ */
index 170b55916decdba0c0be8788eafda58f08325cd1..aec85a3d172209655a1aa49dec12507e78dc9265 100644 (file)
@@ -1,6 +1,6 @@
 --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
 +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -995,6 +995,10 @@ int __init board_register_devices(void)
+@@ -1000,6 +1000,10 @@ int __init board_register_devices(void)
                platform_device_register(&bcm63xx_gpio_buttons_device);
        }
  
@@ -16,7 +16,7 @@
 @@ -59,6 +59,10 @@ struct board_info {
  
        /* Reset button */
-       struct gpio_button reset_buttons[1];
+       struct gpio_button reset_buttons[2];
 +
 +      /* Additional platform devices */
 +      struct platform_device **devs;
index 57ce7fc8d90f21ff88badb239b97ee8b2eee4c0a..bbd0c62e70b74c660dd38a675b4b38e0b69f7bd4 100644 (file)
@@ -21,7 +21,7 @@
  static struct bcm963xx_nvram nvram;
  static unsigned int mac_addr_used;
  static struct board_info board;
-@@ -713,6 +720,441 @@ static struct board_info __initdata boar
+@@ -713,6 +720,471 @@ static struct board_info __initdata boar
  
        .has_ohci0 = 1,
  };
 +              {
 +                      .desc           = "reset",
 +                      .gpio           = 34,
-+                      .active_low     = 1,
 +                      .type           = EV_KEY,
 +                      .code           = KEY_RESTART,
 +                      .threshold      = 3,
 +              },
++              {
++                      .desc           = "wps",
++                      .gpio           = 37,
++                      .type           = EV_KEY,
++                      .code           = KEY_WPS_BUTTON,
++                      .threshold      = 3,
++              },
 +      },
 +      .devs = neufbox4_devices,
 +      .num_devs = ARRAY_SIZE(neufbox4_devices),
 +              {
 +                      .desc           = "reset",
 +                      .gpio           = 34,
-+                      .active_low     = 1,
 +                      .type           = EV_KEY,
 +                      .code           = KEY_RESTART,
 +                      .threshold      = 3,
 +              },
++              {
++                      .desc           = "wps",
++                      .gpio           = 37,
++                      .type           = EV_KEY,
++                      .code           = KEY_WPS_BUTTON,
++                      .threshold      = 3,
++              },
 +      },
 +      .devs = neufbox4_devices,
 +      .num_devs = ARRAY_SIZE(neufbox4_devices),
 +              {
 +                      .desc           = "reset",
 +                      .gpio           = 34,
-+                      .active_low     = 1,
 +                      .type           = EV_KEY,
 +                      .code           = KEY_RESTART,
 +                      .threshold      = 3,
 +              },
++              {
++                      .desc           = "wps",
++                      .gpio           = 37,
++                      .type           = EV_KEY,
++                      .code           = KEY_WPS_BUTTON,
++                      .threshold      = 3,
++              },
 +      },
 +      .devs = neufbox4_devices,
 +      .num_devs = ARRAY_SIZE(neufbox4_devices),
 +              {
 +                      .desc           = "reset",
 +                      .gpio           = 34,
-+                      .active_low     = 1,
 +                      .type           = EV_KEY,
 +                      .code           = KEY_RESTART,
 +                      .threshold      = 3,
 +              },
++              {
++                      .desc           = "wps",
++                      .gpio           = 37,
++                      .type           = EV_KEY,
++                      .code           = KEY_WPS_BUTTON,
++                      .threshold      = 3,
++              },
 +      },
 +      .devs = neufbox4_devices,
 +      .num_devs = ARRAY_SIZE(neufbox4_devices),
 +              {
 +                      .desc           = "reset",
 +                      .gpio           = 34,
-+                      .active_low     = 1,
 +                      .type           = EV_KEY,
 +                      .code           = KEY_RESTART,
 +                      .threshold      = 3,
 +              },
++              {
++                      .desc           = "wps",
++                      .gpio           = 37,
++                      .type           = EV_KEY,
++                      .code           = KEY_WPS_BUTTON,
++                      .threshold      = 3,
++              },
 +      },
 +      .devs = neufbox4_devices,
 +      .num_devs = ARRAY_SIZE(neufbox4_devices),
  #endif
  
  /*
-@@ -743,9 +1185,30 @@ static const struct board_info __initdat
+@@ -743,9 +1215,30 @@ static const struct board_info __initdat
        &board_96358vw2,
        &board_AGPFS0,
        &board_DWVS0,
  /*
   * early init callback, read nvram data from flash and checksum it
   */
-@@ -793,6 +1256,9 @@ void __init board_prom_init(void)
+@@ -793,6 +1286,9 @@ void __init board_prom_init(void)
                return;
        }
  
 +      struct gpio_led leds[9];
  
        /* Reset button */
-       struct gpio_button reset_buttons[1];
+       struct gpio_button reset_buttons[2];
index 02b4149ddd2bdeead899606f79b98ddc5ee1a3cc..aa5264d8459d023d4056d8a601ca41210bdf3681 100644 (file)
@@ -93,7 +93,7 @@
        struct gpio_led leds[5];
 +
 +      /* Reset button */
-+      struct gpio_button reset_buttons[1];
++      struct gpio_button reset_buttons[2];
  };
  
  #endif /* ! BOARD_BCM963XX_H_ */
index 170b55916decdba0c0be8788eafda58f08325cd1..aec85a3d172209655a1aa49dec12507e78dc9265 100644 (file)
@@ -1,6 +1,6 @@
 --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
 +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -995,6 +995,10 @@ int __init board_register_devices(void)
+@@ -1000,6 +1000,10 @@ int __init board_register_devices(void)
                platform_device_register(&bcm63xx_gpio_buttons_device);
        }
  
@@ -16,7 +16,7 @@
 @@ -59,6 +59,10 @@ struct board_info {
  
        /* Reset button */
-       struct gpio_button reset_buttons[1];
+       struct gpio_button reset_buttons[2];
 +
 +      /* Additional platform devices */
 +      struct platform_device **devs;
index 57ce7fc8d90f21ff88badb239b97ee8b2eee4c0a..bbd0c62e70b74c660dd38a675b4b38e0b69f7bd4 100644 (file)
@@ -21,7 +21,7 @@
  static struct bcm963xx_nvram nvram;
  static unsigned int mac_addr_used;
  static struct board_info board;
-@@ -713,6 +720,441 @@ static struct board_info __initdata boar
+@@ -713,6 +720,471 @@ static struct board_info __initdata boar
  
        .has_ohci0 = 1,
  };
 +              {
 +                      .desc           = "reset",
 +                      .gpio           = 34,
-+                      .active_low     = 1,
 +                      .type           = EV_KEY,
 +                      .code           = KEY_RESTART,
 +                      .threshold      = 3,
 +              },
++              {
++                      .desc           = "wps",
++                      .gpio           = 37,
++                      .type           = EV_KEY,
++                      .code           = KEY_WPS_BUTTON,
++                      .threshold      = 3,
++              },
 +      },
 +      .devs = neufbox4_devices,
 +      .num_devs = ARRAY_SIZE(neufbox4_devices),
 +              {
 +                      .desc           = "reset",
 +                      .gpio           = 34,
-+                      .active_low     = 1,
 +                      .type           = EV_KEY,
 +                      .code           = KEY_RESTART,
 +                      .threshold      = 3,
 +              },
++              {
++                      .desc           = "wps",
++                      .gpio           = 37,
++                      .type           = EV_KEY,
++                      .code           = KEY_WPS_BUTTON,
++                      .threshold      = 3,
++              },
 +      },
 +      .devs = neufbox4_devices,
 +      .num_devs = ARRAY_SIZE(neufbox4_devices),
 +              {
 +                      .desc           = "reset",
 +                      .gpio           = 34,
-+                      .active_low     = 1,
 +                      .type           = EV_KEY,
 +                      .code           = KEY_RESTART,
 +                      .threshold      = 3,
 +              },
++              {
++                      .desc           = "wps",
++                      .gpio           = 37,
++                      .type           = EV_KEY,
++                      .code           = KEY_WPS_BUTTON,
++                      .threshold      = 3,
++              },
 +      },
 +      .devs = neufbox4_devices,
 +      .num_devs = ARRAY_SIZE(neufbox4_devices),
 +              {
 +                      .desc           = "reset",
 +                      .gpio           = 34,
-+                      .active_low     = 1,
 +                      .type           = EV_KEY,
 +                      .code           = KEY_RESTART,
 +                      .threshold      = 3,
 +              },
++              {
++                      .desc           = "wps",
++                      .gpio           = 37,
++                      .type           = EV_KEY,
++                      .code           = KEY_WPS_BUTTON,
++                      .threshold      = 3,
++              },
 +      },
 +      .devs = neufbox4_devices,
 +      .num_devs = ARRAY_SIZE(neufbox4_devices),
 +              {
 +                      .desc           = "reset",
 +                      .gpio           = 34,
-+                      .active_low     = 1,
 +                      .type           = EV_KEY,
 +                      .code           = KEY_RESTART,
 +                      .threshold      = 3,
 +              },
++              {
++                      .desc           = "wps",
++                      .gpio           = 37,
++                      .type           = EV_KEY,
++                      .code           = KEY_WPS_BUTTON,
++                      .threshold      = 3,
++              },
 +      },
 +      .devs = neufbox4_devices,
 +      .num_devs = ARRAY_SIZE(neufbox4_devices),
  #endif
  
  /*
-@@ -743,9 +1185,30 @@ static const struct board_info __initdat
+@@ -743,9 +1215,30 @@ static const struct board_info __initdat
        &board_96358vw2,
        &board_AGPFS0,
        &board_DWVS0,
  /*
   * early init callback, read nvram data from flash and checksum it
   */
-@@ -793,6 +1256,9 @@ void __init board_prom_init(void)
+@@ -793,6 +1286,9 @@ void __init board_prom_init(void)
                return;
        }
  
 +      struct gpio_led leds[9];
  
        /* Reset button */
-       struct gpio_button reset_buttons[1];
+       struct gpio_button reset_buttons[2];