925-actiontec_leds.patch 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. --- a/arch/mips/ar7/platform.c
  2. +++ b/arch/mips/ar7/platform.c
  3. @@ -465,31 +465,22 @@ static struct gpio_led fb_fon_leds[] = {
  4. },
  5. };
  6. -static struct gpio_led gt701_leds[] = {
  7. +static struct gpio_led actiontec_leds[] = {
  8. {
  9. .name = "inet:green",
  10. .gpio = 13,
  11. - .active_low = 1,
  12. - },
  13. - {
  14. - .name = "usb",
  15. - .gpio = 12,
  16. - .active_low = 1,
  17. },
  18. {
  19. .name = "inet:red",
  20. .gpio = 9,
  21. - .active_low = 1,
  22. },
  23. {
  24. - .name = "power:red",
  25. + .name = "power:green",
  26. .gpio = 7,
  27. - .active_low = 1,
  28. },
  29. {
  30. - .name = "power:green",
  31. + .name = "power:red",
  32. .gpio = 8,
  33. - .active_low = 1,
  34. .default_trigger = "default-on",
  35. },
  36. {
  37. @@ -497,6 +488,44 @@ static struct gpio_led gt701_leds[] = {
  38. .gpio = 10,
  39. .active_low = 1,
  40. },
  41. + {
  42. + .name = "wifi",
  43. + .gpio = 6,
  44. + .active_low = 1,
  45. + },
  46. + {
  47. + .name = "wifi:red",
  48. + .gpio = 3,
  49. + },
  50. + {
  51. + .name = "standby",
  52. + .gpio = 4,
  53. + },
  54. + {
  55. + .name = "wps",
  56. + .gpio = 16,
  57. + .active_low = 1,
  58. + },
  59. + {
  60. + .name = "usb",
  61. + .gpio = 12,
  62. + .active_low = 1,
  63. + },
  64. + {
  65. + .name = "voip",
  66. + .gpio = 15,
  67. + .active_low = 1,
  68. + },
  69. + {
  70. + .name = "line1",
  71. + .gpio = 23,
  72. + .active_low = 1,
  73. + },
  74. + {
  75. + .name = "line2",
  76. + .gpio = 25,
  77. + .active_low = 1,
  78. + },
  79. };
  80. static struct gpio_led_platform_data ar7_led_data;
  81. @@ -540,9 +569,9 @@ static void __init detect_leds(void)
  82. } else if (strstr(prid, "CYWM") || strstr(prid, "CYWL")) {
  83. ar7_led_data.num_leds = ARRAY_SIZE(titan_leds);
  84. ar7_led_data.leds = titan_leds;
  85. - } else if (strstr(prid, "GT701")) {
  86. - ar7_led_data.num_leds = ARRAY_SIZE(gt701_leds);
  87. - ar7_led_data.leds = gt701_leds;
  88. + } else if (strstr(prid, "GT7") || strstr(prid, "PK5000")) {
  89. + ar7_led_data.num_leds = ARRAY_SIZE(actiontec_leds);
  90. + ar7_led_data.leds = actiontec_leds;
  91. }
  92. }