1 #include "bcm47xx_private.h" 2 3 #include <linux/leds.h> 4 #include <bcm47xx_board.h> 5 6 /************************************************** 7 * Database 8 **************************************************/ 9 10 #define BCM47XX_GPIO_LED(_gpio, _color, _function, _active_low, \ 11 _default_state) \ 12 { \ 13 .name = "bcm47xx:" _color ":" _function, \ 14 .gpio = _gpio, \ 15 .active_low = _active_low, \ 16 .default_state = _default_state, \ 17 } 18 19 #define BCM47XX_GPIO_LED_TRIGGER(_gpio, _color, _function, _active_low, \ 20 _default_trigger) \ 21 { \ 22 .name = "bcm47xx:" _color ":" _function, \ 23 .gpio = _gpio, \ 24 .active_low = _active_low, \ 25 .default_state = LEDS_GPIO_DEFSTATE_OFF, \ 26 .default_trigger = _default_trigger, \ 27 } 28 29 /* Asus */ 30 31 static const struct gpio_led 32 bcm47xx_leds_asus_rtn12[] __initconst = { 33 BCM47XX_GPIO_LED(2, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON), 34 BCM47XX_GPIO_LED(7, "unk", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF), 35 }; 36 37 static const struct gpio_led 38 bcm47xx_leds_asus_rtn16[] __initconst = { 39 BCM47XX_GPIO_LED(1, "blue", "power", 1, LEDS_GPIO_DEFSTATE_ON), 40 BCM47XX_GPIO_LED(7, "blue", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF), 41 }; 42 43 static const struct gpio_led 44 bcm47xx_leds_asus_rtn66u[] __initconst = { 45 BCM47XX_GPIO_LED(12, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON), 46 BCM47XX_GPIO_LED(15, "unk", "usb", 1, LEDS_GPIO_DEFSTATE_OFF), 47 }; 48 49 static const struct gpio_led 50 bcm47xx_leds_asus_wl300g[] __initconst = { 51 BCM47XX_GPIO_LED(0, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON), 52 }; 53 54 static const struct gpio_led 55 bcm47xx_leds_asus_wl320ge[] __initconst = { 56 BCM47XX_GPIO_LED(0, "unk", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF), 57 BCM47XX_GPIO_LED(2, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON), 58 BCM47XX_GPIO_LED(11, "unk", "link", 1, LEDS_GPIO_DEFSTATE_OFF), 59 }; 60 61 static const struct gpio_led 62 bcm47xx_leds_asus_wl330ge[] __initconst = { 63 BCM47XX_GPIO_LED(0, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON), 64 }; 65 66 static const struct gpio_led 67 bcm47xx_leds_asus_wl500gd[] __initconst = { 68 BCM47XX_GPIO_LED(0, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON), 69 }; 70 71 static const struct gpio_led 72 bcm47xx_leds_asus_wl500gpv1[] __initconst = { 73 BCM47XX_GPIO_LED(1, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON), 74 }; 75 76 static const struct gpio_led 77 bcm47xx_leds_asus_wl500gpv2[] __initconst = { 78 BCM47XX_GPIO_LED(0, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON), 79 BCM47XX_GPIO_LED(1, "unk", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF), 80 }; 81 82 static const struct gpio_led 83 bcm47xx_leds_asus_wl500w[] __initconst = { 84 BCM47XX_GPIO_LED(5, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON), 85 }; 86 87 static const struct gpio_led 88 bcm47xx_leds_asus_wl520gc[] __initconst = { 89 BCM47XX_GPIO_LED(0, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON), 90 BCM47XX_GPIO_LED(1, "unk", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF), 91 }; 92 93 static const struct gpio_led 94 bcm47xx_leds_asus_wl520gu[] __initconst = { 95 BCM47XX_GPIO_LED(0, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON), 96 BCM47XX_GPIO_LED(1, "unk", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF), 97 }; 98 99 static const struct gpio_led 100 bcm47xx_leds_asus_wl700ge[] __initconst = { 101 BCM47XX_GPIO_LED(1, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON), /* Labeled "READY" (there is no "power" LED). Originally ON, flashing on USB activity. */ 102 }; 103 104 static const struct gpio_led 105 bcm47xx_leds_asus_wlhdd[] __initconst = { 106 BCM47XX_GPIO_LED(0, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON), 107 BCM47XX_GPIO_LED(2, "unk", "usb", 1, LEDS_GPIO_DEFSTATE_OFF), 108 }; 109 110 /* Belkin */ 111 112 static const struct gpio_led 113 bcm47xx_leds_belkin_f7d4301[] __initconst = { 114 BCM47XX_GPIO_LED(10, "green", "power", 1, LEDS_GPIO_DEFSTATE_ON), 115 BCM47XX_GPIO_LED(11, "amber", "power", 1, LEDS_GPIO_DEFSTATE_OFF), 116 BCM47XX_GPIO_LED(12, "unk", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), 117 BCM47XX_GPIO_LED(13, "unk", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF), 118 BCM47XX_GPIO_LED(14, "unk", "usb0", 1, LEDS_GPIO_DEFSTATE_OFF), 119 BCM47XX_GPIO_LED(15, "unk", "usb1", 1, LEDS_GPIO_DEFSTATE_OFF), 120 }; 121 122 /* Buffalo */ 123 124 static const struct gpio_led 125 bcm47xx_leds_buffalo_whr2_a54g54[] __initconst = { 126 BCM47XX_GPIO_LED(7, "unk", "diag", 1, LEDS_GPIO_DEFSTATE_OFF), 127 }; 128 129 static const struct gpio_led 130 bcm47xx_leds_buffalo_whr_g125[] __initconst = { 131 BCM47XX_GPIO_LED(1, "unk", "bridge", 1, LEDS_GPIO_DEFSTATE_OFF), 132 BCM47XX_GPIO_LED(2, "unk", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF), 133 BCM47XX_GPIO_LED(3, "unk", "internal", 1, LEDS_GPIO_DEFSTATE_OFF), 134 BCM47XX_GPIO_LED(6, "unk", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), 135 BCM47XX_GPIO_LED(7, "unk", "diag", 1, LEDS_GPIO_DEFSTATE_OFF), 136 }; 137 138 static const struct gpio_led 139 bcm47xx_leds_buffalo_whr_g54s[] __initconst = { 140 BCM47XX_GPIO_LED(1, "unk", "bridge", 1, LEDS_GPIO_DEFSTATE_OFF), 141 BCM47XX_GPIO_LED(2, "unk", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF), 142 BCM47XX_GPIO_LED(3, "unk", "internal", 1, LEDS_GPIO_DEFSTATE_OFF), 143 BCM47XX_GPIO_LED(6, "unk", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), 144 BCM47XX_GPIO_LED(7, "unk", "diag", 1, LEDS_GPIO_DEFSTATE_OFF), 145 }; 146 147 static const struct gpio_led 148 bcm47xx_leds_buffalo_whr_hp_g54[] __initconst = { 149 BCM47XX_GPIO_LED(1, "unk", "bridge", 1, LEDS_GPIO_DEFSTATE_OFF), 150 BCM47XX_GPIO_LED(2, "unk", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF), 151 BCM47XX_GPIO_LED(3, "unk", "internal", 1, LEDS_GPIO_DEFSTATE_OFF), 152 BCM47XX_GPIO_LED(6, "unk", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), 153 BCM47XX_GPIO_LED(7, "unk", "diag", 1, LEDS_GPIO_DEFSTATE_OFF), 154 }; 155 156 static const struct gpio_led 157 bcm47xx_leds_buffalo_wzr_g300n[] __initconst = { 158 BCM47XX_GPIO_LED(1, "unk", "bridge", 1, LEDS_GPIO_DEFSTATE_OFF), 159 BCM47XX_GPIO_LED(6, "unk", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), 160 BCM47XX_GPIO_LED(7, "unk", "diag", 1, LEDS_GPIO_DEFSTATE_OFF), 161 }; 162 163 static const struct gpio_led 164 bcm47xx_leds_buffalo_wzr_rs_g54[] __initconst = { 165 BCM47XX_GPIO_LED(6, "unk", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), 166 BCM47XX_GPIO_LED(1, "unk", "vpn", 1, LEDS_GPIO_DEFSTATE_OFF), 167 BCM47XX_GPIO_LED(7, "unk", "diag", 1, LEDS_GPIO_DEFSTATE_OFF), 168 }; 169 170 static const struct gpio_led 171 bcm47xx_leds_buffalo_wzr_rs_g54hp[] __initconst = { 172 BCM47XX_GPIO_LED(6, "unk", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), 173 BCM47XX_GPIO_LED(1, "unk", "vpn", 1, LEDS_GPIO_DEFSTATE_OFF), 174 BCM47XX_GPIO_LED(7, "unk", "diag", 1, LEDS_GPIO_DEFSTATE_OFF), 175 }; 176 177 /* Dell */ 178 179 static const struct gpio_led 180 bcm47xx_leds_dell_tm2300[] __initconst = { 181 BCM47XX_GPIO_LED(6, "unk", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF), 182 BCM47XX_GPIO_LED(7, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON), 183 }; 184 185 /* D-Link */ 186 187 static const struct gpio_led 188 bcm47xx_leds_dlink_dir130[] __initconst = { 189 BCM47XX_GPIO_LED_TRIGGER(0, "green", "status", 1, "timer"), /* Originally blinking when device is ready, separated from "power" LED */ 190 BCM47XX_GPIO_LED(6, "blue", "unk", 1, LEDS_GPIO_DEFSTATE_OFF), 191 }; 192 193 static const struct gpio_led 194 bcm47xx_leds_dlink_dir330[] __initconst = { 195 BCM47XX_GPIO_LED_TRIGGER(0, "green", "status", 1, "timer"), /* Originally blinking when device is ready, separated from "power" LED */ 196 BCM47XX_GPIO_LED(4, "unk", "usb", 1, LEDS_GPIO_DEFSTATE_OFF), 197 BCM47XX_GPIO_LED(6, "blue", "unk", 1, LEDS_GPIO_DEFSTATE_OFF), 198 }; 199 200 /* Huawei */ 201 202 static const struct gpio_led 203 bcm47xx_leds_huawei_e970[] __initconst = { 204 BCM47XX_GPIO_LED(0, "unk", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF), 205 }; 206 207 /* Linksys */ 208 209 static const struct gpio_led 210 bcm47xx_leds_linksys_e1000v1[] __initconst = { 211 BCM47XX_GPIO_LED(0, "blue", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF), 212 BCM47XX_GPIO_LED(1, "blue", "power", 0, LEDS_GPIO_DEFSTATE_ON), 213 BCM47XX_GPIO_LED(2, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), 214 BCM47XX_GPIO_LED(4, "blue", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), 215 }; 216 217 static const struct gpio_led 218 bcm47xx_leds_linksys_e1000v21[] __initconst = { 219 BCM47XX_GPIO_LED(5, "unk", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF), 220 BCM47XX_GPIO_LED(6, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON), 221 BCM47XX_GPIO_LED(7, "amber", "wps", 0, LEDS_GPIO_DEFSTATE_OFF), 222 BCM47XX_GPIO_LED(8, "blue", "wps", 0, LEDS_GPIO_DEFSTATE_OFF), 223 }; 224 225 static const struct gpio_led 226 bcm47xx_leds_linksys_e2000v1[] __initconst = { 227 BCM47XX_GPIO_LED(1, "blue", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF), 228 BCM47XX_GPIO_LED(2, "blue", "power", 0, LEDS_GPIO_DEFSTATE_ON), 229 BCM47XX_GPIO_LED(3, "blue", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), 230 BCM47XX_GPIO_LED(4, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), 231 }; 232 233 static const struct gpio_led 234 bcm47xx_leds_linksys_e3000v1[] __initconst = { 235 BCM47XX_GPIO_LED(0, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), 236 BCM47XX_GPIO_LED(1, "unk", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF), 237 BCM47XX_GPIO_LED(3, "blue", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), 238 BCM47XX_GPIO_LED(5, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON), 239 BCM47XX_GPIO_LED(7, "unk", "usb", 0, LEDS_GPIO_DEFSTATE_OFF), 240 }; 241 242 static const struct gpio_led 243 bcm47xx_leds_linksys_e3200v1[] __initconst = { 244 BCM47XX_GPIO_LED(3, "green", "power", 1, LEDS_GPIO_DEFSTATE_ON), 245 }; 246 247 static const struct gpio_led 248 bcm47xx_leds_linksys_e4200v1[] __initconst = { 249 BCM47XX_GPIO_LED(5, "white", "power", 1, LEDS_GPIO_DEFSTATE_ON), 250 }; 251 252 static const struct gpio_led 253 bcm47xx_leds_linksys_wrt150nv1[] __initconst = { 254 BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON), 255 BCM47XX_GPIO_LED(3, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), 256 BCM47XX_GPIO_LED(5, "green", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), 257 }; 258 259 static const struct gpio_led 260 bcm47xx_leds_linksys_wrt150nv11[] __initconst = { 261 BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON), 262 BCM47XX_GPIO_LED(3, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), 263 BCM47XX_GPIO_LED(5, "green", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), 264 }; 265 266 static const struct gpio_led 267 bcm47xx_leds_linksys_wrt160nv1[] __initconst = { 268 BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON), 269 BCM47XX_GPIO_LED(3, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), 270 BCM47XX_GPIO_LED(5, "blue", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), 271 }; 272 273 static const struct gpio_led 274 bcm47xx_leds_linksys_wrt160nv3[] __initconst = { 275 BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON), 276 BCM47XX_GPIO_LED(2, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), 277 BCM47XX_GPIO_LED(4, "blue", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), 278 }; 279 280 static const struct gpio_led 281 bcm47xx_leds_linksys_wrt300nv11[] __initconst = { 282 BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON), 283 BCM47XX_GPIO_LED(3, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), 284 BCM47XX_GPIO_LED(5, "green", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), 285 }; 286 287 static const struct gpio_led 288 bcm47xx_leds_linksys_wrt310nv1[] __initconst = { 289 BCM47XX_GPIO_LED(1, "blue", "power", 0, LEDS_GPIO_DEFSTATE_ON), 290 BCM47XX_GPIO_LED(3, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), 291 BCM47XX_GPIO_LED(9, "blue", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), 292 }; 293 294 static const struct gpio_led 295 bcm47xx_leds_linksys_wrt610nv1[] __initconst = { 296 BCM47XX_GPIO_LED(0, "unk", "usb", 1, LEDS_GPIO_DEFSTATE_OFF), 297 BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_OFF), 298 BCM47XX_GPIO_LED(3, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), 299 BCM47XX_GPIO_LED(9, "blue", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), 300 }; 301 302 static const struct gpio_led 303 bcm47xx_leds_linksys_wrt610nv2[] __initconst = { 304 BCM47XX_GPIO_LED(0, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), 305 BCM47XX_GPIO_LED(1, "unk", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF), 306 BCM47XX_GPIO_LED(3, "blue", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), 307 BCM47XX_GPIO_LED(5, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON), 308 BCM47XX_GPIO_LED(7, "unk", "usb", 0, LEDS_GPIO_DEFSTATE_OFF), 309 }; 310 311 /* Motorola */ 312 313 static const struct gpio_led 314 bcm47xx_leds_motorola_we800g[] __initconst = { 315 BCM47XX_GPIO_LED(1, "amber", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF), 316 BCM47XX_GPIO_LED(2, "unk", "unk", 1, LEDS_GPIO_DEFSTATE_OFF), /* There are only 3 LEDs: Power, Wireless and Device (ethernet) */ 317 BCM47XX_GPIO_LED(4, "green", "power", 0, LEDS_GPIO_DEFSTATE_ON), 318 }; 319 320 static const struct gpio_led 321 bcm47xx_leds_motorola_wr850gp[] __initconst = { 322 BCM47XX_GPIO_LED(0, "unk", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF), 323 BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON), 324 BCM47XX_GPIO_LED(6, "unk", "dmz", 1, LEDS_GPIO_DEFSTATE_OFF), 325 BCM47XX_GPIO_LED(7, "unk", "diag", 1, LEDS_GPIO_DEFSTATE_OFF), 326 }; 327 328 static const struct gpio_led 329 bcm47xx_leds_motorola_wr850gv2v3[] __initconst = { 330 BCM47XX_GPIO_LED(0, "unk", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF), 331 BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON), 332 BCM47XX_GPIO_LED(7, "unk", "diag", 1, LEDS_GPIO_DEFSTATE_OFF), 333 }; 334 335 /* Netgear */ 336 337 static const struct gpio_led 338 bcm47xx_leds_netgear_wndr3400v1[] __initconst = { 339 BCM47XX_GPIO_LED(2, "green", "usb", 1, LEDS_GPIO_DEFSTATE_OFF), 340 BCM47XX_GPIO_LED(3, "green", "power", 0, LEDS_GPIO_DEFSTATE_ON), 341 BCM47XX_GPIO_LED(7, "amber", "power", 0, LEDS_GPIO_DEFSTATE_OFF), 342 }; 343 344 static const struct gpio_led 345 bcm47xx_leds_netgear_wndr4500v1[] __initconst = { 346 BCM47XX_GPIO_LED(1, "green", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), 347 BCM47XX_GPIO_LED(2, "green", "power", 1, LEDS_GPIO_DEFSTATE_ON), 348 BCM47XX_GPIO_LED(3, "amber", "power", 1, LEDS_GPIO_DEFSTATE_OFF), 349 BCM47XX_GPIO_LED(8, "green", "usb1", 1, LEDS_GPIO_DEFSTATE_OFF), 350 BCM47XX_GPIO_LED(9, "green", "2ghz", 1, LEDS_GPIO_DEFSTATE_OFF), 351 BCM47XX_GPIO_LED(11, "blue", "5ghz", 1, LEDS_GPIO_DEFSTATE_OFF), 352 BCM47XX_GPIO_LED(14, "green", "usb2", 1, LEDS_GPIO_DEFSTATE_OFF), 353 }; 354 355 static const struct gpio_led 356 bcm47xx_leds_netgear_wnr834bv2[] __initconst = { 357 BCM47XX_GPIO_LED(2, "green", "power", 0, LEDS_GPIO_DEFSTATE_ON), 358 BCM47XX_GPIO_LED(3, "amber", "power", 0, LEDS_GPIO_DEFSTATE_OFF), 359 BCM47XX_GPIO_LED(7, "unk", "connected", 0, LEDS_GPIO_DEFSTATE_OFF), 360 }; 361 362 /* SimpleTech */ 363 364 static const struct gpio_led 365 bcm47xx_leds_simpletech_simpleshare[] __initconst = { 366 BCM47XX_GPIO_LED(1, "unk", "status", 1, LEDS_GPIO_DEFSTATE_OFF), /* "Ready" LED */ 367 }; 368 369 /************************************************** 370 * Init 371 **************************************************/ 372 373 static struct gpio_led_platform_data bcm47xx_leds_pdata; 374 375 #define bcm47xx_set_pdata(dev_leds) do { \ 376 bcm47xx_leds_pdata.leds = dev_leds; \ 377 bcm47xx_leds_pdata.num_leds = ARRAY_SIZE(dev_leds); \ 378 } while (0) 379 380 void __init bcm47xx_leds_register(void) 381 { 382 enum bcm47xx_board board = bcm47xx_board_get(); 383 384 switch (board) { 385 case BCM47XX_BOARD_ASUS_RTN12: 386 bcm47xx_set_pdata(bcm47xx_leds_asus_rtn12); 387 break; 388 case BCM47XX_BOARD_ASUS_RTN16: 389 bcm47xx_set_pdata(bcm47xx_leds_asus_rtn16); 390 break; 391 case BCM47XX_BOARD_ASUS_RTN66U: 392 bcm47xx_set_pdata(bcm47xx_leds_asus_rtn66u); 393 break; 394 case BCM47XX_BOARD_ASUS_WL300G: 395 bcm47xx_set_pdata(bcm47xx_leds_asus_wl300g); 396 break; 397 case BCM47XX_BOARD_ASUS_WL320GE: 398 bcm47xx_set_pdata(bcm47xx_leds_asus_wl320ge); 399 break; 400 case BCM47XX_BOARD_ASUS_WL330GE: 401 bcm47xx_set_pdata(bcm47xx_leds_asus_wl330ge); 402 break; 403 case BCM47XX_BOARD_ASUS_WL500GD: 404 bcm47xx_set_pdata(bcm47xx_leds_asus_wl500gd); 405 break; 406 case BCM47XX_BOARD_ASUS_WL500GPV1: 407 bcm47xx_set_pdata(bcm47xx_leds_asus_wl500gpv1); 408 break; 409 case BCM47XX_BOARD_ASUS_WL500GPV2: 410 bcm47xx_set_pdata(bcm47xx_leds_asus_wl500gpv2); 411 break; 412 case BCM47XX_BOARD_ASUS_WL500W: 413 bcm47xx_set_pdata(bcm47xx_leds_asus_wl500w); 414 break; 415 case BCM47XX_BOARD_ASUS_WL520GC: 416 bcm47xx_set_pdata(bcm47xx_leds_asus_wl520gc); 417 break; 418 case BCM47XX_BOARD_ASUS_WL520GU: 419 bcm47xx_set_pdata(bcm47xx_leds_asus_wl520gu); 420 break; 421 case BCM47XX_BOARD_ASUS_WL700GE: 422 bcm47xx_set_pdata(bcm47xx_leds_asus_wl700ge); 423 break; 424 case BCM47XX_BOARD_ASUS_WLHDD: 425 bcm47xx_set_pdata(bcm47xx_leds_asus_wlhdd); 426 break; 427 428 case BCM47XX_BOARD_BELKIN_F7D4301: 429 bcm47xx_set_pdata(bcm47xx_leds_belkin_f7d4301); 430 break; 431 432 case BCM47XX_BOARD_BUFFALO_WHR2_A54G54: 433 bcm47xx_set_pdata(bcm47xx_leds_buffalo_whr2_a54g54); 434 break; 435 case BCM47XX_BOARD_BUFFALO_WHR_G125: 436 bcm47xx_set_pdata(bcm47xx_leds_buffalo_whr_g125); 437 break; 438 case BCM47XX_BOARD_BUFFALO_WHR_G54S: 439 bcm47xx_set_pdata(bcm47xx_leds_buffalo_whr_g54s); 440 break; 441 case BCM47XX_BOARD_BUFFALO_WHR_HP_G54: 442 bcm47xx_set_pdata(bcm47xx_leds_buffalo_whr_hp_g54); 443 break; 444 case BCM47XX_BOARD_BUFFALO_WZR_G300N: 445 bcm47xx_set_pdata(bcm47xx_leds_buffalo_wzr_g300n); 446 break; 447 case BCM47XX_BOARD_BUFFALO_WZR_RS_G54: 448 bcm47xx_set_pdata(bcm47xx_leds_buffalo_wzr_rs_g54); 449 break; 450 case BCM47XX_BOARD_BUFFALO_WZR_RS_G54HP: 451 bcm47xx_set_pdata(bcm47xx_leds_buffalo_wzr_rs_g54hp); 452 break; 453 454 case BCM47XX_BOARD_DELL_TM2300: 455 bcm47xx_set_pdata(bcm47xx_leds_dell_tm2300); 456 break; 457 458 case BCM47XX_BOARD_DLINK_DIR130: 459 bcm47xx_set_pdata(bcm47xx_leds_dlink_dir130); 460 break; 461 case BCM47XX_BOARD_DLINK_DIR330: 462 bcm47xx_set_pdata(bcm47xx_leds_dlink_dir330); 463 break; 464 465 case BCM47XX_BOARD_HUAWEI_E970: 466 bcm47xx_set_pdata(bcm47xx_leds_huawei_e970); 467 break; 468 469 case BCM47XX_BOARD_LINKSYS_E1000V1: 470 bcm47xx_set_pdata(bcm47xx_leds_linksys_e1000v1); 471 break; 472 case BCM47XX_BOARD_LINKSYS_E1000V21: 473 bcm47xx_set_pdata(bcm47xx_leds_linksys_e1000v21); 474 break; 475 case BCM47XX_BOARD_LINKSYS_E2000V1: 476 bcm47xx_set_pdata(bcm47xx_leds_linksys_e2000v1); 477 break; 478 case BCM47XX_BOARD_LINKSYS_E3000V1: 479 bcm47xx_set_pdata(bcm47xx_leds_linksys_e3000v1); 480 break; 481 case BCM47XX_BOARD_LINKSYS_E3200V1: 482 bcm47xx_set_pdata(bcm47xx_leds_linksys_e3200v1); 483 break; 484 case BCM47XX_BOARD_LINKSYS_E4200V1: 485 bcm47xx_set_pdata(bcm47xx_leds_linksys_e4200v1); 486 break; 487 case BCM47XX_BOARD_LINKSYS_WRT150NV1: 488 bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt150nv1); 489 break; 490 case BCM47XX_BOARD_LINKSYS_WRT150NV11: 491 bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt150nv11); 492 break; 493 case BCM47XX_BOARD_LINKSYS_WRT160NV1: 494 bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt160nv1); 495 break; 496 case BCM47XX_BOARD_LINKSYS_WRT160NV3: 497 bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt160nv3); 498 break; 499 case BCM47XX_BOARD_LINKSYS_WRT300NV11: 500 bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt300nv11); 501 break; 502 case BCM47XX_BOARD_LINKSYS_WRT310NV1: 503 bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt310nv1); 504 break; 505 case BCM47XX_BOARD_LINKSYS_WRT610NV1: 506 bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt610nv1); 507 break; 508 case BCM47XX_BOARD_LINKSYS_WRT610NV2: 509 bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt610nv2); 510 break; 511 512 case BCM47XX_BOARD_MOTOROLA_WE800G: 513 bcm47xx_set_pdata(bcm47xx_leds_motorola_we800g); 514 break; 515 case BCM47XX_BOARD_MOTOROLA_WR850GP: 516 bcm47xx_set_pdata(bcm47xx_leds_motorola_wr850gp); 517 break; 518 case BCM47XX_BOARD_MOTOROLA_WR850GV2V3: 519 bcm47xx_set_pdata(bcm47xx_leds_motorola_wr850gv2v3); 520 break; 521 522 case BCM47XX_BOARD_NETGEAR_WNDR3400V1: 523 bcm47xx_set_pdata(bcm47xx_leds_netgear_wndr3400v1); 524 break; 525 case BCM47XX_BOARD_NETGEAR_WNDR4500V1: 526 bcm47xx_set_pdata(bcm47xx_leds_netgear_wndr4500v1); 527 break; 528 case BCM47XX_BOARD_NETGEAR_WNR834BV2: 529 bcm47xx_set_pdata(bcm47xx_leds_netgear_wnr834bv2); 530 break; 531 532 case BCM47XX_BOARD_SIMPLETECH_SIMPLESHARE: 533 bcm47xx_set_pdata(bcm47xx_leds_simpletech_simpleshare); 534 break; 535 536 default: 537 pr_debug("No LEDs configuration found for this device\n"); 538 return; 539 } 540 541 gpio_led_register_device(-1, &bcm47xx_leds_pdata); 542 } 543