ar71xx: remove the fifo cfg overrides for the ap91 ethernet code - these values have...
[openwrt.git] / target / linux / brcm63xx / patches-2.6.32 / 100-reset_buttons.patch
index 8c9bcc6..d96ab7a 100644 (file)
                        .active_low     = 1,
                },
        },
                        .active_low     = 1,
                },
        },
-+      .reset_buttons = {
++      .buttons = {
 +              {
 +                      .desc           = "reset",
 +                      .gpio           = 32,
 +                      .active_low     = 1,
 +                      .type           = EV_KEY,
 +              {
 +                      .desc           = "reset",
 +                      .gpio           = 32,
 +                      .active_low     = 1,
 +                      .type           = EV_KEY,
-+                      .code           = BTN_0,
++                      .code           = KEY_RESTART,
 +                      .threshold      = 3,
 +              },
 +      },
 +                      .threshold      = 3,
 +              },
 +      },
                        .active_low     = 1,
                },
        },
                        .active_low     = 1,
                },
        },
-+      .reset_buttons = {
++      .buttons = {
 +              {
 +                      .desc           = "reset",
 +                      .gpio           = 36,
 +                      .active_low     = 1,
 +                      .type           = EV_KEY,
 +              {
 +                      .desc           = "reset",
 +                      .gpio           = 36,
 +                      .active_low     = 1,
 +                      .type           = EV_KEY,
-+                      .code           = BTN_0,
++                      .code           = KEY_RESTART,
 +                      .threshold      = 3,
 +              },
 +      },
  };
  
  static struct board_info __initdata board_FAST2404 = {
 +                      .threshold      = 3,
 +              },
 +      },
  };
  
  static struct board_info __initdata board_FAST2404 = {
-@@ -771,6 +793,16 @@ static struct platform_device bcm63xx_gp
+@@ -771,12 +793,23 @@ static struct platform_device bcm63xx_gp
        .dev.platform_data      = &bcm63xx_led_data,
  };
  
        .dev.platform_data      = &bcm63xx_led_data,
  };
  
  /*
   * third stage init callback, register all board devices.
   */
  /*
   * third stage init callback, register all board devices.
   */
-@@ -826,6 +858,13 @@ int __init board_register_devices(void)
+ int __init board_register_devices(void)
+ {
+       u32 val;
++      int button_count = 0;
+       if (board.has_pccard)
+               bcm63xx_pcmcia_register();
+@@ -826,6 +859,17 @@ int __init board_register_devices(void)
  
        platform_device_register(&bcm63xx_gpio_leds);
  
  
        platform_device_register(&bcm63xx_gpio_leds);
  
-+      if (board.reset_buttons) {
-+              bcm63xx_gpio_buttons_data.nbuttons = ARRAY_SIZE(board.reset_buttons);
-+              bcm63xx_gpio_buttons_data.buttons = board.reset_buttons;
++      /* count number of BUTTONs defined by this device */
++      while (button_count < ARRAY_SIZE(board.buttons) && board.buttons[button_count].desc)
++              button_count++;
++
++      if (button_count) {
++              bcm63xx_gpio_buttons_data.nbuttons = button_count;
++              bcm63xx_gpio_buttons_data.buttons = board.buttons;
 +
 +              platform_device_register(&bcm63xx_gpio_buttons_device);
 +      }
 +
 +              platform_device_register(&bcm63xx_gpio_buttons_device);
 +      }
@@ -81,8 +92,8 @@
        /* GPIO LEDs */
        struct gpio_led leds[5];
 +
        /* GPIO LEDs */
        struct gpio_led leds[5];
 +
-+      /* Reset button */
-+      struct gpio_button reset_buttons[1];
++      /* Buttons */
++      struct gpio_button buttons[2];
  };
  
  #endif /* ! BOARD_BCM963XX_H_ */
  };
  
  #endif /* ! BOARD_BCM963XX_H_ */
This page took 0.024329 seconds and 4 git commands to generate.