aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips
diff options
context:
space:
mode:
authorRafał Miłecki <zajec5@gmail.com>2014-01-03 03:37:42 -0500
committerRalf Baechle <ralf@linux-mips.org>2014-01-24 16:39:53 -0500
commite7277e1dcc8c332a1d69f4c585e593bcbc9c5970 (patch)
tree1a6fd410a2b1feda84226b305b7207ebef62e809 /arch/mips
parentaeee3f5a4d3c3c953bf30e1278df8815995995ac (diff)
MIPS: BCM47XX: Convert WNDR4500 to new syntax
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John Crispin <blogic@openwrt.org> Patchwork: http://patchwork.linux-mips.org/patch/6313/
Diffstat (limited to 'arch/mips')
-rw-r--r--arch/mips/bcm47xx/buttons.c22
-rw-r--r--arch/mips/bcm47xx/leds.c53
2 files changed, 14 insertions, 61 deletions
diff --git a/arch/mips/bcm47xx/buttons.c b/arch/mips/bcm47xx/buttons.c
index 13f8e4191bdc..51815bae3633 100644
--- a/arch/mips/bcm47xx/buttons.c
+++ b/arch/mips/bcm47xx/buttons.c
@@ -305,22 +305,10 @@ bcm47xx_buttons_netgear_wndr3700v3[] __initconst = {
305}; 305};
306 306
307static const struct gpio_keys_button 307static const struct gpio_keys_button
308bcm47xx_buttons_netgear_wndr4500_v1[] __initconst = { 308bcm47xx_buttons_netgear_wndr4500v1[] __initconst = {
309 { 309 BCM47XX_GPIO_KEY(4, KEY_WPS_BUTTON),
310 .code = KEY_WPS_BUTTON, 310 BCM47XX_GPIO_KEY(5, KEY_RFKILL),
311 .gpio = 4, 311 BCM47XX_GPIO_KEY(6, KEY_RESTART),
312 .active_low = 1,
313 },
314 {
315 .code = KEY_RFKILL,
316 .gpio = 5,
317 .active_low = 1,
318 },
319 {
320 .code = KEY_RESTART,
321 .gpio = 6,
322 .active_low = 1,
323 },
324}; 312};
325 313
326static const struct gpio_keys_button 314static const struct gpio_keys_button
@@ -523,7 +511,7 @@ int __init bcm47xx_buttons_register(void)
523 err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wndr3700v3); 511 err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wndr3700v3);
524 break; 512 break;
525 case BCM47XX_BOARD_NETGEAR_WNDR4500V1: 513 case BCM47XX_BOARD_NETGEAR_WNDR4500V1:
526 err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wndr4500_v1); 514 err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wndr4500v1);
527 break; 515 break;
528 case BCM47XX_BOARD_NETGEAR_WNR834BV2: 516 case BCM47XX_BOARD_NETGEAR_WNR834BV2:
529 err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wnr834bv2); 517 err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wnr834bv2);
diff --git a/arch/mips/bcm47xx/leds.c b/arch/mips/bcm47xx/leds.c
index 28d281cc2e7d..647d15527066 100644
--- a/arch/mips/bcm47xx/leds.c
+++ b/arch/mips/bcm47xx/leds.c
@@ -342,49 +342,14 @@ bcm47xx_leds_netgear_wndr3400v1[] __initconst = {
342}; 342};
343 343
344static const struct gpio_led 344static const struct gpio_led
345bcm47xx_leds_netgear_wndr4500_v1_leds[] __initconst = { 345bcm47xx_leds_netgear_wndr4500v1[] __initconst = {
346 { 346 BCM47XX_GPIO_LED(1, "green", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
347 .name = "bcm47xx:green:wps", 347 BCM47XX_GPIO_LED(2, "green", "power", 1, LEDS_GPIO_DEFSTATE_ON),
348 .gpio = 1, 348 BCM47XX_GPIO_LED(3, "amber", "power", 1, LEDS_GPIO_DEFSTATE_OFF),
349 .active_low = 1, 349 BCM47XX_GPIO_LED(8, "green", "usb1", 1, LEDS_GPIO_DEFSTATE_OFF),
350 .default_state = LEDS_GPIO_DEFSTATE_KEEP, 350 BCM47XX_GPIO_LED(9, "green", "2ghz", 1, LEDS_GPIO_DEFSTATE_OFF),
351 }, 351 BCM47XX_GPIO_LED(11, "blue", "5ghz", 1, LEDS_GPIO_DEFSTATE_OFF),
352 { 352 BCM47XX_GPIO_LED(14, "green", "usb2", 1, LEDS_GPIO_DEFSTATE_OFF),
353 .name = "bcm47xx:green:power",
354 .gpio = 2,
355 .active_low = 1,
356 .default_state = LEDS_GPIO_DEFSTATE_KEEP,
357 },
358 {
359 .name = "bcm47xx:orange:power",
360 .gpio = 3,
361 .active_low = 1,
362 .default_state = LEDS_GPIO_DEFSTATE_KEEP,
363 },
364 {
365 .name = "bcm47xx:green:usb1",
366 .gpio = 8,
367 .active_low = 1,
368 .default_state = LEDS_GPIO_DEFSTATE_KEEP,
369 },
370 {
371 .name = "bcm47xx:green:2ghz",
372 .gpio = 9,
373 .active_low = 1,
374 .default_state = LEDS_GPIO_DEFSTATE_KEEP,
375 },
376 {
377 .name = "bcm47xx:blue:5ghz",
378 .gpio = 11,
379 .active_low = 1,
380 .default_state = LEDS_GPIO_DEFSTATE_KEEP,
381 },
382 {
383 .name = "bcm47xx:green:usb2",
384 .gpio = 14,
385 .active_low = 1,
386 .default_state = LEDS_GPIO_DEFSTATE_KEEP,
387 },
388}; 353};
389 354
390static const struct gpio_led 355static const struct gpio_led
@@ -558,7 +523,7 @@ void __init bcm47xx_leds_register(void)
558 bcm47xx_set_pdata(bcm47xx_leds_netgear_wndr3400v1); 523 bcm47xx_set_pdata(bcm47xx_leds_netgear_wndr3400v1);
559 break; 524 break;
560 case BCM47XX_BOARD_NETGEAR_WNDR4500V1: 525 case BCM47XX_BOARD_NETGEAR_WNDR4500V1:
561 bcm47xx_set_pdata(bcm47xx_leds_netgear_wndr4500_v1_leds); 526 bcm47xx_set_pdata(bcm47xx_leds_netgear_wndr4500v1);
562 break; 527 break;
563 case BCM47XX_BOARD_NETGEAR_WNR834BV2: 528 case BCM47XX_BOARD_NETGEAR_WNR834BV2:
564 bcm47xx_set_pdata(bcm47xx_leds_netgear_wnr834bv2); 529 bcm47xx_set_pdata(bcm47xx_leds_netgear_wnr834bv2);