[brcm63xx] rename reset_buttons to buttons

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21255 3c298f89-4303-0410-b956-a3cf2f4a3e73
master
Raphaël HUCK 2010-04-29 12:54:24 +00:00
parent bcca3791ea
commit ea459f4e40
10 changed files with 36 additions and 36 deletions

View File

@ -13,7 +13,7 @@
.active_low = 1, .active_low = 1,
}, },
}, },
+ .reset_buttons = { + .buttons = {
+ { + {
+ .desc = "reset", + .desc = "reset",
+ .gpio = 32, + .gpio = 32,
@ -30,7 +30,7 @@
.active_low = 1, .active_low = 1,
}, },
}, },
+ .reset_buttons = { + .buttons = {
+ { + {
+ .desc = "reset", + .desc = "reset",
+ .gpio = 36, + .gpio = 36,
@ -72,12 +72,12 @@
platform_device_register(&bcm63xx_gpio_leds); platform_device_register(&bcm63xx_gpio_leds);
+ /* count number of BUTTONs defined by this device */ + /* count number of BUTTONs defined by this device */
+ while (button_count < ARRAY_SIZE(board.reset_buttons) && board.reset_buttons[button_count].desc) + while (button_count < ARRAY_SIZE(board.buttons) && board.buttons[button_count].desc)
+ button_count++; + button_count++;
+ +
+ if (button_count) { + if (button_count) {
+ bcm63xx_gpio_buttons_data.nbuttons = button_count; + bcm63xx_gpio_buttons_data.nbuttons = button_count;
+ bcm63xx_gpio_buttons_data.buttons = board.reset_buttons; + bcm63xx_gpio_buttons_data.buttons = board.buttons;
+ +
+ platform_device_register(&bcm63xx_gpio_buttons_device); + platform_device_register(&bcm63xx_gpio_buttons_device);
+ } + }
@ -92,8 +92,8 @@
/* GPIO LEDs */ /* GPIO LEDs */
struct gpio_led leds[5]; struct gpio_led leds[5];
+ +
+ /* Reset button */ + /* Buttons */
+ struct gpio_button reset_buttons[2]; + struct gpio_button buttons[2];
}; };
#endif /* ! BOARD_BCM963XX_H_ */ #endif /* ! BOARD_BCM963XX_H_ */

View File

@ -78,5 +78,5 @@
- struct gpio_led leds[5]; - struct gpio_led leds[5];
+ struct gpio_led leds[8]; + struct gpio_led leds[8];
/* Reset button */ /* Buttons */
struct gpio_button reset_buttons[1]; struct gpio_button buttons[1];

View File

@ -50,7 +50,7 @@
+ }, + },
+ }, + },
+ +
+ .reset_buttons = { + .buttons = {
+ { + {
+ .desc = "sw2", + .desc = "sw2",
+ .gpio = 37, + .gpio = 37,

View File

@ -15,8 +15,8 @@
+++ b/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h +++ b/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
@@ -59,6 +59,10 @@ struct board_info { @@ -59,6 +59,10 @@ struct board_info {
/* Reset button */ /* Buttons */
struct gpio_button reset_buttons[2]; struct gpio_button buttons[2];
+ +
+ /* Additional platform devices */ + /* Additional platform devices */
+ struct platform_device **devs; + struct platform_device **devs;

View File

@ -117,7 +117,7 @@
+ .active_low = 1, + .active_low = 1,
+ }, + },
+ }, + },
+ .reset_buttons = { + .buttons = {
+ { + {
+ .desc = "reset", + .desc = "reset",
+ .gpio = 34, + .gpio = 34,
@ -209,7 +209,7 @@
+ .active_low = 1, + .active_low = 1,
+ }, + },
+ }, + },
+ .reset_buttons = { + .buttons = {
+ { + {
+ .desc = "reset", + .desc = "reset",
+ .gpio = 34, + .gpio = 34,
@ -299,7 +299,7 @@
+ .active_low = 1, + .active_low = 1,
+ }, + },
+ }, + },
+ .reset_buttons = { + .buttons = {
+ { + {
+ .desc = "reset", + .desc = "reset",
+ .gpio = 34, + .gpio = 34,
@ -386,7 +386,7 @@
+ .gpio = 4, + .gpio = 4,
+ }, + },
+ }, + },
+ .reset_buttons = { + .buttons = {
+ { + {
+ .desc = "reset", + .desc = "reset",
+ .gpio = 34, + .gpio = 34,
@ -471,7 +471,7 @@
+ .gpio = 4, + .gpio = 4,
+ }, + },
+ }, + },
+ .reset_buttons = { + .buttons = {
+ { + {
+ .desc = "reset", + .desc = "reset",
+ .gpio = 34, + .gpio = 34,
@ -543,5 +543,5 @@
- struct gpio_led leds[8]; - struct gpio_led leds[8];
+ struct gpio_led leds[9]; + struct gpio_led leds[9];
/* Reset button */ /* Buttons */
struct gpio_button reset_buttons[2]; struct gpio_button buttons[2];

View File

@ -13,7 +13,7 @@
.active_low = 1, .active_low = 1,
}, },
}, },
+ .reset_buttons = { + .buttons = {
+ { + {
+ .desc = "reset", + .desc = "reset",
+ .gpio = 32, + .gpio = 32,
@ -30,7 +30,7 @@
.active_low = 1, .active_low = 1,
}, },
}, },
+ .reset_buttons = { + .buttons = {
+ { + {
+ .desc = "reset", + .desc = "reset",
+ .gpio = 36, + .gpio = 36,
@ -72,12 +72,12 @@
platform_device_register(&bcm63xx_gpio_leds); platform_device_register(&bcm63xx_gpio_leds);
+ /* count number of BUTTONs defined by this device */ + /* count number of BUTTONs defined by this device */
+ while (button_count < ARRAY_SIZE(board.reset_buttons) && board.reset_buttons[button_count].desc) + while (button_count < ARRAY_SIZE(board.buttons) && board.buttons[button_count].desc)
+ button_count++; + button_count++;
+ +
+ if (button_count) { + if (button_count) {
+ bcm63xx_gpio_buttons_data.nbuttons = button_count; + bcm63xx_gpio_buttons_data.nbuttons = button_count;
+ bcm63xx_gpio_buttons_data.buttons = board.reset_buttons; + bcm63xx_gpio_buttons_data.buttons = board.buttons;
+ +
+ platform_device_register(&bcm63xx_gpio_buttons_device); + platform_device_register(&bcm63xx_gpio_buttons_device);
+ } + }
@ -92,8 +92,8 @@
/* GPIO LEDs */ /* GPIO LEDs */
struct gpio_led leds[5]; struct gpio_led leds[5];
+ +
+ /* Reset button */ + /* Buttons */
+ struct gpio_button reset_buttons[2]; + struct gpio_button buttons[2];
}; };
#endif /* ! BOARD_BCM963XX_H_ */ #endif /* ! BOARD_BCM963XX_H_ */

View File

@ -78,5 +78,5 @@
- struct gpio_led leds[5]; - struct gpio_led leds[5];
+ struct gpio_led leds[8]; + struct gpio_led leds[8];
/* Reset button */ /* Buttons */
struct gpio_button reset_buttons[1]; struct gpio_button buttons[1];

View File

@ -50,7 +50,7 @@
+ }, + },
+ }, + },
+ +
+ .reset_buttons = { + .buttons = {
+ { + {
+ .desc = "sw2", + .desc = "sw2",
+ .gpio = 37, + .gpio = 37,

View File

@ -15,8 +15,8 @@
+++ b/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h +++ b/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
@@ -59,6 +59,10 @@ struct board_info { @@ -59,6 +59,10 @@ struct board_info {
/* Reset button */ /* Buttons */
struct gpio_button reset_buttons[2]; struct gpio_button buttons[2];
+ +
+ /* Additional platform devices */ + /* Additional platform devices */
+ struct platform_device **devs; + struct platform_device **devs;

View File

@ -117,7 +117,7 @@
+ .active_low = 1, + .active_low = 1,
+ }, + },
+ }, + },
+ .reset_buttons = { + .buttons = {
+ { + {
+ .desc = "reset", + .desc = "reset",
+ .gpio = 34, + .gpio = 34,
@ -209,7 +209,7 @@
+ .active_low = 1, + .active_low = 1,
+ }, + },
+ }, + },
+ .reset_buttons = { + .buttons = {
+ { + {
+ .desc = "reset", + .desc = "reset",
+ .gpio = 34, + .gpio = 34,
@ -299,7 +299,7 @@
+ .active_low = 1, + .active_low = 1,
+ }, + },
+ }, + },
+ .reset_buttons = { + .buttons = {
+ { + {
+ .desc = "reset", + .desc = "reset",
+ .gpio = 34, + .gpio = 34,
@ -386,7 +386,7 @@
+ .gpio = 4, + .gpio = 4,
+ }, + },
+ }, + },
+ .reset_buttons = { + .buttons = {
+ { + {
+ .desc = "reset", + .desc = "reset",
+ .gpio = 34, + .gpio = 34,
@ -471,7 +471,7 @@
+ .gpio = 4, + .gpio = 4,
+ }, + },
+ }, + },
+ .reset_buttons = { + .buttons = {
+ { + {
+ .desc = "reset", + .desc = "reset",
+ .gpio = 34, + .gpio = 34,
@ -543,5 +543,5 @@
- struct gpio_led leds[8]; - struct gpio_led leds[8];
+ struct gpio_led leds[9]; + struct gpio_led leds[9];
/* Reset button */ /* Buttons */
struct gpio_button reset_buttons[2]; struct gpio_button buttons[2];