Skip to content

Commit aecf89f

Browse files
ffainellitsbogend
authored andcommitted
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 <[email protected]> Signed-off-by: Thomas Bogendoerfer <[email protected]>
1 parent 3829e4f commit aecf89f

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

arch/mips/bcm47xx/buttons.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@
2626

2727
/* Asus */
2828

29+
static const struct gpio_keys_button
30+
bcm47xx_buttons_asus_rtn10u[] __initconst = {
31+
BCM47XX_GPIO_KEY(20, KEY_WPS_BUTTON),
32+
BCM47XX_GPIO_KEY(21, KEY_RESTART),
33+
};
34+
2935
static const struct gpio_keys_button
3036
bcm47xx_buttons_asus_rtn12[] __initconst = {
3137
BCM47XX_GPIO_KEY(0, KEY_WPS_BUTTON),
@@ -490,6 +496,9 @@ int __init bcm47xx_buttons_register(void)
490496
int err;
491497

492498
switch (board) {
499+
case BCM47XX_BOARD_ASUS_RTN10U:
500+
err = bcm47xx_copy_bdata(bcm47xx_buttons_asus_rtn10u);
501+
break;
493502
case BCM47XX_BOARD_ASUS_RTN12:
494503
err = bcm47xx_copy_bdata(bcm47xx_buttons_asus_rtn12);
495504
break;

arch/mips/bcm47xx/leds.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,14 @@
2929

3030
/* Asus */
3131

32+
static const struct gpio_led
33+
bcm47xx_leds_asus_rtn10u[] __initconst = {
34+
BCM47XX_GPIO_LED(5, "green", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF),
35+
BCM47XX_GPIO_LED(6, "green", "power", 1, LEDS_GPIO_DEFSTATE_ON),
36+
BCM47XX_GPIO_LED(7, "green", "wps", 0, LEDS_GPIO_DEFSTATE_OFF),
37+
BCM47XX_GPIO_LED(8, "green", "usb", 0, LEDS_GPIO_DEFSTATE_OFF),
38+
};
39+
3240
static const struct gpio_led
3341
bcm47xx_leds_asus_rtn12[] __initconst = {
3442
BCM47XX_GPIO_LED(2, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON),
@@ -563,6 +571,9 @@ void __init bcm47xx_leds_register(void)
563571
enum bcm47xx_board board = bcm47xx_board_get();
564572

565573
switch (board) {
574+
case BCM47XX_BOARD_ASUS_RTN10U:
575+
bcm47xx_set_pdata(bcm47xx_leds_asus_rtn10u);
576+
break;
566577
case BCM47XX_BOARD_ASUS_RTN12:
567578
bcm47xx_set_pdata(bcm47xx_leds_asus_rtn12);
568579
break;

0 commit comments

Comments
 (0)