Commit e7277e1d authored by Rafał Miłecki's avatar Rafał Miłecki Committed by Ralf Baechle

MIPS: BCM47XX: Convert WNDR4500 to new syntax

Signed-off-by: default avatarRafał Miłecki <zajec5@gmail.com>
Signed-off-by: default avatarJohn Crispin <blogic@openwrt.org>
Patchwork: http://patchwork.linux-mips.org/patch/6313/
parent aeee3f5a
...@@ -305,22 +305,10 @@ bcm47xx_buttons_netgear_wndr3700v3[] __initconst = { ...@@ -305,22 +305,10 @@ bcm47xx_buttons_netgear_wndr3700v3[] __initconst = {
}; };
static const struct gpio_keys_button static const struct gpio_keys_button
bcm47xx_buttons_netgear_wndr4500_v1[] __initconst = { bcm47xx_buttons_netgear_wndr4500v1[] __initconst = {
{ BCM47XX_GPIO_KEY(4, KEY_WPS_BUTTON),
.code = KEY_WPS_BUTTON, BCM47XX_GPIO_KEY(5, KEY_RFKILL),
.gpio = 4, BCM47XX_GPIO_KEY(6, KEY_RESTART),
.active_low = 1,
},
{
.code = KEY_RFKILL,
.gpio = 5,
.active_low = 1,
},
{
.code = KEY_RESTART,
.gpio = 6,
.active_low = 1,
},
}; };
static const struct gpio_keys_button static const struct gpio_keys_button
...@@ -523,7 +511,7 @@ int __init bcm47xx_buttons_register(void) ...@@ -523,7 +511,7 @@ int __init bcm47xx_buttons_register(void)
err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wndr3700v3); err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wndr3700v3);
break; break;
case BCM47XX_BOARD_NETGEAR_WNDR4500V1: case BCM47XX_BOARD_NETGEAR_WNDR4500V1:
err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wndr4500_v1); err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wndr4500v1);
break; break;
case BCM47XX_BOARD_NETGEAR_WNR834BV2: case BCM47XX_BOARD_NETGEAR_WNR834BV2:
err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wnr834bv2); err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wnr834bv2);
......
...@@ -342,49 +342,14 @@ bcm47xx_leds_netgear_wndr3400v1[] __initconst = { ...@@ -342,49 +342,14 @@ bcm47xx_leds_netgear_wndr3400v1[] __initconst = {
}; };
static const struct gpio_led static const struct gpio_led
bcm47xx_leds_netgear_wndr4500_v1_leds[] __initconst = { bcm47xx_leds_netgear_wndr4500v1[] __initconst = {
{ BCM47XX_GPIO_LED(1, "green", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
.name = "bcm47xx:green:wps", BCM47XX_GPIO_LED(2, "green", "power", 1, LEDS_GPIO_DEFSTATE_ON),
.gpio = 1, BCM47XX_GPIO_LED(3, "amber", "power", 1, LEDS_GPIO_DEFSTATE_OFF),
.active_low = 1, BCM47XX_GPIO_LED(8, "green", "usb1", 1, LEDS_GPIO_DEFSTATE_OFF),
.default_state = LEDS_GPIO_DEFSTATE_KEEP, BCM47XX_GPIO_LED(9, "green", "2ghz", 1, LEDS_GPIO_DEFSTATE_OFF),
}, BCM47XX_GPIO_LED(11, "blue", "5ghz", 1, LEDS_GPIO_DEFSTATE_OFF),
{ BCM47XX_GPIO_LED(14, "green", "usb2", 1, LEDS_GPIO_DEFSTATE_OFF),
.name = "bcm47xx:green:power",
.gpio = 2,
.active_low = 1,
.default_state = LEDS_GPIO_DEFSTATE_KEEP,
},
{
.name = "bcm47xx:orange:power",
.gpio = 3,
.active_low = 1,
.default_state = LEDS_GPIO_DEFSTATE_KEEP,
},
{
.name = "bcm47xx:green:usb1",
.gpio = 8,
.active_low = 1,
.default_state = LEDS_GPIO_DEFSTATE_KEEP,
},
{
.name = "bcm47xx:green:2ghz",
.gpio = 9,
.active_low = 1,
.default_state = LEDS_GPIO_DEFSTATE_KEEP,
},
{
.name = "bcm47xx:blue:5ghz",
.gpio = 11,
.active_low = 1,
.default_state = LEDS_GPIO_DEFSTATE_KEEP,
},
{
.name = "bcm47xx:green:usb2",
.gpio = 14,
.active_low = 1,
.default_state = LEDS_GPIO_DEFSTATE_KEEP,
},
}; };
static const struct gpio_led static const struct gpio_led
...@@ -558,7 +523,7 @@ void __init bcm47xx_leds_register(void) ...@@ -558,7 +523,7 @@ void __init bcm47xx_leds_register(void)
bcm47xx_set_pdata(bcm47xx_leds_netgear_wndr3400v1); bcm47xx_set_pdata(bcm47xx_leds_netgear_wndr3400v1);
break; break;
case BCM47XX_BOARD_NETGEAR_WNDR4500V1: case BCM47XX_BOARD_NETGEAR_WNDR4500V1:
bcm47xx_set_pdata(bcm47xx_leds_netgear_wndr4500_v1_leds); bcm47xx_set_pdata(bcm47xx_leds_netgear_wndr4500v1);
break; break;
case BCM47XX_BOARD_NETGEAR_WNR834BV2: case BCM47XX_BOARD_NETGEAR_WNR834BV2:
bcm47xx_set_pdata(bcm47xx_leds_netgear_wnr834bv2); bcm47xx_set_pdata(bcm47xx_leds_netgear_wnr834bv2);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment