mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 12:11:40 +00:00
MIPS: BCM47XX: Add LEDs and buttons for Asus RTN-10U
Add the definitions for the buttons and LEDs used on the Asus RTN-10U router. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
This commit is contained in:
parent
3829e4f10a
commit
aecf89f2f8
@ -26,6 +26,12 @@
|
||||
|
||||
/* Asus */
|
||||
|
||||
static const struct gpio_keys_button
|
||||
bcm47xx_buttons_asus_rtn10u[] __initconst = {
|
||||
BCM47XX_GPIO_KEY(20, KEY_WPS_BUTTON),
|
||||
BCM47XX_GPIO_KEY(21, KEY_RESTART),
|
||||
};
|
||||
|
||||
static const struct gpio_keys_button
|
||||
bcm47xx_buttons_asus_rtn12[] __initconst = {
|
||||
BCM47XX_GPIO_KEY(0, KEY_WPS_BUTTON),
|
||||
@ -490,6 +496,9 @@ int __init bcm47xx_buttons_register(void)
|
||||
int err;
|
||||
|
||||
switch (board) {
|
||||
case BCM47XX_BOARD_ASUS_RTN10U:
|
||||
err = bcm47xx_copy_bdata(bcm47xx_buttons_asus_rtn10u);
|
||||
break;
|
||||
case BCM47XX_BOARD_ASUS_RTN12:
|
||||
err = bcm47xx_copy_bdata(bcm47xx_buttons_asus_rtn12);
|
||||
break;
|
||||
|
@ -29,6 +29,14 @@
|
||||
|
||||
/* Asus */
|
||||
|
||||
static const struct gpio_led
|
||||
bcm47xx_leds_asus_rtn10u[] __initconst = {
|
||||
BCM47XX_GPIO_LED(5, "green", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF),
|
||||
BCM47XX_GPIO_LED(6, "green", "power", 1, LEDS_GPIO_DEFSTATE_ON),
|
||||
BCM47XX_GPIO_LED(7, "green", "wps", 0, LEDS_GPIO_DEFSTATE_OFF),
|
||||
BCM47XX_GPIO_LED(8, "green", "usb", 0, LEDS_GPIO_DEFSTATE_OFF),
|
||||
};
|
||||
|
||||
static const struct gpio_led
|
||||
bcm47xx_leds_asus_rtn12[] __initconst = {
|
||||
BCM47XX_GPIO_LED(2, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON),
|
||||
@ -563,6 +571,9 @@ void __init bcm47xx_leds_register(void)
|
||||
enum bcm47xx_board board = bcm47xx_board_get();
|
||||
|
||||
switch (board) {
|
||||
case BCM47XX_BOARD_ASUS_RTN10U:
|
||||
bcm47xx_set_pdata(bcm47xx_leds_asus_rtn10u);
|
||||
break;
|
||||
case BCM47XX_BOARD_ASUS_RTN12:
|
||||
bcm47xx_set_pdata(bcm47xx_leds_asus_rtn12);
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user