1 // SPDX-License-Identifier: GPL-2.0 2 #include "bcm47xx_private.h" 3 4 #include <linux/leds.h> 5 #include <bcm47xx_board.h> 6 7 /************************************************** 8 * Database 9 **************************************************/ 10 11 #define BCM47XX_GPIO_LED(_gpio, _color, _function, _active_low, \ 12 _default_state) \ 13 { \ 14 .name = "bcm47xx:" _color ":" _function, \ 15 .gpio = _gpio, \ 16 .active_low = _active_low, \ 17 .default_state = _default_state, \ 18 } 19 20 #define BCM47XX_GPIO_LED_TRIGGER(_gpio, _color, _function, _active_low, \ 21 _default_trigger) \ 22 { \ 23 .name = "bcm47xx:" _color ":" _function, \ 24 .gpio = _gpio, \ 25 .active_low = _active_low, \ 26 .default_state = LEDS_GPIO_DEFSTATE_OFF, \ 27 .default_trigger = _default_trigger, \ 28 } 29 30 /* Asus */ 31 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 40 static const struct gpio_led 41 bcm47xx_leds_asus_rtn12[] __initconst = { 42 BCM47XX_GPIO_LED(2, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON), 43 BCM47XX_GPIO_LED(7, "unk", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF), 44 }; 45 46 static const struct gpio_led 47 bcm47xx_leds_asus_rtn15u[] __initconst = { 48 /* TODO: Add "wlan" LED */ 49 BCM47XX_GPIO_LED(3, "blue", "wan", 1, LEDS_GPIO_DEFSTATE_OFF), 50 BCM47XX_GPIO_LED(4, "blue", "lan", 1, LEDS_GPIO_DEFSTATE_OFF), 51 BCM47XX_GPIO_LED(6, "blue", "power", 1, LEDS_GPIO_DEFSTATE_ON), 52 BCM47XX_GPIO_LED(9, "blue", "usb", 0, LEDS_GPIO_DEFSTATE_OFF), 53 }; 54 55 static const struct gpio_led 56 bcm47xx_leds_asus_rtn16[] __initconst = { 57 BCM47XX_GPIO_LED(1, "blue", "power", 1, LEDS_GPIO_DEFSTATE_ON), 58 BCM47XX_GPIO_LED(7, "blue", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF), 59 }; 60 61 static const struct gpio_led 62 bcm47xx_leds_asus_rtn66u[] __initconst = { 63 BCM47XX_GPIO_LED(12, "blue", "power", 1, LEDS_GPIO_DEFSTATE_ON), 64 BCM47XX_GPIO_LED(15, "blue", "usb", 1, LEDS_GPIO_DEFSTATE_OFF), 65 }; 66 67 static const struct gpio_led 68 bcm47xx_leds_asus_wl300g[] __initconst = { 69 BCM47XX_GPIO_LED(0, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON), 70 }; 71 72 static const struct gpio_led 73 bcm47xx_leds_asus_wl320ge[] __initconst = { 74 BCM47XX_GPIO_LED(0, "unk", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF), 75 BCM47XX_GPIO_LED(2, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON), 76 BCM47XX_GPIO_LED(11, "unk", "link", 1, LEDS_GPIO_DEFSTATE_OFF), 77 }; 78 79 static const struct gpio_led 80 bcm47xx_leds_asus_wl330ge[] __initconst = { 81 BCM47XX_GPIO_LED(0, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON), 82 }; 83 84 static const struct gpio_led 85 bcm47xx_leds_asus_wl500g[] __initconst = { 86 BCM47XX_GPIO_LED(0, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON), 87 }; 88 89 static const struct gpio_led 90 bcm47xx_leds_asus_wl500gd[] __initconst = { 91 BCM47XX_GPIO_LED(0, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON), 92 }; 93 94 static const struct gpio_led 95 bcm47xx_leds_asus_wl500gpv1[] __initconst = { 96 BCM47XX_GPIO_LED(1, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON), 97 }; 98 99 static const struct gpio_led 100 bcm47xx_leds_asus_wl500gpv2[] __initconst = { 101 BCM47XX_GPIO_LED(0, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON), 102 BCM47XX_GPIO_LED(1, "unk", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF), 103 }; 104 105 static const struct gpio_led 106 bcm47xx_leds_asus_wl500w[] __initconst = { 107 BCM47XX_GPIO_LED(5, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON), 108 }; 109 110 static const struct gpio_led 111 bcm47xx_leds_asus_wl520gc[] __initconst = { 112 BCM47XX_GPIO_LED(0, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON), 113 BCM47XX_GPIO_LED(1, "unk", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF), 114 }; 115 116 static const struct gpio_led 117 bcm47xx_leds_asus_wl520gu[] __initconst = { 118 BCM47XX_GPIO_LED(0, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON), 119 BCM47XX_GPIO_LED(1, "unk", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF), 120 }; 121 122 static const struct gpio_led 123 bcm47xx_leds_asus_wl700ge[] __initconst = { 124 BCM47XX_GPIO_LED(1, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON), /* Labeled "READY" (there is no "power" LED). Originally ON, flashing on USB activity. */ 125 }; 126 127 static const struct gpio_led 128 bcm47xx_leds_asus_wlhdd[] __initconst = { 129 BCM47XX_GPIO_LED(0, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON), 130 BCM47XX_GPIO_LED(2, "unk", "usb", 1, LEDS_GPIO_DEFSTATE_OFF), 131 }; 132 133 /* Belkin */ 134 135 static const struct gpio_led 136 bcm47xx_leds_belkin_f7d4301[] __initconst = { 137 BCM47XX_GPIO_LED(10, "green", "power", 1, LEDS_GPIO_DEFSTATE_ON), 138 BCM47XX_GPIO_LED(11, "amber", "power", 1, LEDS_GPIO_DEFSTATE_OFF), 139 BCM47XX_GPIO_LED(12, "unk", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), 140 BCM47XX_GPIO_LED(13, "unk", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF), 141 BCM47XX_GPIO_LED(14, "unk", "usb0", 1, LEDS_GPIO_DEFSTATE_OFF), 142 BCM47XX_GPIO_LED(15, "unk", "usb1", 1, LEDS_GPIO_DEFSTATE_OFF), 143 }; 144 145 /* Buffalo */ 146 147 static const struct gpio_led 148 bcm47xx_leds_buffalo_whr2_a54g54[] __initconst = { 149 BCM47XX_GPIO_LED(7, "unk", "diag", 1, LEDS_GPIO_DEFSTATE_OFF), 150 }; 151 152 static const struct gpio_led 153 bcm47xx_leds_buffalo_whr_g125[] __initconst = { 154 BCM47XX_GPIO_LED(1, "unk", "bridge", 1, LEDS_GPIO_DEFSTATE_OFF), 155 BCM47XX_GPIO_LED(2, "unk", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF), 156 BCM47XX_GPIO_LED(3, "unk", "internal", 1, LEDS_GPIO_DEFSTATE_OFF), 157 BCM47XX_GPIO_LED(6, "unk", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), 158 BCM47XX_GPIO_LED(7, "unk", "diag", 1, LEDS_GPIO_DEFSTATE_OFF), 159 }; 160 161 static const struct gpio_led 162 bcm47xx_leds_buffalo_whr_g54s[] __initconst = { 163 BCM47XX_GPIO_LED(1, "green", "bridge", 1, LEDS_GPIO_DEFSTATE_OFF), 164 BCM47XX_GPIO_LED(2, "green", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF), 165 BCM47XX_GPIO_LED(3, "green", "internal", 1, LEDS_GPIO_DEFSTATE_OFF), 166 BCM47XX_GPIO_LED(6, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), 167 BCM47XX_GPIO_LED(7, "red", "diag", 1, LEDS_GPIO_DEFSTATE_OFF), 168 }; 169 170 static const struct gpio_led 171 bcm47xx_leds_buffalo_whr_hp_g54[] __initconst = { 172 BCM47XX_GPIO_LED(1, "unk", "bridge", 1, LEDS_GPIO_DEFSTATE_OFF), 173 BCM47XX_GPIO_LED(2, "unk", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF), 174 BCM47XX_GPIO_LED(3, "unk", "internal", 1, LEDS_GPIO_DEFSTATE_OFF), 175 BCM47XX_GPIO_LED(6, "unk", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), 176 BCM47XX_GPIO_LED(7, "unk", "diag", 1, LEDS_GPIO_DEFSTATE_OFF), 177 }; 178 179 static const struct gpio_led 180 bcm47xx_leds_buffalo_wzr_g300n[] __initconst = { 181 BCM47XX_GPIO_LED(1, "unk", "bridge", 1, LEDS_GPIO_DEFSTATE_OFF), 182 BCM47XX_GPIO_LED(6, "unk", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), 183 BCM47XX_GPIO_LED(7, "unk", "diag", 1, LEDS_GPIO_DEFSTATE_OFF), 184 }; 185 186 static const struct gpio_led 187 bcm47xx_leds_buffalo_wzr_rs_g54[] __initconst = { 188 BCM47XX_GPIO_LED(6, "unk", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), 189 BCM47XX_GPIO_LED(1, "unk", "vpn", 1, LEDS_GPIO_DEFSTATE_OFF), 190 BCM47XX_GPIO_LED(7, "unk", "diag", 1, LEDS_GPIO_DEFSTATE_OFF), 191 }; 192 193 static const struct gpio_led 194 bcm47xx_leds_buffalo_wzr_rs_g54hp[] __initconst = { 195 BCM47XX_GPIO_LED(6, "unk", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), 196 BCM47XX_GPIO_LED(1, "unk", "vpn", 1, LEDS_GPIO_DEFSTATE_OFF), 197 BCM47XX_GPIO_LED(7, "unk", "diag", 1, LEDS_GPIO_DEFSTATE_OFF), 198 }; 199 200 /* Dell */ 201 202 static const struct gpio_led 203 bcm47xx_leds_dell_tm2300[] __initconst = { 204 BCM47XX_GPIO_LED(6, "unk", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF), 205 BCM47XX_GPIO_LED(7, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON), 206 }; 207 208 /* D-Link */ 209 210 static const struct gpio_led 211 bcm47xx_leds_dlink_dir130[] __initconst = { 212 BCM47XX_GPIO_LED_TRIGGER(0, "green", "status", 1, "timer"), /* Originally blinking when device is ready, separated from "power" LED */ 213 BCM47XX_GPIO_LED(6, "blue", "unk", 1, LEDS_GPIO_DEFSTATE_OFF), 214 }; 215 216 static const struct gpio_led 217 bcm47xx_leds_dlink_dir330[] __initconst = { 218 BCM47XX_GPIO_LED_TRIGGER(0, "green", "status", 1, "timer"), /* Originally blinking when device is ready, separated from "power" LED */ 219 BCM47XX_GPIO_LED(4, "unk", "usb", 1, LEDS_GPIO_DEFSTATE_OFF), 220 BCM47XX_GPIO_LED(6, "blue", "unk", 1, LEDS_GPIO_DEFSTATE_OFF), 221 }; 222 223 /* Huawei */ 224 225 static const struct gpio_led 226 bcm47xx_leds_huawei_e970[] __initconst = { 227 BCM47XX_GPIO_LED(0, "unk", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF), 228 }; 229 230 /* Linksys */ 231 232 static const struct gpio_led 233 bcm47xx_leds_linksys_e1000v1[] __initconst = { 234 BCM47XX_GPIO_LED(0, "blue", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF), 235 BCM47XX_GPIO_LED(1, "blue", "power", 0, LEDS_GPIO_DEFSTATE_ON), 236 BCM47XX_GPIO_LED(2, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), 237 BCM47XX_GPIO_LED(4, "blue", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), 238 }; 239 240 static const struct gpio_led 241 bcm47xx_leds_linksys_e1000v21[] __initconst = { 242 BCM47XX_GPIO_LED(5, "blue", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF), 243 BCM47XX_GPIO_LED(6, "blue", "power", 1, LEDS_GPIO_DEFSTATE_ON), 244 BCM47XX_GPIO_LED(7, "amber", "wps", 0, LEDS_GPIO_DEFSTATE_OFF), 245 BCM47XX_GPIO_LED(8, "blue", "wps", 0, LEDS_GPIO_DEFSTATE_OFF), 246 }; 247 248 static const struct gpio_led 249 bcm47xx_leds_linksys_e2000v1[] __initconst = { 250 BCM47XX_GPIO_LED(1, "blue", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF), 251 BCM47XX_GPIO_LED(2, "blue", "power", 0, LEDS_GPIO_DEFSTATE_ON), 252 BCM47XX_GPIO_LED(3, "blue", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), 253 BCM47XX_GPIO_LED(4, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), 254 }; 255 256 static const struct gpio_led 257 bcm47xx_leds_linksys_e3000v1[] __initconst = { 258 BCM47XX_GPIO_LED(0, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), 259 BCM47XX_GPIO_LED(1, "unk", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF), 260 BCM47XX_GPIO_LED(3, "blue", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), 261 BCM47XX_GPIO_LED(5, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON), 262 BCM47XX_GPIO_LED(7, "unk", "usb", 0, LEDS_GPIO_DEFSTATE_OFF), 263 }; 264 265 static const struct gpio_led 266 bcm47xx_leds_linksys_e3200v1[] __initconst = { 267 BCM47XX_GPIO_LED(3, "green", "power", 1, LEDS_GPIO_DEFSTATE_ON), 268 }; 269 270 static const struct gpio_led 271 bcm47xx_leds_linksys_e4200v1[] __initconst = { 272 BCM47XX_GPIO_LED(5, "white", "power", 1, LEDS_GPIO_DEFSTATE_ON), 273 }; 274 275 static const struct gpio_led 276 bcm47xx_leds_linksys_wrt150nv1[] __initconst = { 277 BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON), 278 BCM47XX_GPIO_LED(3, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), 279 BCM47XX_GPIO_LED(5, "green", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), 280 }; 281 282 static const struct gpio_led 283 bcm47xx_leds_linksys_wrt150nv11[] __initconst = { 284 BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON), 285 BCM47XX_GPIO_LED(3, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), 286 BCM47XX_GPIO_LED(5, "green", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), 287 }; 288 289 static const struct gpio_led 290 bcm47xx_leds_linksys_wrt160nv1[] __initconst = { 291 BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON), 292 BCM47XX_GPIO_LED(3, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), 293 BCM47XX_GPIO_LED(5, "blue", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), 294 }; 295 296 static const struct gpio_led 297 bcm47xx_leds_linksys_wrt160nv3[] __initconst = { 298 BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON), 299 BCM47XX_GPIO_LED(2, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), 300 BCM47XX_GPIO_LED(4, "blue", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), 301 }; 302 303 static const struct gpio_led 304 bcm47xx_leds_linksys_wrt300n_v1[] __initconst = { 305 BCM47XX_GPIO_LED(1, "green", "power", 0, LEDS_GPIO_DEFSTATE_ON), 306 BCM47XX_GPIO_LED(3, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), 307 BCM47XX_GPIO_LED(5, "green", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), 308 }; 309 310 static const struct gpio_led 311 bcm47xx_leds_linksys_wrt300nv11[] __initconst = { 312 BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON), 313 BCM47XX_GPIO_LED(3, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), 314 BCM47XX_GPIO_LED(5, "green", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), 315 }; 316 317 static const struct gpio_led 318 bcm47xx_leds_linksys_wrt310nv1[] __initconst = { 319 BCM47XX_GPIO_LED(1, "blue", "power", 0, LEDS_GPIO_DEFSTATE_ON), 320 BCM47XX_GPIO_LED(3, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), 321 BCM47XX_GPIO_LED(9, "blue", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), 322 }; 323 324 static const struct gpio_led 325 bcm47xx_leds_linksys_wrt320n_v1[] __initconst = { 326 BCM47XX_GPIO_LED(1, "blue", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF), 327 BCM47XX_GPIO_LED(2, "blue", "power", 0, LEDS_GPIO_DEFSTATE_ON), 328 BCM47XX_GPIO_LED(4, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), 329 }; 330 331 static const struct gpio_led 332 bcm47xx_leds_linksys_wrt54g_generic[] __initconst = { 333 BCM47XX_GPIO_LED(0, "unk", "dmz", 1, LEDS_GPIO_DEFSTATE_OFF), 334 BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON), 335 BCM47XX_GPIO_LED(5, "white", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), 336 BCM47XX_GPIO_LED(7, "orange", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), 337 }; 338 339 static const struct gpio_led 340 bcm47xx_leds_linksys_wrt54g3gv2[] __initconst = { 341 BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON), 342 BCM47XX_GPIO_LED(2, "green", "3g", 0, LEDS_GPIO_DEFSTATE_OFF), 343 BCM47XX_GPIO_LED(3, "blue", "3g", 0, LEDS_GPIO_DEFSTATE_OFF), 344 }; 345 346 /* Verified on: WRT54GS V1.0 */ 347 static const struct gpio_led 348 bcm47xx_leds_linksys_wrt54g_type_0101[] __initconst = { 349 BCM47XX_GPIO_LED(0, "green", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF), 350 BCM47XX_GPIO_LED(1, "green", "power", 0, LEDS_GPIO_DEFSTATE_ON), 351 BCM47XX_GPIO_LED(7, "green", "dmz", 1, LEDS_GPIO_DEFSTATE_OFF), 352 }; 353 354 /* Verified on: WRT54GL V1.1 */ 355 static const struct gpio_led 356 bcm47xx_leds_linksys_wrt54g_type_0467[] __initconst = { 357 BCM47XX_GPIO_LED(0, "green", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF), 358 BCM47XX_GPIO_LED(1, "green", "power", 0, LEDS_GPIO_DEFSTATE_ON), 359 BCM47XX_GPIO_LED(2, "white", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), 360 BCM47XX_GPIO_LED(3, "orange", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), 361 BCM47XX_GPIO_LED(7, "green", "dmz", 1, LEDS_GPIO_DEFSTATE_OFF), 362 }; 363 364 static const struct gpio_led 365 bcm47xx_leds_linksys_wrt610nv1[] __initconst = { 366 BCM47XX_GPIO_LED(0, "unk", "usb", 1, LEDS_GPIO_DEFSTATE_OFF), 367 BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_OFF), 368 BCM47XX_GPIO_LED(3, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), 369 BCM47XX_GPIO_LED(9, "blue", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), 370 }; 371 372 static const struct gpio_led 373 bcm47xx_leds_linksys_wrt610nv2[] __initconst = { 374 BCM47XX_GPIO_LED(0, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), 375 BCM47XX_GPIO_LED(1, "unk", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF), 376 BCM47XX_GPIO_LED(3, "blue", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), 377 BCM47XX_GPIO_LED(5, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON), 378 BCM47XX_GPIO_LED(7, "unk", "usb", 0, LEDS_GPIO_DEFSTATE_OFF), 379 }; 380 381 static const struct gpio_led 382 bcm47xx_leds_linksys_wrtsl54gs[] __initconst = { 383 BCM47XX_GPIO_LED(0, "green", "dmz", 1, LEDS_GPIO_DEFSTATE_OFF), 384 BCM47XX_GPIO_LED(1, "green", "power", 0, LEDS_GPIO_DEFSTATE_ON), 385 BCM47XX_GPIO_LED(5, "white", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), 386 BCM47XX_GPIO_LED(7, "orange", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), 387 }; 388 389 /* Luxul */ 390 391 static const struct gpio_led 392 bcm47xx_leds_luxul_abr_4400_v1[] __initconst = { 393 BCM47XX_GPIO_LED(12, "green", "usb", 0, LEDS_GPIO_DEFSTATE_OFF), 394 BCM47XX_GPIO_LED_TRIGGER(15, "green", "status", 0, "timer"), 395 }; 396 397 static const struct gpio_led 398 bcm47xx_leds_luxul_xap_310_v1[] __initconst = { 399 BCM47XX_GPIO_LED_TRIGGER(6, "green", "status", 1, "timer"), 400 }; 401 402 static const struct gpio_led 403 bcm47xx_leds_luxul_xap_1210_v1[] __initconst = { 404 BCM47XX_GPIO_LED_TRIGGER(6, "green", "status", 1, "timer"), 405 }; 406 407 static const struct gpio_led 408 bcm47xx_leds_luxul_xap_1230_v1[] __initconst = { 409 BCM47XX_GPIO_LED(3, "blue", "2ghz", 0, LEDS_GPIO_DEFSTATE_OFF), 410 BCM47XX_GPIO_LED(4, "green", "bridge", 0, LEDS_GPIO_DEFSTATE_OFF), 411 BCM47XX_GPIO_LED_TRIGGER(6, "green", "status", 1, "timer"), 412 }; 413 414 static const struct gpio_led 415 bcm47xx_leds_luxul_xap_1240_v1[] __initconst = { 416 BCM47XX_GPIO_LED(3, "blue", "2ghz", 0, LEDS_GPIO_DEFSTATE_OFF), 417 BCM47XX_GPIO_LED(4, "green", "bridge", 0, LEDS_GPIO_DEFSTATE_OFF), 418 BCM47XX_GPIO_LED_TRIGGER(6, "green", "status", 1, "timer"), 419 }; 420 421 static const struct gpio_led 422 bcm47xx_leds_luxul_xap_1500_v1[] __initconst = { 423 BCM47XX_GPIO_LED_TRIGGER(13, "green", "status", 1, "timer"), 424 }; 425 426 static const struct gpio_led 427 bcm47xx_leds_luxul_xap1500_v1_extra[] __initconst = { 428 BCM47XX_GPIO_LED(44, "green", "5ghz", 0, LEDS_GPIO_DEFSTATE_OFF), 429 BCM47XX_GPIO_LED(76, "green", "2ghz", 0, LEDS_GPIO_DEFSTATE_OFF), 430 }; 431 432 static const struct gpio_led 433 bcm47xx_leds_luxul_xbr_4400_v1[] __initconst = { 434 BCM47XX_GPIO_LED(12, "green", "usb", 0, LEDS_GPIO_DEFSTATE_OFF), 435 BCM47XX_GPIO_LED_TRIGGER(15, "green", "status", 0, "timer"), 436 }; 437 438 static const struct gpio_led 439 bcm47xx_leds_luxul_xvw_p30_v1[] __initconst = { 440 BCM47XX_GPIO_LED_TRIGGER(0, "blue", "status", 1, "timer"), 441 BCM47XX_GPIO_LED(1, "green", "link", 1, LEDS_GPIO_DEFSTATE_OFF), 442 }; 443 444 static const struct gpio_led 445 bcm47xx_leds_luxul_xwr_600_v1[] __initconst = { 446 BCM47XX_GPIO_LED(3, "green", "wps", 0, LEDS_GPIO_DEFSTATE_OFF), 447 BCM47XX_GPIO_LED_TRIGGER(6, "green", "status", 1, "timer"), 448 BCM47XX_GPIO_LED(9, "green", "usb", 0, LEDS_GPIO_DEFSTATE_OFF), 449 }; 450 451 static const struct gpio_led 452 bcm47xx_leds_luxul_xwr_1750_v1[] __initconst = { 453 BCM47XX_GPIO_LED(5, "green", "5ghz", 0, LEDS_GPIO_DEFSTATE_OFF), 454 BCM47XX_GPIO_LED(12, "green", "usb", 0, LEDS_GPIO_DEFSTATE_OFF), 455 BCM47XX_GPIO_LED_TRIGGER(13, "green", "status", 0, "timer"), 456 BCM47XX_GPIO_LED(15, "green", "wps", 0, LEDS_GPIO_DEFSTATE_OFF), 457 }; 458 459 static const struct gpio_led 460 bcm47xx_leds_luxul_xwr1750_v1_extra[] __initconst = { 461 BCM47XX_GPIO_LED(76, "green", "2ghz", 0, LEDS_GPIO_DEFSTATE_OFF), 462 }; 463 464 /* Microsoft */ 465 466 static const struct gpio_led 467 bcm47xx_leds_microsoft_nm700[] __initconst = { 468 BCM47XX_GPIO_LED(6, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON), 469 }; 470 471 /* Motorola */ 472 473 static const struct gpio_led 474 bcm47xx_leds_motorola_we800g[] __initconst = { 475 BCM47XX_GPIO_LED(1, "amber", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF), 476 BCM47XX_GPIO_LED(2, "unk", "unk", 1, LEDS_GPIO_DEFSTATE_OFF), /* There are only 3 LEDs: Power, Wireless and Device (ethernet) */ 477 BCM47XX_GPIO_LED(4, "green", "power", 0, LEDS_GPIO_DEFSTATE_ON), 478 }; 479 480 static const struct gpio_led 481 bcm47xx_leds_motorola_wr850gp[] __initconst = { 482 BCM47XX_GPIO_LED(0, "unk", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF), 483 BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON), 484 BCM47XX_GPIO_LED(6, "unk", "dmz", 1, LEDS_GPIO_DEFSTATE_OFF), 485 BCM47XX_GPIO_LED(7, "unk", "diag", 1, LEDS_GPIO_DEFSTATE_OFF), 486 }; 487 488 static const struct gpio_led 489 bcm47xx_leds_motorola_wr850gv2v3[] __initconst = { 490 BCM47XX_GPIO_LED(0, "unk", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF), 491 BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON), 492 BCM47XX_GPIO_LED(7, "unk", "diag", 1, LEDS_GPIO_DEFSTATE_OFF), 493 }; 494 495 /* Netgear */ 496 497 static const struct gpio_led 498 bcm47xx_leds_netgear_wndr3400v1[] __initconst = { 499 BCM47XX_GPIO_LED(2, "green", "usb", 1, LEDS_GPIO_DEFSTATE_OFF), 500 BCM47XX_GPIO_LED(3, "green", "power", 0, LEDS_GPIO_DEFSTATE_ON), 501 BCM47XX_GPIO_LED(7, "amber", "power", 0, LEDS_GPIO_DEFSTATE_OFF), 502 }; 503 504 static const struct gpio_led 505 bcm47xx_leds_netgear_wndr4500v1[] __initconst = { 506 BCM47XX_GPIO_LED(1, "green", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), 507 BCM47XX_GPIO_LED(2, "green", "power", 1, LEDS_GPIO_DEFSTATE_ON), 508 BCM47XX_GPIO_LED(3, "amber", "power", 1, LEDS_GPIO_DEFSTATE_OFF), 509 BCM47XX_GPIO_LED(8, "green", "usb1", 1, LEDS_GPIO_DEFSTATE_OFF), 510 BCM47XX_GPIO_LED(9, "green", "2ghz", 1, LEDS_GPIO_DEFSTATE_OFF), 511 BCM47XX_GPIO_LED(11, "blue", "5ghz", 1, LEDS_GPIO_DEFSTATE_OFF), 512 BCM47XX_GPIO_LED(14, "green", "usb2", 1, LEDS_GPIO_DEFSTATE_OFF), 513 }; 514 515 static const struct gpio_led 516 bcm47xx_leds_netgear_wnr1000_v3[] __initconst = { 517 BCM47XX_GPIO_LED(0, "blue", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF), 518 BCM47XX_GPIO_LED(1, "green", "wps", 0, LEDS_GPIO_DEFSTATE_OFF), 519 }; 520 521 static const struct gpio_led 522 bcm47xx_leds_netgear_wnr3500lv1[] __initconst = { 523 BCM47XX_GPIO_LED(0, "blue", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF), 524 BCM47XX_GPIO_LED(1, "green", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), 525 BCM47XX_GPIO_LED(2, "green", "wan", 1, LEDS_GPIO_DEFSTATE_OFF), 526 BCM47XX_GPIO_LED(3, "green", "power", 0, LEDS_GPIO_DEFSTATE_ON), 527 BCM47XX_GPIO_LED(7, "amber", "power", 0, LEDS_GPIO_DEFSTATE_OFF), 528 }; 529 530 static const struct gpio_led 531 bcm47xx_leds_netgear_wnr834bv2[] __initconst = { 532 BCM47XX_GPIO_LED(2, "green", "power", 0, LEDS_GPIO_DEFSTATE_ON), 533 BCM47XX_GPIO_LED(3, "amber", "power", 0, LEDS_GPIO_DEFSTATE_OFF), 534 BCM47XX_GPIO_LED(7, "unk", "connected", 0, LEDS_GPIO_DEFSTATE_OFF), 535 }; 536 537 /* Siemens */ 538 static const struct gpio_led 539 bcm47xx_leds_siemens_se505v2[] __initconst = { 540 BCM47XX_GPIO_LED(0, "unk", "dmz", 1, LEDS_GPIO_DEFSTATE_OFF), 541 BCM47XX_GPIO_LED(3, "unk", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF), 542 BCM47XX_GPIO_LED(5, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON), 543 }; 544 545 /* SimpleTech */ 546 547 static const struct gpio_led 548 bcm47xx_leds_simpletech_simpleshare[] __initconst = { 549 BCM47XX_GPIO_LED(1, "unk", "status", 1, LEDS_GPIO_DEFSTATE_OFF), /* "Ready" LED */ 550 }; 551 552 /************************************************** 553 * Init 554 **************************************************/ 555 556 static struct gpio_led_platform_data bcm47xx_leds_pdata __initdata; 557 558 #define bcm47xx_set_pdata(dev_leds) do { \ 559 bcm47xx_leds_pdata.leds = dev_leds; \ 560 bcm47xx_leds_pdata.num_leds = ARRAY_SIZE(dev_leds); \ 561 } while (0) 562 563 static struct gpio_led_platform_data bcm47xx_leds_pdata_extra __initdata = {}; 564 #define bcm47xx_set_pdata_extra(dev_leds) do { \ 565 bcm47xx_leds_pdata_extra.leds = dev_leds; \ 566 bcm47xx_leds_pdata_extra.num_leds = ARRAY_SIZE(dev_leds); \ 567 } while (0) 568 569 void __init bcm47xx_leds_register(void) 570 { 571 enum bcm47xx_board board = bcm47xx_board_get(); 572 573 switch (board) { 574 case BCM47XX_BOARD_ASUS_RTN10U: 575 bcm47xx_set_pdata(bcm47xx_leds_asus_rtn10u); 576 break; 577 case BCM47XX_BOARD_ASUS_RTN12: 578 bcm47xx_set_pdata(bcm47xx_leds_asus_rtn12); 579 break; 580 case BCM47XX_BOARD_ASUS_RTN15U: 581 bcm47xx_set_pdata(bcm47xx_leds_asus_rtn15u); 582 break; 583 case BCM47XX_BOARD_ASUS_RTN16: 584 bcm47xx_set_pdata(bcm47xx_leds_asus_rtn16); 585 break; 586 case BCM47XX_BOARD_ASUS_RTN66U: 587 bcm47xx_set_pdata(bcm47xx_leds_asus_rtn66u); 588 break; 589 case BCM47XX_BOARD_ASUS_WL300G: 590 bcm47xx_set_pdata(bcm47xx_leds_asus_wl300g); 591 break; 592 case BCM47XX_BOARD_ASUS_WL320GE: 593 bcm47xx_set_pdata(bcm47xx_leds_asus_wl320ge); 594 break; 595 case BCM47XX_BOARD_ASUS_WL330GE: 596 bcm47xx_set_pdata(bcm47xx_leds_asus_wl330ge); 597 break; 598 case BCM47XX_BOARD_ASUS_WL500G: 599 bcm47xx_set_pdata(bcm47xx_leds_asus_wl500g); 600 break; 601 case BCM47XX_BOARD_ASUS_WL500GD: 602 bcm47xx_set_pdata(bcm47xx_leds_asus_wl500gd); 603 break; 604 case BCM47XX_BOARD_ASUS_WL500GPV1: 605 bcm47xx_set_pdata(bcm47xx_leds_asus_wl500gpv1); 606 break; 607 case BCM47XX_BOARD_ASUS_WL500GPV2: 608 bcm47xx_set_pdata(bcm47xx_leds_asus_wl500gpv2); 609 break; 610 case BCM47XX_BOARD_ASUS_WL500W: 611 bcm47xx_set_pdata(bcm47xx_leds_asus_wl500w); 612 break; 613 case BCM47XX_BOARD_ASUS_WL520GC: 614 bcm47xx_set_pdata(bcm47xx_leds_asus_wl520gc); 615 break; 616 case BCM47XX_BOARD_ASUS_WL520GU: 617 bcm47xx_set_pdata(bcm47xx_leds_asus_wl520gu); 618 break; 619 case BCM47XX_BOARD_ASUS_WL700GE: 620 bcm47xx_set_pdata(bcm47xx_leds_asus_wl700ge); 621 break; 622 case BCM47XX_BOARD_ASUS_WLHDD: 623 bcm47xx_set_pdata(bcm47xx_leds_asus_wlhdd); 624 break; 625 626 case BCM47XX_BOARD_BELKIN_F7D3301: 627 case BCM47XX_BOARD_BELKIN_F7D3302: 628 case BCM47XX_BOARD_BELKIN_F7D4301: 629 case BCM47XX_BOARD_BELKIN_F7D4302: 630 case BCM47XX_BOARD_BELKIN_F7D4401: 631 bcm47xx_set_pdata(bcm47xx_leds_belkin_f7d4301); 632 break; 633 634 case BCM47XX_BOARD_BUFFALO_WHR2_A54G54: 635 bcm47xx_set_pdata(bcm47xx_leds_buffalo_whr2_a54g54); 636 break; 637 case BCM47XX_BOARD_BUFFALO_WHR_G125: 638 bcm47xx_set_pdata(bcm47xx_leds_buffalo_whr_g125); 639 break; 640 case BCM47XX_BOARD_BUFFALO_WHR_G54S: 641 bcm47xx_set_pdata(bcm47xx_leds_buffalo_whr_g54s); 642 break; 643 case BCM47XX_BOARD_BUFFALO_WHR_HP_G54: 644 bcm47xx_set_pdata(bcm47xx_leds_buffalo_whr_hp_g54); 645 break; 646 case BCM47XX_BOARD_BUFFALO_WZR_G300N: 647 bcm47xx_set_pdata(bcm47xx_leds_buffalo_wzr_g300n); 648 break; 649 case BCM47XX_BOARD_BUFFALO_WZR_RS_G54: 650 bcm47xx_set_pdata(bcm47xx_leds_buffalo_wzr_rs_g54); 651 break; 652 case BCM47XX_BOARD_BUFFALO_WZR_RS_G54HP: 653 bcm47xx_set_pdata(bcm47xx_leds_buffalo_wzr_rs_g54hp); 654 break; 655 656 case BCM47XX_BOARD_DELL_TM2300: 657 bcm47xx_set_pdata(bcm47xx_leds_dell_tm2300); 658 break; 659 660 case BCM47XX_BOARD_DLINK_DIR130: 661 bcm47xx_set_pdata(bcm47xx_leds_dlink_dir130); 662 break; 663 case BCM47XX_BOARD_DLINK_DIR330: 664 bcm47xx_set_pdata(bcm47xx_leds_dlink_dir330); 665 break; 666 667 case BCM47XX_BOARD_HUAWEI_E970: 668 bcm47xx_set_pdata(bcm47xx_leds_huawei_e970); 669 break; 670 671 case BCM47XX_BOARD_LINKSYS_E1000V1: 672 bcm47xx_set_pdata(bcm47xx_leds_linksys_e1000v1); 673 break; 674 case BCM47XX_BOARD_LINKSYS_E1000V21: 675 bcm47xx_set_pdata(bcm47xx_leds_linksys_e1000v21); 676 break; 677 case BCM47XX_BOARD_LINKSYS_E2000V1: 678 bcm47xx_set_pdata(bcm47xx_leds_linksys_e2000v1); 679 break; 680 case BCM47XX_BOARD_LINKSYS_E3000V1: 681 bcm47xx_set_pdata(bcm47xx_leds_linksys_e3000v1); 682 break; 683 case BCM47XX_BOARD_LINKSYS_E3200V1: 684 bcm47xx_set_pdata(bcm47xx_leds_linksys_e3200v1); 685 break; 686 case BCM47XX_BOARD_LINKSYS_E4200V1: 687 bcm47xx_set_pdata(bcm47xx_leds_linksys_e4200v1); 688 break; 689 case BCM47XX_BOARD_LINKSYS_WRT150NV1: 690 bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt150nv1); 691 break; 692 case BCM47XX_BOARD_LINKSYS_WRT150NV11: 693 bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt150nv11); 694 break; 695 case BCM47XX_BOARD_LINKSYS_WRT160NV1: 696 bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt160nv1); 697 break; 698 case BCM47XX_BOARD_LINKSYS_WRT160NV3: 699 bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt160nv3); 700 break; 701 case BCM47XX_BOARD_LINKSYS_WRT300N_V1: 702 bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt300n_v1); 703 break; 704 case BCM47XX_BOARD_LINKSYS_WRT300NV11: 705 bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt300nv11); 706 break; 707 case BCM47XX_BOARD_LINKSYS_WRT310NV1: 708 bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt310nv1); 709 break; 710 case BCM47XX_BOARD_LINKSYS_WRT320N_V1: 711 bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt320n_v1); 712 break; 713 case BCM47XX_BOARD_LINKSYS_WRT54G3GV2: 714 bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt54g3gv2); 715 break; 716 case BCM47XX_BOARD_LINKSYS_WRT54G_TYPE_0101: 717 bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt54g_type_0101); 718 break; 719 case BCM47XX_BOARD_LINKSYS_WRT54G_TYPE_0467: 720 bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt54g_type_0467); 721 break; 722 case BCM47XX_BOARD_LINKSYS_WRT54G_TYPE_0708: 723 bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt54g_generic); 724 break; 725 case BCM47XX_BOARD_LINKSYS_WRT610NV1: 726 bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt610nv1); 727 break; 728 case BCM47XX_BOARD_LINKSYS_WRT610NV2: 729 bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt610nv2); 730 break; 731 case BCM47XX_BOARD_LINKSYS_WRTSL54GS: 732 bcm47xx_set_pdata(bcm47xx_leds_linksys_wrtsl54gs); 733 break; 734 735 case BCM47XX_BOARD_LUXUL_ABR_4400_V1: 736 bcm47xx_set_pdata(bcm47xx_leds_luxul_abr_4400_v1); 737 break; 738 case BCM47XX_BOARD_LUXUL_XAP_310_V1: 739 bcm47xx_set_pdata(bcm47xx_leds_luxul_xap_310_v1); 740 break; 741 case BCM47XX_BOARD_LUXUL_XAP_1210_V1: 742 bcm47xx_set_pdata(bcm47xx_leds_luxul_xap_1210_v1); 743 break; 744 case BCM47XX_BOARD_LUXUL_XAP_1230_V1: 745 bcm47xx_set_pdata(bcm47xx_leds_luxul_xap_1230_v1); 746 break; 747 case BCM47XX_BOARD_LUXUL_XAP_1240_V1: 748 bcm47xx_set_pdata(bcm47xx_leds_luxul_xap_1240_v1); 749 break; 750 case BCM47XX_BOARD_LUXUL_XAP_1500_V1: 751 bcm47xx_set_pdata(bcm47xx_leds_luxul_xap_1500_v1); 752 bcm47xx_set_pdata_extra(bcm47xx_leds_luxul_xap1500_v1_extra); 753 break; 754 case BCM47XX_BOARD_LUXUL_XBR_4400_V1: 755 bcm47xx_set_pdata(bcm47xx_leds_luxul_xbr_4400_v1); 756 break; 757 case BCM47XX_BOARD_LUXUL_XVW_P30_V1: 758 bcm47xx_set_pdata(bcm47xx_leds_luxul_xvw_p30_v1); 759 break; 760 case BCM47XX_BOARD_LUXUL_XWR_600_V1: 761 bcm47xx_set_pdata(bcm47xx_leds_luxul_xwr_600_v1); 762 break; 763 case BCM47XX_BOARD_LUXUL_XWR_1750_V1: 764 bcm47xx_set_pdata(bcm47xx_leds_luxul_xwr_1750_v1); 765 bcm47xx_set_pdata_extra(bcm47xx_leds_luxul_xwr1750_v1_extra); 766 break; 767 768 case BCM47XX_BOARD_MICROSOFT_MN700: 769 bcm47xx_set_pdata(bcm47xx_leds_microsoft_nm700); 770 break; 771 772 case BCM47XX_BOARD_MOTOROLA_WE800G: 773 bcm47xx_set_pdata(bcm47xx_leds_motorola_we800g); 774 break; 775 case BCM47XX_BOARD_MOTOROLA_WR850GP: 776 bcm47xx_set_pdata(bcm47xx_leds_motorola_wr850gp); 777 break; 778 case BCM47XX_BOARD_MOTOROLA_WR850GV2V3: 779 bcm47xx_set_pdata(bcm47xx_leds_motorola_wr850gv2v3); 780 break; 781 782 case BCM47XX_BOARD_NETGEAR_WNDR3400V1: 783 bcm47xx_set_pdata(bcm47xx_leds_netgear_wndr3400v1); 784 break; 785 case BCM47XX_BOARD_NETGEAR_WNDR4500V1: 786 bcm47xx_set_pdata(bcm47xx_leds_netgear_wndr4500v1); 787 break; 788 case BCM47XX_BOARD_NETGEAR_WNR1000_V3: 789 bcm47xx_set_pdata(bcm47xx_leds_netgear_wnr1000_v3); 790 break; 791 case BCM47XX_BOARD_NETGEAR_WNR3500L: 792 bcm47xx_set_pdata(bcm47xx_leds_netgear_wnr3500lv1); 793 break; 794 case BCM47XX_BOARD_NETGEAR_WNR834BV2: 795 bcm47xx_set_pdata(bcm47xx_leds_netgear_wnr834bv2); 796 break; 797 798 case BCM47XX_BOARD_SIEMENS_SE505V2: 799 bcm47xx_set_pdata(bcm47xx_leds_siemens_se505v2); 800 break; 801 802 case BCM47XX_BOARD_SIMPLETECH_SIMPLESHARE: 803 bcm47xx_set_pdata(bcm47xx_leds_simpletech_simpleshare); 804 break; 805 806 default: 807 pr_debug("No LEDs configuration found for this device\n"); 808 return; 809 } 810 811 gpio_led_register_device(-1, &bcm47xx_leds_pdata); 812 if (bcm47xx_leds_pdata_extra.num_leds) 813 gpio_led_register_device(0, &bcm47xx_leds_pdata_extra); 814 } 815