led 623 arch/arm/mach-davinci/board-dm365-evm.c struct cpld_led *led = container_of(cdev, struct cpld_led, cdev); led 627 arch/arm/mach-davinci/board-dm365-evm.c reg &= ~led->mask; led 629 arch/arm/mach-davinci/board-dm365-evm.c reg |= led->mask; led 635 arch/arm/mach-davinci/board-dm365-evm.c struct cpld_led *led = container_of(cdev, struct cpld_led, cdev); led 638 arch/arm/mach-davinci/board-dm365-evm.c return (reg & led->mask) ? LED_OFF : LED_FULL; led 651 arch/arm/mach-davinci/board-dm365-evm.c struct cpld_led *led; led 653 arch/arm/mach-davinci/board-dm365-evm.c led = kzalloc(sizeof(*led), GFP_KERNEL); led 654 arch/arm/mach-davinci/board-dm365-evm.c if (!led) led 657 arch/arm/mach-davinci/board-dm365-evm.c led->cdev.name = cpld_leds[i].name; led 658 arch/arm/mach-davinci/board-dm365-evm.c led->cdev.brightness_set = cpld_led_set; led 659 arch/arm/mach-davinci/board-dm365-evm.c led->cdev.brightness_get = cpld_led_get; led 660 arch/arm/mach-davinci/board-dm365-evm.c led->cdev.default_trigger = cpld_leds[i].trigger; led 661 arch/arm/mach-davinci/board-dm365-evm.c led->mask = BIT(i); led 663 arch/arm/mach-davinci/board-dm365-evm.c if (led_classdev_register(NULL, &led->cdev) < 0) { led 664 arch/arm/mach-davinci/board-dm365-evm.c kfree(led); led 51 arch/arm/mach-footbridge/ebsa285.c struct ebsa285_led *led = container_of(cdev, led 55 arch/arm/mach-footbridge/ebsa285.c hw_led_state |= led->mask; led 57 arch/arm/mach-footbridge/ebsa285.c hw_led_state &= ~led->mask; led 63 arch/arm/mach-footbridge/ebsa285.c struct ebsa285_led *led = container_of(cdev, led 66 arch/arm/mach-footbridge/ebsa285.c return hw_led_state & led->mask ? LED_OFF : LED_FULL; led 85 arch/arm/mach-footbridge/ebsa285.c struct ebsa285_led *led; led 87 arch/arm/mach-footbridge/ebsa285.c led = kzalloc(sizeof(*led), GFP_KERNEL); led 88 arch/arm/mach-footbridge/ebsa285.c if (!led) led 91 arch/arm/mach-footbridge/ebsa285.c led->cdev.name = ebsa285_leds[i].name; led 92 arch/arm/mach-footbridge/ebsa285.c led->cdev.brightness_set = ebsa285_led_set; led 93 arch/arm/mach-footbridge/ebsa285.c led->cdev.brightness_get = ebsa285_led_get; led 94 arch/arm/mach-footbridge/ebsa285.c led->cdev.default_trigger = ebsa285_leds[i].trigger; led 95 arch/arm/mach-footbridge/ebsa285.c led->mask = BIT(i); led 97 arch/arm/mach-footbridge/ebsa285.c if (led_classdev_register(NULL, &led->cdev) < 0) { led 98 arch/arm/mach-footbridge/ebsa285.c kfree(led); led 691 arch/arm/mach-footbridge/netwinder-hw.c struct netwinder_led *led = container_of(cdev, led 699 arch/arm/mach-footbridge/netwinder-hw.c reg &= ~led->mask; led 701 arch/arm/mach-footbridge/netwinder-hw.c reg |= led->mask; led 702 arch/arm/mach-footbridge/netwinder-hw.c nw_gpio_modify_op(led->mask, reg); led 708 arch/arm/mach-footbridge/netwinder-hw.c struct netwinder_led *led = container_of(cdev, led 717 arch/arm/mach-footbridge/netwinder-hw.c return (reg & led->mask) ? LED_OFF : LED_FULL; led 728 arch/arm/mach-footbridge/netwinder-hw.c struct netwinder_led *led; led 730 arch/arm/mach-footbridge/netwinder-hw.c led = kzalloc(sizeof(*led), GFP_KERNEL); led 731 arch/arm/mach-footbridge/netwinder-hw.c if (!led) led 734 arch/arm/mach-footbridge/netwinder-hw.c led->cdev.name = netwinder_leds[i].name; led 735 arch/arm/mach-footbridge/netwinder-hw.c led->cdev.brightness_set = netwinder_led_set; led 736 arch/arm/mach-footbridge/netwinder-hw.c led->cdev.brightness_get = netwinder_led_get; led 737 arch/arm/mach-footbridge/netwinder-hw.c led->cdev.default_trigger = netwinder_leds[i].trigger; led 740 arch/arm/mach-footbridge/netwinder-hw.c led->mask = GPIO_GREEN_LED; led 742 arch/arm/mach-footbridge/netwinder-hw.c led->mask = GPIO_RED_LED; led 744 arch/arm/mach-footbridge/netwinder-hw.c if (led_classdev_register(NULL, &led->cdev) < 0) { led 745 arch/arm/mach-footbridge/netwinder-hw.c kfree(led); led 238 arch/arm/mach-imx/mach-mx31moboard.c .led = moboard_led, led 1157 arch/arm/mach-pxa/em-x270.c DA9030_SUBDEV(led, LED_PC, &em_x270_led_info), led 218 arch/arm/mach-pxa/idp.c struct idp_led *led = container_of(cdev, led 223 arch/arm/mach-pxa/idp.c reg &= ~led->mask; led 225 arch/arm/mach-pxa/idp.c reg |= led->mask; led 232 arch/arm/mach-pxa/idp.c struct idp_led *led = container_of(cdev, led 235 arch/arm/mach-pxa/idp.c return (IDP_CPLD_LED_CONTROL & led->mask) ? LED_OFF : LED_FULL; led 246 arch/arm/mach-pxa/idp.c struct idp_led *led; led 248 arch/arm/mach-pxa/idp.c led = kzalloc(sizeof(*led), GFP_KERNEL); led 249 arch/arm/mach-pxa/idp.c if (!led) led 252 arch/arm/mach-pxa/idp.c led->cdev.name = idp_leds[i].name; led 253 arch/arm/mach-pxa/idp.c led->cdev.brightness_set = idp_led_set; led 254 arch/arm/mach-pxa/idp.c led->cdev.brightness_get = idp_led_get; led 255 arch/arm/mach-pxa/idp.c led->cdev.default_trigger = idp_leds[i].trigger; led 258 arch/arm/mach-pxa/idp.c led->mask = IDP_HB_LED; led 260 arch/arm/mach-pxa/idp.c led->mask = IDP_BUSY_LED; led 262 arch/arm/mach-pxa/idp.c if (led_classdev_register(NULL, &led->cdev) < 0) { led 263 arch/arm/mach-pxa/idp.c kfree(led); led 569 arch/arm/mach-pxa/lubbock.c struct lubbock_led *led = container_of(cdev, led 574 arch/arm/mach-pxa/lubbock.c reg |= led->mask; led 576 arch/arm/mach-pxa/lubbock.c reg &= ~led->mask; led 583 arch/arm/mach-pxa/lubbock.c struct lubbock_led *led = container_of(cdev, led 587 arch/arm/mach-pxa/lubbock.c return (reg & led->mask) ? LED_FULL : LED_OFF; led 600 arch/arm/mach-pxa/lubbock.c struct lubbock_led *led; led 602 arch/arm/mach-pxa/lubbock.c led = kzalloc(sizeof(*led), GFP_KERNEL); led 603 arch/arm/mach-pxa/lubbock.c if (!led) led 606 arch/arm/mach-pxa/lubbock.c led->cdev.name = lubbock_leds[i].name; led 607 arch/arm/mach-pxa/lubbock.c led->cdev.brightness_set = lubbock_led_set; led 608 arch/arm/mach-pxa/lubbock.c led->cdev.brightness_get = lubbock_led_get; led 609 arch/arm/mach-pxa/lubbock.c led->cdev.default_trigger = lubbock_leds[i].trigger; led 610 arch/arm/mach-pxa/lubbock.c led->mask = BIT(i); led 612 arch/arm/mach-pxa/lubbock.c if (led_classdev_register(NULL, &led->cdev) < 0) { led 613 arch/arm/mach-pxa/lubbock.c kfree(led); led 657 arch/arm/mach-pxa/mainstone.c struct mainstone_led *led = container_of(cdev, led 662 arch/arm/mach-pxa/mainstone.c reg |= led->mask; led 664 arch/arm/mach-pxa/mainstone.c reg &= ~led->mask; led 671 arch/arm/mach-pxa/mainstone.c struct mainstone_led *led = container_of(cdev, led 675 arch/arm/mach-pxa/mainstone.c return (reg & led->mask) ? LED_FULL : LED_OFF; led 688 arch/arm/mach-pxa/mainstone.c struct mainstone_led *led; led 690 arch/arm/mach-pxa/mainstone.c led = kzalloc(sizeof(*led), GFP_KERNEL); led 691 arch/arm/mach-pxa/mainstone.c if (!led) led 694 arch/arm/mach-pxa/mainstone.c led->cdev.name = mainstone_leds[i].name; led 695 arch/arm/mach-pxa/mainstone.c led->cdev.brightness_set = mainstone_led_set; led 696 arch/arm/mach-pxa/mainstone.c led->cdev.brightness_get = mainstone_led_get; led 697 arch/arm/mach-pxa/mainstone.c led->cdev.default_trigger = mainstone_leds[i].trigger; led 698 arch/arm/mach-pxa/mainstone.c led->mask = BIT(i); led 700 arch/arm/mach-pxa/mainstone.c if (led_classdev_register(NULL, &led->cdev) < 0) { led 701 arch/arm/mach-pxa/mainstone.c kfree(led); led 84 arch/arm/mach-s3c24xx/mach-gta02.c char led; led 86 arch/arm/mach-s3c24xx/mach-gta02.c led = (state) ? 1 : 0; led 87 arch/arm/mach-s3c24xx/mach-gta02.c gpio_direction_output(GTA02_GPIO_AUX_LED, led); led 82 arch/arm/plat-omap/debug-leds.c struct dbg_led *led = container_of(cdev, struct dbg_led, cdev); led 87 arch/arm/plat-omap/debug-leds.c reg |= led->mask; led 89 arch/arm/plat-omap/debug-leds.c reg &= ~led->mask; led 95 arch/arm/plat-omap/debug-leds.c struct dbg_led *led = container_of(cdev, struct dbg_led, cdev); led 99 arch/arm/plat-omap/debug-leds.c return (reg & led->mask) ? LED_FULL : LED_OFF; led 115 arch/arm/plat-omap/debug-leds.c struct dbg_led *led; led 117 arch/arm/plat-omap/debug-leds.c led = kzalloc(sizeof(*led), GFP_KERNEL); led 118 arch/arm/plat-omap/debug-leds.c if (!led) led 121 arch/arm/plat-omap/debug-leds.c led->cdev.name = dbg_leds[i].name; led 122 arch/arm/plat-omap/debug-leds.c led->cdev.brightness_set = dbg_led_set; led 123 arch/arm/plat-omap/debug-leds.c led->cdev.brightness_get = dbg_led_get; led 124 arch/arm/plat-omap/debug-leds.c led->cdev.default_trigger = dbg_leds[i].trigger; led 125 arch/arm/plat-omap/debug-leds.c led->mask = BIT(i); led 127 arch/arm/plat-omap/debug-leds.c if (led_classdev_register(NULL, &led->cdev) < 0) { led 128 arch/arm/plat-omap/debug-leds.c kfree(led); led 242 arch/mips/alchemy/devboards/db1000.c static void db1100_mmcled_set(struct led_classdev *led, enum led_brightness b) led 280 arch/mips/alchemy/devboards/db1000.c static void db1100_mmc1led_set(struct led_classdev *led, enum led_brightness b) led 298 arch/mips/alchemy/devboards/db1000.c .led = &db1100_mmc_led, led 305 arch/mips/alchemy/devboards/db1000.c .led = &db1100_mmc1_led, led 411 arch/mips/alchemy/devboards/db1200.c static void db1200_mmcled_set(struct led_classdev *led, led 483 arch/mips/alchemy/devboards/db1200.c static void pb1200_mmc1led_set(struct led_classdev *led, led 522 arch/mips/alchemy/devboards/db1200.c .led = &db1200_mmc_led, led 529 arch/mips/alchemy/devboards/db1200.c .led = &pb1200_mmc1_led, led 522 arch/mips/alchemy/devboards/db1300.c static void db1300_mmcled_set(struct led_classdev *led, led 539 arch/mips/alchemy/devboards/db1300.c .led = &db1300_mmc_led, led 589 arch/mips/alchemy/devboards/db1300.c static void db1300_movinand_led_set(struct led_classdev *led, led 605 arch/mips/alchemy/devboards/db1300.c .led = &db1300_movinand_led, led 1034 arch/mips/cavium-octeon/octeon-platform.c int led = fdt_path_offset(initial_boot_params, alias_prop); led 1058 arch/mips/cavium-octeon/octeon-platform.c fdt_setprop_inplace(initial_boot_params, led, led 1061 arch/mips/cavium-octeon/octeon-platform.c bootbus = fdt_parent_offset(initial_boot_params, led); led 1074 arch/mips/cavium-octeon/octeon-platform.c fdt_nop_node(initial_boot_params, led); led 48 arch/mips/include/asm/mach-au1x00/au1100_mmc.h struct led_classdev *led; led 77 arch/mips/sgi-ip32/ip32-reset.c unsigned long led = mace->perif.ctrl.misc ^ MACEISA_LED_RED; led 78 arch/mips/sgi-ip32/ip32-reset.c mace->perif.ctrl.misc = led; led 114 arch/mips/sgi-ip32/ip32-reset.c unsigned long led; led 121 arch/mips/sgi-ip32/ip32-reset.c led = mace->perif.ctrl.misc | MACEISA_LED_GREEN; led 122 arch/mips/sgi-ip32/ip32-reset.c mace->perif.ctrl.misc = led; led 137 arch/mips/sgi-ip32/ip32-reset.c unsigned long led = mace->perif.ctrl.misc; led 138 arch/mips/sgi-ip32/ip32-reset.c led |= MACEISA_LED_RED; led 139 arch/mips/sgi-ip32/ip32-reset.c led &= ~MACEISA_LED_GREEN; led 140 arch/mips/sgi-ip32/ip32-reset.c mace->perif.ctrl.misc = led; led 757 arch/mips/txx9/generic/setup.c struct gpio_led *led = &iocled->leds[i]; led 760 arch/mips/txx9/generic/setup.c led->name = iocled->names[i]; led 761 arch/mips/txx9/generic/setup.c led->gpio = basenum + i; led 762 arch/mips/txx9/generic/setup.c led->active_low = lowactive; led 764 arch/mips/txx9/generic/setup.c led->default_trigger = *deftriggers++; led 116 arch/sparc/kernel/led.c static struct proc_dir_entry *led; led 124 arch/sparc/kernel/led.c led = proc_create("led", 0, NULL, &led_proc_fops); led 125 arch/sparc/kernel/led.c if (!led) led 149 drivers/block/umem.c unsigned char led; led 151 drivers/block/umem.c led = readb(card->csr_remap + MEMCTRLCMD_LEDCTRL); led 152 drivers/block/umem.c return led & bit; led 157 drivers/block/umem.c unsigned char led; led 159 drivers/block/umem.c led = readb(card->csr_remap + MEMCTRLCMD_LEDCTRL); led 161 drivers/block/umem.c led |= bit; led 163 drivers/block/umem.c led &= ~bit; led 164 drivers/block/umem.c writeb(led, card->csr_remap + MEMCTRLCMD_LEDCTRL); led 174 drivers/block/umem.c unsigned char led; led 176 drivers/block/umem.c led = readb(card->csr_remap + MEMCTRLCMD_LEDCTRL); led 178 drivers/block/umem.c led ^= (1<<shift); led 180 drivers/block/umem.c led &= ~(0x03 << shift); led 181 drivers/block/umem.c led |= (state << shift); led 183 drivers/block/umem.c writeb(led, card->csr_remap + MEMCTRLCMD_LEDCTRL); led 121 drivers/gpio/gpio-twl4030.c static void twl4030_led_set_value(int led, int value) led 125 drivers/gpio/gpio-twl4030.c if (led) led 209 drivers/gpu/drm/nouveau/nouveau_drv.h struct nouveau_led *led; led 37 drivers/gpu/drm/nouveau/nouveau_led.c nouveau_led_get_brightness(struct led_classdev *led) led 39 drivers/gpu/drm/nouveau/nouveau_led.c struct drm_device *drm_dev = container_of(led, struct nouveau_led, led)->dev; led 54 drivers/gpu/drm/nouveau/nouveau_led.c nouveau_led_set_brightness(struct led_classdev *led, enum led_brightness value) led 56 drivers/gpu/drm/nouveau/nouveau_led.c struct drm_device *drm_dev = container_of(led, struct nouveau_led, led)->dev; led 92 drivers/gpu/drm/nouveau/nouveau_led.c drm->led = kzalloc(sizeof(*drm->led), GFP_KERNEL); led 93 drivers/gpu/drm/nouveau/nouveau_led.c if (!drm->led) led 95 drivers/gpu/drm/nouveau/nouveau_led.c drm->led->dev = dev; led 97 drivers/gpu/drm/nouveau/nouveau_led.c drm->led->led.name = "nvidia-logo"; led 98 drivers/gpu/drm/nouveau/nouveau_led.c drm->led->led.max_brightness = 255; led 99 drivers/gpu/drm/nouveau/nouveau_led.c drm->led->led.brightness_get = nouveau_led_get_brightness; led 100 drivers/gpu/drm/nouveau/nouveau_led.c drm->led->led.brightness_set = nouveau_led_set_brightness; led 102 drivers/gpu/drm/nouveau/nouveau_led.c ret = led_classdev_register(dev->dev, &drm->led->led); led 104 drivers/gpu/drm/nouveau/nouveau_led.c kfree(drm->led); led 105 drivers/gpu/drm/nouveau/nouveau_led.c drm->led = NULL; led 117 drivers/gpu/drm/nouveau/nouveau_led.c if (drm->led) led 118 drivers/gpu/drm/nouveau/nouveau_led.c led_classdev_suspend(&drm->led->led); led 126 drivers/gpu/drm/nouveau/nouveau_led.c if (drm->led) led 127 drivers/gpu/drm/nouveau/nouveau_led.c led_classdev_resume(&drm->led->led); led 135 drivers/gpu/drm/nouveau/nouveau_led.c if (drm->led) { led 136 drivers/gpu/drm/nouveau/nouveau_led.c led_classdev_unregister(&drm->led->led); led 137 drivers/gpu/drm/nouveau/nouveau_led.c kfree(drm->led); led 138 drivers/gpu/drm/nouveau/nouveau_led.c drm->led = NULL; led 35 drivers/gpu/drm/nouveau/nouveau_led.h struct led_classdev led; led 41 drivers/gpu/drm/nouveau/nouveau_led.h return nouveau_drm(dev)->led; led 235 drivers/hid/hid-apple.c test_bit(LED_NUML, input->led))) { led 352 drivers/hid/hid-asus.c struct asus_kbd_leds *led = container_of(led_cdev, struct asus_kbd_leds, led 354 drivers/hid/hid-asus.c if (led->brightness == brightness) led 357 drivers/hid/hid-asus.c led->brightness = brightness; led 358 drivers/hid/hid-asus.c schedule_work(&led->work); led 363 drivers/hid/hid-asus.c struct asus_kbd_leds *led = container_of(led_cdev, struct asus_kbd_leds, led 366 drivers/hid/hid-asus.c return led->brightness; led 371 drivers/hid/hid-asus.c struct asus_kbd_leds *led = container_of(work, struct asus_kbd_leds, work); led 375 drivers/hid/hid-asus.c if (led->removed) led 378 drivers/hid/hid-asus.c buf[4] = led->brightness; led 380 drivers/hid/hid-asus.c ret = asus_kbd_set_report(led->hdev, buf, sizeof(buf)); led 382 drivers/hid/hid-asus.c hid_err(led->hdev, "Asus failed to set keyboard backlight: %d\n", ret); led 254 drivers/hid/hid-bigbenff.c static void bigben_set_led(struct led_classdev *led, led 257 drivers/hid/hid-bigbenff.c struct device *dev = led->dev->parent; led 269 drivers/hid/hid-bigbenff.c if (led == bigben->leds[n]) { led 287 drivers/hid/hid-bigbenff.c static enum led_brightness bigben_get_led(struct led_classdev *led) led 289 drivers/hid/hid-bigbenff.c struct device *dev = led->dev->parent; led 300 drivers/hid/hid-bigbenff.c if (led == bigben->leds[n]) led 322 drivers/hid/hid-bigbenff.c struct led_classdev *led; led 363 drivers/hid/hid-bigbenff.c led = devm_kzalloc( led 368 drivers/hid/hid-bigbenff.c if (!led) { led 372 drivers/hid/hid-bigbenff.c name = (void *)(&led[1]); led 377 drivers/hid/hid-bigbenff.c led->name = name; led 378 drivers/hid/hid-bigbenff.c led->brightness = (n == 0) ? LED_ON : LED_OFF; led 379 drivers/hid/hid-bigbenff.c led->max_brightness = 1; led 380 drivers/hid/hid-bigbenff.c led->brightness_get = bigben_get_led; led 381 drivers/hid/hid-bigbenff.c led->brightness_set = bigben_set_led; led 382 drivers/hid/hid-bigbenff.c bigben->leds[n] = led; led 383 drivers/hid/hid-bigbenff.c error = devm_led_classdev_register(&hid->dev, led); led 148 drivers/hid/hid-corsair.c struct k90_led *led = container_of(led_cdev, struct k90_led, cdev); led 149 drivers/hid/hid-corsair.c struct device *dev = led->cdev.dev->parent; led 187 drivers/hid/hid-corsair.c struct k90_led *led = container_of(led_cdev, struct k90_led, cdev); led 189 drivers/hid/hid-corsair.c return led->brightness; led 195 drivers/hid/hid-corsair.c struct k90_led *led = container_of(led_cdev, struct k90_led, cdev); led 197 drivers/hid/hid-corsair.c led->brightness = brightness; led 198 drivers/hid/hid-corsair.c schedule_work(&led->work); led 204 drivers/hid/hid-corsair.c struct k90_led *led = container_of(work, struct k90_led, work); led 209 drivers/hid/hid-corsair.c if (led->removed) led 212 drivers/hid/hid-corsair.c dev = led->cdev.dev->parent; led 219 drivers/hid/hid-corsair.c USB_RECIP_DEVICE, led->brightness, 0, led 229 drivers/hid/hid-corsair.c struct k90_led *led = container_of(work, struct k90_led, work); led 235 drivers/hid/hid-corsair.c if (led->removed) led 238 drivers/hid/hid-corsair.c dev = led->cdev.dev->parent; led 242 drivers/hid/hid-corsair.c if (led->brightness > 0) led 288 drivers/hid/hid-google-hammer.c struct hammer_kbd_leds *led = container_of(cdev, led 293 drivers/hid/hid-google-hammer.c led->buf[0] = 0; led 294 drivers/hid/hid-google-hammer.c led->buf[1] = br; led 300 drivers/hid/hid-google-hammer.c ret = hid_hw_power(led->hdev, PM_HINT_FULLON); led 302 drivers/hid/hid-google-hammer.c hid_err(led->hdev, "failed: device not resumed %d\n", ret); led 306 drivers/hid/hid-google-hammer.c ret = hid_hw_output_report(led->hdev, led->buf, sizeof(led->buf)); led 308 drivers/hid/hid-google-hammer.c ret = hid_hw_raw_request(led->hdev, 0, led->buf, led 309 drivers/hid/hid-google-hammer.c sizeof(led->buf), led 313 drivers/hid/hid-google-hammer.c hid_err(led->hdev, "failed to set keyboard backlight: %d\n", led 317 drivers/hid/hid-google-hammer.c hid_hw_power(led->hdev, PM_HINT_NORMAL); led 64 drivers/hid/hid-gt683r.c struct gt683r_led *led = hid_get_drvdata(hdev); led 67 drivers/hid/hid-gt683r.c if (led_cdev == &led->led_devs[i]) led 72 drivers/hid/hid-gt683r.c led->brightnesses[i] = brightness; led 73 drivers/hid/hid-gt683r.c schedule_work(&led->work); led 83 drivers/hid/hid-gt683r.c struct gt683r_led *led = hid_get_drvdata(hdev); led 85 drivers/hid/hid-gt683r.c if (led->mode == GT683R_LED_NORMAL) led 87 drivers/hid/hid-gt683r.c else if (led->mode == GT683R_LED_AUDIO) led 101 drivers/hid/hid-gt683r.c struct gt683r_led *led = hid_get_drvdata(hdev); led 107 drivers/hid/hid-gt683r.c mutex_lock(&led->lock); led 110 drivers/hid/hid-gt683r.c led->mode = GT683R_LED_NORMAL; led 112 drivers/hid/hid-gt683r.c led->mode = GT683R_LED_AUDIO; led 114 drivers/hid/hid-gt683r.c led->mode = GT683R_LED_BREATHING; led 116 drivers/hid/hid-gt683r.c mutex_unlock(&led->lock); led 117 drivers/hid/hid-gt683r.c schedule_work(&led->work); led 122 drivers/hid/hid-gt683r.c static int gt683r_led_snd_msg(struct gt683r_led *led, u8 *msg) led 126 drivers/hid/hid-gt683r.c ret = hid_hw_raw_request(led->hdev, msg[0], msg, GT683R_BUFFER_SIZE, led 129 drivers/hid/hid-gt683r.c hid_err(led->hdev, led 139 drivers/hid/hid-gt683r.c static int gt683r_leds_set(struct gt683r_led *led, u8 leds) led 152 drivers/hid/hid-gt683r.c ret = gt683r_led_snd_msg(led, buffer); led 158 drivers/hid/hid-gt683r.c static int gt683r_mode_set(struct gt683r_led *led, u8 mode) led 172 drivers/hid/hid-gt683r.c ret = gt683r_led_snd_msg(led, buffer); led 183 drivers/hid/hid-gt683r.c struct gt683r_led *led = container_of(work, struct gt683r_led, work); led 185 drivers/hid/hid-gt683r.c mutex_lock(&led->lock); led 188 drivers/hid/hid-gt683r.c if (led->brightnesses[i]) led 192 drivers/hid/hid-gt683r.c if (gt683r_leds_set(led, leds)) led 196 drivers/hid/hid-gt683r.c mode = led->mode; led 200 drivers/hid/hid-gt683r.c gt683r_mode_set(led, mode); led 202 drivers/hid/hid-gt683r.c mutex_unlock(&led->lock); led 229 drivers/hid/hid-gt683r.c struct gt683r_led *led; led 231 drivers/hid/hid-gt683r.c led = devm_kzalloc(&hdev->dev, sizeof(*led), GFP_KERNEL); led 232 drivers/hid/hid-gt683r.c if (!led) led 235 drivers/hid/hid-gt683r.c mutex_init(&led->lock); led 236 drivers/hid/hid-gt683r.c INIT_WORK(&led->work, gt683r_led_work); led 238 drivers/hid/hid-gt683r.c led->mode = GT683R_LED_NORMAL; led 239 drivers/hid/hid-gt683r.c led->hdev = hdev; led 240 drivers/hid/hid-gt683r.c hid_set_drvdata(hdev, led); led 266 drivers/hid/hid-gt683r.c led->led_devs[i].name = name; led 267 drivers/hid/hid-gt683r.c led->led_devs[i].max_brightness = 1; led 268 drivers/hid/hid-gt683r.c led->led_devs[i].brightness_set = gt683r_brightness_set; led 269 drivers/hid/hid-gt683r.c led->led_devs[i].groups = gt683r_led_groups; led 271 drivers/hid/hid-gt683r.c ret = led_classdev_register(&hdev->dev, &led->led_devs[i]); led 282 drivers/hid/hid-gt683r.c led_classdev_unregister(&led->led_devs[i]); led 290 drivers/hid/hid-gt683r.c struct gt683r_led *led = hid_get_drvdata(hdev); led 293 drivers/hid/hid-gt683r.c led_classdev_unregister(&led->led_devs[i]); led 294 drivers/hid/hid-gt683r.c flush_work(&led->work); led 191 drivers/hid/hid-led.c struct hidled_led *led = to_hidled_led(cdev); led 192 drivers/hid/hid-led.c struct hidled_rgb *rgb = led->rgb; led 202 drivers/hid/hid-led.c struct hidled_led *led = to_hidled_led(cdev); led 203 drivers/hid/hid-led.c struct hidled_rgb *rgb = led->rgb; led 232 drivers/hid/hid-led.c struct hidled_led *led = to_hidled_led(cdev); led 235 drivers/hid/hid-led.c buf[2] = led->rgb->red.cdev.brightness; led 236 drivers/hid/hid-led.c buf[3] = led->rgb->green.cdev.brightness; led 237 drivers/hid/hid-led.c buf[4] = led->rgb->blue.cdev.brightness; led 238 drivers/hid/hid-led.c buf[7] = led->rgb->num + offset; led 240 drivers/hid/hid-led.c return hidled_send(led->rgb->ldev, buf); led 279 drivers/hid/hid-led.c static inline int delcom_get_lednum(const struct hidled_led *led) led 281 drivers/hid/hid-led.c if (led == &led->rgb->red) led 283 drivers/hid/hid-led.c else if (led == &led->rgb->green) led 289 drivers/hid/hid-led.c static int delcom_enable_led(struct hidled_led *led) led 293 drivers/hid/hid-led.c dp.tx.data_lsb = 1 << delcom_get_lednum(led); led 296 drivers/hid/hid-led.c return hidled_send(led->rgb->ldev, dp.data); led 299 drivers/hid/hid-led.c static int delcom_set_pwm(struct hidled_led *led) led 303 drivers/hid/hid-led.c dp.tx.data_lsb = delcom_get_lednum(led); led 304 drivers/hid/hid-led.c dp.tx.data_msb = led->cdev.brightness; led 306 drivers/hid/hid-led.c return hidled_send(led->rgb->ldev, dp.data); led 311 drivers/hid/hid-led.c struct hidled_led *led = to_hidled_led(cdev); led 319 drivers/hid/hid-led.c ret = delcom_enable_led(led); led 323 drivers/hid/hid-led.c return delcom_set_pwm(led); led 343 drivers/hid/hid-led.c struct hidled_led *led = to_hidled_led(cdev); led 346 drivers/hid/hid-led.c buf[2] = led->rgb->num + 1; led 347 drivers/hid/hid-led.c buf[3] = led->rgb->red.cdev.brightness; led 348 drivers/hid/hid-led.c buf[4] = led->rgb->green.cdev.brightness; led 349 drivers/hid/hid-led.c buf[5] = led->rgb->blue.cdev.brightness; led 351 drivers/hid/hid-led.c return hidled_send(led->rgb->ldev, buf); led 410 drivers/hid/hid-led.c static int hidled_init_led(struct hidled_led *led, const char *color_name, led 416 drivers/hid/hid-led.c snprintf(led->name, sizeof(led->name), "%s%u:%s:led%u", led 419 drivers/hid/hid-led.c snprintf(led->name, sizeof(led->name), "%s%u:%s", led 421 drivers/hid/hid-led.c led->cdev.name = led->name; led 422 drivers/hid/hid-led.c led->cdev.max_brightness = config->max_brightness; led 423 drivers/hid/hid-led.c led->cdev.brightness_set_blocking = config->write; led 424 drivers/hid/hid-led.c led->cdev.flags = LED_HW_PLUGGABLE; led 425 drivers/hid/hid-led.c led->rgb = rgb; led 427 drivers/hid/hid-led.c return devm_led_classdev_register(&rgb->ldev->hdev->dev, &led->cdev); led 72 drivers/hid/hid-lg4ff.c struct led_classdev *led[5]; led 1136 drivers/hid/hid-lg4ff.c if (led_cdev != entry->wdata.led[i]) led 1171 drivers/hid/hid-lg4ff.c if (led_cdev == entry->wdata.led[i]) { led 1391 drivers/hid/hid-lg4ff.c entry->wdata.led[j] = NULL; led 1395 drivers/hid/hid-lg4ff.c struct led_classdev *led; led 1404 drivers/hid/hid-lg4ff.c led = kzalloc(sizeof(struct led_classdev)+name_sz, GFP_KERNEL); led 1405 drivers/hid/hid-lg4ff.c if (!led) { led 1410 drivers/hid/hid-lg4ff.c name = (void *)(&led[1]); led 1412 drivers/hid/hid-lg4ff.c led->name = name; led 1413 drivers/hid/hid-lg4ff.c led->brightness = 0; led 1414 drivers/hid/hid-lg4ff.c led->max_brightness = 1; led 1415 drivers/hid/hid-lg4ff.c led->brightness_get = lg4ff_led_get_brightness; led 1416 drivers/hid/hid-lg4ff.c led->brightness_set = lg4ff_led_set_brightness; led 1418 drivers/hid/hid-lg4ff.c entry->wdata.led[j] = led; led 1419 drivers/hid/hid-lg4ff.c error = led_classdev_register(&hid->dev, led); led 1426 drivers/hid/hid-lg4ff.c led = entry->wdata.led[j]; led 1427 drivers/hid/hid-lg4ff.c entry->wdata.led[j] = NULL; led 1428 drivers/hid/hid-lg4ff.c if (!led) led 1430 drivers/hid/hid-lg4ff.c led_classdev_unregister(led); led 1431 drivers/hid/hid-lg4ff.c kfree(led); led 1473 drivers/hid/hid-lg4ff.c struct led_classdev *led; led 1478 drivers/hid/hid-lg4ff.c led = entry->wdata.led[j]; led 1479 drivers/hid/hid-lg4ff.c entry->wdata.led[j] = NULL; led 1480 drivers/hid/hid-lg4ff.c if (!led) led 1482 drivers/hid/hid-lg4ff.c led_classdev_unregister(led); led 1483 drivers/hid/hid-lg4ff.c kfree(led); led 99 drivers/hid/hid-picolcd.h struct led_classdev *led[8]; led 37 drivers/hid/hid-picolcd_leds.c if (!data->led[0]) led 64 drivers/hid/hid-picolcd_leds.c if (led_cdev != data->led[i]) led 89 drivers/hid/hid-picolcd_leds.c if (led_cdev == data->led[i]) { led 99 drivers/hid/hid-picolcd_leds.c struct led_classdev *led; led 113 drivers/hid/hid-picolcd_leds.c led = kzalloc(sizeof(struct led_classdev)+name_sz, GFP_KERNEL); led 114 drivers/hid/hid-picolcd_leds.c if (!led) { led 119 drivers/hid/hid-picolcd_leds.c name = (void *)(&led[1]); led 121 drivers/hid/hid-picolcd_leds.c led->name = name; led 122 drivers/hid/hid-picolcd_leds.c led->brightness = 0; led 123 drivers/hid/hid-picolcd_leds.c led->max_brightness = 1; led 124 drivers/hid/hid-picolcd_leds.c led->brightness_get = picolcd_led_get_brightness; led 125 drivers/hid/hid-picolcd_leds.c led->brightness_set = picolcd_led_set_brightness; led 127 drivers/hid/hid-picolcd_leds.c data->led[i] = led; led 128 drivers/hid/hid-picolcd_leds.c ret = led_classdev_register(dev, data->led[i]); led 130 drivers/hid/hid-picolcd_leds.c data->led[i] = NULL; led 131 drivers/hid/hid-picolcd_leds.c kfree(led); led 139 drivers/hid/hid-picolcd_leds.c if (data->led[i]) { led 140 drivers/hid/hid-picolcd_leds.c led = data->led[i]; led 141 drivers/hid/hid-picolcd_leds.c data->led[i] = NULL; led 142 drivers/hid/hid-picolcd_leds.c led_classdev_unregister(led); led 143 drivers/hid/hid-picolcd_leds.c kfree(led); led 150 drivers/hid/hid-picolcd_leds.c struct led_classdev *led; led 154 drivers/hid/hid-picolcd_leds.c led = data->led[i]; led 155 drivers/hid/hid-picolcd_leds.c data->led[i] = NULL; led 156 drivers/hid/hid-picolcd_leds.c if (!led) led 158 drivers/hid/hid-picolcd_leds.c led_classdev_unregister(led); led 159 drivers/hid/hid-picolcd_leds.c kfree(led); led 461 drivers/hid/hid-sony.c struct sixaxis_led led[4]; /* LEDx at (4 - x) */ led 1852 drivers/hid/hid-sony.c static void sony_led_set_brightness(struct led_classdev *led, led 1855 drivers/hid/hid-sony.c struct device *dev = led->dev->parent; led 1878 drivers/hid/hid-sony.c if (led == drv_data->leds[n] && (force_update || led 1895 drivers/hid/hid-sony.c static enum led_brightness sony_led_get_brightness(struct led_classdev *led) led 1897 drivers/hid/hid-sony.c struct device *dev = led->dev->parent; led 1910 drivers/hid/hid-sony.c if (led == drv_data->leds[n]) led 1917 drivers/hid/hid-sony.c static int sony_led_blink_set(struct led_classdev *led, unsigned long *delay_on, led 1920 drivers/hid/hid-sony.c struct device *dev = led->dev->parent; led 1945 drivers/hid/hid-sony.c if (led == drv_data->leds[n]) led 1969 drivers/hid/hid-sony.c struct led_classdev *led; led 2036 drivers/hid/hid-sony.c led = devm_kzalloc(&hdev->dev, sizeof(struct led_classdev) + name_sz, GFP_KERNEL); led 2037 drivers/hid/hid-sony.c if (!led) { led 2042 drivers/hid/hid-sony.c name = (void *)(&led[1]); led 2048 drivers/hid/hid-sony.c led->name = name; led 2049 drivers/hid/hid-sony.c led->brightness = sc->led_state[n]; led 2050 drivers/hid/hid-sony.c led->max_brightness = max_brightness[n]; led 2051 drivers/hid/hid-sony.c led->flags = LED_CORE_SUSPENDRESUME; led 2052 drivers/hid/hid-sony.c led->brightness_get = sony_led_get_brightness; led 2053 drivers/hid/hid-sony.c led->brightness_set = sony_led_set_brightness; led 2056 drivers/hid/hid-sony.c led->blink_set = sony_led_blink_set; led 2058 drivers/hid/hid-sony.c sc->leds[n] = led; led 2060 drivers/hid/hid-sony.c ret = devm_led_classdev_register(&hdev->dev, led); led 2116 drivers/hid/hid-sony.c report->led[3 - n].duty_off = sc->led_delay_off[n]; led 2117 drivers/hid/hid-sony.c report->led[3 - n].duty_on = sc->led_delay_on[n]; led 23 drivers/hid/hid-steelseries.c struct led_classdev *led[SRWS1_NUMBER_LEDS + 1]; led 187 drivers/hid/hid-steelseries.c if (led_cdev != drv_data->led[i]) led 217 drivers/hid/hid-steelseries.c if (led_cdev == drv_data->led[i]) { led 229 drivers/hid/hid-steelseries.c struct led_classdev *led; led 262 drivers/hid/hid-steelseries.c drv_data->led[i] = NULL; led 269 drivers/hid/hid-steelseries.c led = kzalloc(sizeof(struct led_classdev)+name_sz, GFP_KERNEL); led 270 drivers/hid/hid-steelseries.c if (!led) { led 275 drivers/hid/hid-steelseries.c name = (void *)(&led[1]); led 277 drivers/hid/hid-steelseries.c led->name = name; led 278 drivers/hid/hid-steelseries.c led->brightness = 0; led 279 drivers/hid/hid-steelseries.c led->max_brightness = 1; led 280 drivers/hid/hid-steelseries.c led->brightness_get = steelseries_srws1_led_all_get_brightness; led 281 drivers/hid/hid-steelseries.c led->brightness_set = steelseries_srws1_led_all_set_brightness; led 283 drivers/hid/hid-steelseries.c drv_data->led[SRWS1_NUMBER_LEDS] = led; led 284 drivers/hid/hid-steelseries.c ret = led_classdev_register(&hdev->dev, led); led 290 drivers/hid/hid-steelseries.c led = kzalloc(sizeof(struct led_classdev)+name_sz, GFP_KERNEL); led 291 drivers/hid/hid-steelseries.c if (!led) { led 296 drivers/hid/hid-steelseries.c name = (void *)(&led[1]); led 298 drivers/hid/hid-steelseries.c led->name = name; led 299 drivers/hid/hid-steelseries.c led->brightness = 0; led 300 drivers/hid/hid-steelseries.c led->max_brightness = 1; led 301 drivers/hid/hid-steelseries.c led->brightness_get = steelseries_srws1_led_get_brightness; led 302 drivers/hid/hid-steelseries.c led->brightness_set = steelseries_srws1_led_set_brightness; led 304 drivers/hid/hid-steelseries.c drv_data->led[i] = led; led 305 drivers/hid/hid-steelseries.c ret = led_classdev_register(&hdev->dev, led); led 312 drivers/hid/hid-steelseries.c led = drv_data->led[i]; led 313 drivers/hid/hid-steelseries.c drv_data->led[i] = NULL; led 314 drivers/hid/hid-steelseries.c if (!led) led 316 drivers/hid/hid-steelseries.c led_classdev_unregister(led); led 317 drivers/hid/hid-steelseries.c kfree(led); led 332 drivers/hid/hid-steelseries.c struct led_classdev *led; led 339 drivers/hid/hid-steelseries.c led = drv_data->led[i]; led 340 drivers/hid/hid-steelseries.c drv_data->led[i] = NULL; led 341 drivers/hid/hid-steelseries.c if (!led) led 343 drivers/hid/hid-steelseries.c led_classdev_unregister(led); led 344 drivers/hid/hid-steelseries.c kfree(led); led 343 drivers/hid/hid-wiimote-modules.c struct led_classdev *led; led 348 drivers/hid/hid-wiimote-modules.c led = kzalloc(sizeof(struct led_classdev) + namesz, GFP_KERNEL); led 349 drivers/hid/hid-wiimote-modules.c if (!led) led 352 drivers/hid/hid-wiimote-modules.c name = (void*)&led[1]; led 354 drivers/hid/hid-wiimote-modules.c led->name = name; led 355 drivers/hid/hid-wiimote-modules.c led->brightness = 0; led 356 drivers/hid/hid-wiimote-modules.c led->max_brightness = 1; led 357 drivers/hid/hid-wiimote-modules.c led->brightness_get = wiimod_led_get; led 358 drivers/hid/hid-wiimote-modules.c led->brightness_set = wiimod_led_set; led 360 drivers/hid/hid-wiimote-modules.c wdata->leds[ops->arg] = led; led 361 drivers/hid/hid-wiimote-modules.c ret = led_classdev_register(dev, led); led 376 drivers/hid/hid-wiimote-modules.c kfree(led); led 84 drivers/hid/usbhid/usbkbd.c struct urb *irq, *led; led 163 drivers/hid/usbhid/usbkbd.c kbd->newleds = (!!test_bit(LED_KANA, dev->led) << 3) | (!!test_bit(LED_COMPOSE, dev->led) << 3) | led 164 drivers/hid/usbhid/usbkbd.c (!!test_bit(LED_SCROLLL, dev->led) << 2) | (!!test_bit(LED_CAPSL, dev->led) << 1) | led 165 drivers/hid/usbhid/usbkbd.c (!!test_bit(LED_NUML, dev->led)); led 179 drivers/hid/usbhid/usbkbd.c kbd->led->dev = kbd->usbdev; led 180 drivers/hid/usbhid/usbkbd.c if (usb_submit_urb(kbd->led, GFP_ATOMIC)) led 209 drivers/hid/usbhid/usbkbd.c kbd->led->dev = kbd->usbdev; led 210 drivers/hid/usbhid/usbkbd.c if (usb_submit_urb(kbd->led, GFP_ATOMIC)){ led 240 drivers/hid/usbhid/usbkbd.c if (!(kbd->led = usb_alloc_urb(0, GFP_KERNEL))) led 255 drivers/hid/usbhid/usbkbd.c usb_free_urb(kbd->led); led 347 drivers/hid/usbhid/usbkbd.c usb_fill_control_urb(kbd->led, dev, usb_sndctrlpipe(dev, 0), led 350 drivers/hid/usbhid/usbkbd.c kbd->led->transfer_dma = kbd->leds_dma; led 351 drivers/hid/usbhid/usbkbd.c kbd->led->transfer_flags |= URB_NO_TRANSFER_DMA_MAP; led 377 drivers/hid/usbhid/usbkbd.c usb_kill_urb(kbd->led); led 179 drivers/hid/wacom.h } led; led 236 drivers/hid/wacom.h enum led_brightness wacom_leds_brightness_get(struct wacom_led *led); led 919 drivers/hid/wacom_sys.c if (!wacom->led.groups) led 939 drivers/hid/wacom_sys.c buf[1] = wacom->led.llv; led 940 drivers/hid/wacom_sys.c buf[2] = wacom->led.groups[0].select & 0x03; led 949 drivers/hid/wacom_sys.c int ring_led = wacom->led.groups[0].select & 0x03; led 950 drivers/hid/wacom_sys.c int ring_lum = (((wacom->led.llv & 0x60) >> 5) - 1) & 0x03; led 970 drivers/hid/wacom_sys.c buf[9] = wacom->led.llv; led 971 drivers/hid/wacom_sys.c buf[10] = wacom->led.groups[0].select & 0x03; led 974 drivers/hid/wacom_sys.c int led = wacom->led.groups[0].select | 0x4; led 978 drivers/hid/wacom_sys.c led |= (wacom->led.groups[1].select << 4) | 0x40; led 981 drivers/hid/wacom_sys.c buf[1] = led; led 982 drivers/hid/wacom_sys.c buf[2] = wacom->led.llv; led 983 drivers/hid/wacom_sys.c buf[3] = wacom->led.hlv; led 984 drivers/hid/wacom_sys.c buf[4] = wacom->led.img_lum; led 1050 drivers/hid/wacom_sys.c wacom->led.groups[set_id].select = id & 0x3; led 1070 drivers/hid/wacom_sys.c wacom->led.groups[SET_ID].select); \ led 1106 drivers/hid/wacom_sys.c return wacom_luminance_store(wacom, &wacom->led.field, \ led 1113 drivers/hid/wacom_sys.c return scnprintf(buf, PAGE_SIZE, "%d\n", wacom->led.field); \ led 1273 drivers/hid/wacom_sys.c enum led_brightness wacom_leds_brightness_get(struct wacom_led *led) led 1275 drivers/hid/wacom_sys.c struct wacom *wacom = led->wacom; led 1277 drivers/hid/wacom_sys.c if (wacom->led.max_hlv) led 1278 drivers/hid/wacom_sys.c return led->hlv * LED_FULL / wacom->led.max_hlv; led 1280 drivers/hid/wacom_sys.c if (wacom->led.max_llv) led 1281 drivers/hid/wacom_sys.c return led->llv * LED_FULL / wacom->led.max_llv; led 1289 drivers/hid/wacom_sys.c struct wacom_led *led = container_of(cdev, struct wacom_led, cdev); led 1290 drivers/hid/wacom_sys.c struct wacom *wacom = led->wacom; led 1292 drivers/hid/wacom_sys.c if (wacom->led.groups[led->group].select != led->id) led 1295 drivers/hid/wacom_sys.c return wacom_leds_brightness_get(led); led 1301 drivers/hid/wacom_sys.c struct wacom_led *led = container_of(cdev, struct wacom_led, cdev); led 1302 drivers/hid/wacom_sys.c struct wacom *wacom = led->wacom; led 1307 drivers/hid/wacom_sys.c if (!wacom->led.groups || (brightness == LED_OFF && led 1308 drivers/hid/wacom_sys.c wacom->led.groups[led->group].select != led->id)) { led 1313 drivers/hid/wacom_sys.c led->llv = wacom->led.llv = wacom->led.max_llv * brightness / LED_FULL; led 1314 drivers/hid/wacom_sys.c led->hlv = wacom->led.hlv = wacom->led.max_hlv * brightness / LED_FULL; led 1316 drivers/hid/wacom_sys.c wacom->led.groups[led->group].select = led->id; led 1332 drivers/hid/wacom_sys.c struct wacom_led *led, unsigned int group, led 1347 drivers/hid/wacom_sys.c led->trigger.name = name; led 1348 drivers/hid/wacom_sys.c error = devm_led_trigger_register(dev, &led->trigger); led 1352 drivers/hid/wacom_sys.c led->cdev.name, error); led 1357 drivers/hid/wacom_sys.c led->group = group; led 1358 drivers/hid/wacom_sys.c led->id = id; led 1359 drivers/hid/wacom_sys.c led->wacom = wacom; led 1360 drivers/hid/wacom_sys.c led->llv = wacom->led.llv; led 1361 drivers/hid/wacom_sys.c led->hlv = wacom->led.hlv; led 1362 drivers/hid/wacom_sys.c led->cdev.name = name; led 1363 drivers/hid/wacom_sys.c led->cdev.max_brightness = LED_FULL; led 1364 drivers/hid/wacom_sys.c led->cdev.flags = LED_HW_PLUGGABLE; led 1365 drivers/hid/wacom_sys.c led->cdev.brightness_get = __wacom_led_brightness_get; led 1367 drivers/hid/wacom_sys.c led->cdev.brightness_set_blocking = wacom_led_brightness_set; led 1368 drivers/hid/wacom_sys.c led->cdev.default_trigger = led->cdev.name; led 1370 drivers/hid/wacom_sys.c led->cdev.brightness_set = wacom_led_readonly_brightness_set; led 1373 drivers/hid/wacom_sys.c error = devm_led_classdev_register(dev, &led->cdev); led 1377 drivers/hid/wacom_sys.c led->cdev.name, error); led 1378 drivers/hid/wacom_sys.c led->cdev.name = NULL; led 1400 drivers/hid/wacom_sys.c if (group_id >= wacom->led.count || count <= 0) led 1403 drivers/hid/wacom_sys.c if (!devres_open_group(dev, &wacom->led.groups[group_id], GFP_KERNEL)) led 1412 drivers/hid/wacom_sys.c wacom->led.groups[group_id].leds = leds; led 1413 drivers/hid/wacom_sys.c wacom->led.groups[group_id].count = count; led 1422 drivers/hid/wacom_sys.c wacom->led.groups[group_id].dev = dev; led 1424 drivers/hid/wacom_sys.c devres_close_group(dev, &wacom->led.groups[group_id]); led 1437 drivers/hid/wacom_sys.c &wacom->led.groups[group_id]); led 1444 drivers/hid/wacom_sys.c devres_release_group(dev, &wacom->led.groups[group_id]); led 1453 drivers/hid/wacom_sys.c if (group_id >= wacom->led.count) led 1456 drivers/hid/wacom_sys.c group = &wacom->led.groups[group_id]; led 1496 drivers/hid/wacom_sys.c wacom->led.groups = NULL; led 1497 drivers/hid/wacom_sys.c wacom->led.count = 0; led 1515 drivers/hid/wacom_sys.c wacom->led.groups = groups; led 1516 drivers/hid/wacom_sys.c wacom->led.count = count; led 1559 drivers/hid/wacom_sys.c wacom->led.llv = 100; led 1560 drivers/hid/wacom_sys.c wacom->led.max_llv = 100; led 1577 drivers/hid/wacom_sys.c wacom->led.llv = 10; led 1578 drivers/hid/wacom_sys.c wacom->led.hlv = 20; led 1579 drivers/hid/wacom_sys.c wacom->led.max_llv = 127; led 1580 drivers/hid/wacom_sys.c wacom->led.max_hlv = 127; led 1581 drivers/hid/wacom_sys.c wacom->led.img_lum = 10; led 1596 drivers/hid/wacom_sys.c wacom->led.llv = 0; led 1597 drivers/hid/wacom_sys.c wacom->led.hlv = 0; led 1598 drivers/hid/wacom_sys.c wacom->led.img_lum = 0; led 1617 drivers/hid/wacom_sys.c wacom->led.llv = 32; led 1618 drivers/hid/wacom_sys.c wacom->led.max_llv = 96; led 1632 drivers/hid/wacom_sys.c wacom->led.llv = 50; led 1633 drivers/hid/wacom_sys.c wacom->led.max_llv = 100; led 1643 drivers/hid/wacom_sys.c wacom->led.llv = 255; led 1644 drivers/hid/wacom_sys.c wacom->led.max_llv = 255; led 1831 drivers/hid/wacom_sys.c mode = wacom->led.groups[index].select; led 2000 drivers/hid/wacom_sys.c wacom->led.groups[i].select = WACOM_STATUS_UNKNOWN; led 2514 drivers/hid/wacom_sys.c wacom->led.groups[i].select = WACOM_STATUS_UNKNOWN; led 2598 drivers/hid/wacom_sys.c if (wacom->led.groups[index].select == WACOM_STATUS_UNKNOWN) led 1124 drivers/hid/wacom_wac.c wacom->led.groups[i].select = touch_ring_mode; led 2148 drivers/hid/wacom_wac.c for (i = 0; i < wacom->led.count; i++) led 3898 drivers/hid/wacom_wac.c struct wacom_led *led; led 3911 drivers/hid/wacom_wac.c led = wacom_led_find(wacom, group, i); led 3912 drivers/hid/wacom_wac.c if (!led) { led 3918 drivers/hid/wacom_wac.c led->held = true; led 3919 drivers/hid/wacom_wac.c led_trigger_event(&led->trigger, LED_FULL); led 3921 drivers/hid/wacom_wac.c led->held = false; led 3939 drivers/hid/wacom_wac.c group_button = group * (button_count/wacom->led.count); led 3950 drivers/hid/wacom_wac.c struct wacom_led *led, *next_led; led 3958 drivers/hid/wacom_wac.c cur = wacom->led.groups[group].select; led 3960 drivers/hid/wacom_wac.c led = wacom_led_find(wacom, group, cur); led 3961 drivers/hid/wacom_wac.c if (!led) { led 3968 drivers/hid/wacom_wac.c led->held = false; led 3972 drivers/hid/wacom_wac.c if (led->held && pressed) led 3975 drivers/hid/wacom_wac.c next_led = wacom_led_next(wacom, led); led 3981 drivers/hid/wacom_wac.c if (next_led == led) led 3995 drivers/hid/wacom_wac.c for (i = 0; i < wacom->led.count; i++) led 81 drivers/hwmon/pmbus/ibm-cffps.c struct led_classdev led; led 304 drivers/hwmon/pmbus/ibm-cffps.c struct ibm_cffps *psu = container_of(led_cdev, struct ibm_cffps, led); led 338 drivers/hwmon/pmbus/ibm-cffps.c struct ibm_cffps *psu = container_of(led_cdev, struct ibm_cffps, led); led 365 drivers/hwmon/pmbus/ibm-cffps.c psu->led.name = psu->led_name; led 366 drivers/hwmon/pmbus/ibm-cffps.c psu->led.max_brightness = LED_FULL; led 367 drivers/hwmon/pmbus/ibm-cffps.c psu->led.brightness_set_blocking = ibm_cffps_led_brightness_set; led 368 drivers/hwmon/pmbus/ibm-cffps.c psu->led.blink_set = ibm_cffps_led_blink_set; led 370 drivers/hwmon/pmbus/ibm-cffps.c rc = devm_led_classdev_register(dev, &psu->led); led 51 drivers/iio/light/cm3605.c struct led_trigger *led; led 239 drivers/iio/light/cm3605.c led_trigger_register_simple("cm3605", &cm3605->led); led 240 drivers/iio/light/cm3605.c led_trigger_event(cm3605->led, LED_FULL); led 258 drivers/iio/light/cm3605.c led_trigger_event(cm3605->led, LED_OFF); led 259 drivers/iio/light/cm3605.c led_trigger_unregister_simple(cm3605->led); led 272 drivers/iio/light/cm3605.c led_trigger_event(cm3605->led, LED_OFF); led 273 drivers/iio/light/cm3605.c led_trigger_unregister_simple(cm3605->led); led 286 drivers/iio/light/cm3605.c led_trigger_event(cm3605->led, LED_OFF); led 301 drivers/iio/light/cm3605.c led_trigger_event(cm3605->led, LED_FULL); led 1158 drivers/input/evdev.c return evdev_handle_get_val(client, dev, EV_LED, dev->led, led 52 drivers/input/input-leds.c struct input_led *led = container_of(cdev, struct input_led, cdev); led 53 drivers/input/input-leds.c struct input_dev *input = led->handle->dev; led 55 drivers/input/input-leds.c return test_bit(led->code, input->led) ? cdev->max_brightness : 0; led 61 drivers/input/input-leds.c struct input_led *led = container_of(cdev, struct input_led, cdev); led 63 drivers/input/input-leds.c input_inject_event(led->handle, EV_LED, led->code, !!brightness); led 88 drivers/input/input-leds.c struct input_led *led; led 122 drivers/input/input-leds.c led = &leds->leds[led_no]; led 123 drivers/input/input-leds.c led->handle = &leds->handle; led 124 drivers/input/input-leds.c led->code = led_code; led 126 drivers/input/input-leds.c led->cdev.name = kasprintf(GFP_KERNEL, "%s::%s", led 129 drivers/input/input-leds.c if (!led->cdev.name) { led 134 drivers/input/input-leds.c led->cdev.max_brightness = 1; led 135 drivers/input/input-leds.c led->cdev.brightness_get = input_leds_brightness_get; led 136 drivers/input/input-leds.c led->cdev.brightness_set = input_leds_brightness_set; led 137 drivers/input/input-leds.c led->cdev.default_trigger = input_led_info[led_code].trigger; led 139 drivers/input/input-leds.c error = led_classdev_register(&dev->dev, &led->cdev); led 142 drivers/input/input-leds.c led->cdev.name, error); led 143 drivers/input/input-leds.c kfree(led->cdev.name); led 154 drivers/input/input-leds.c struct input_led *led = &leds->leds[led_no]; led 156 drivers/input/input-leds.c led_classdev_unregister(&led->cdev); led 157 drivers/input/input-leds.c kfree(led->cdev.name); led 176 drivers/input/input-leds.c struct input_led *led = &leds->leds[i]; led 178 drivers/input/input-leds.c led_classdev_unregister(&led->cdev); led 179 drivers/input/input-leds.c kfree(led->cdev.name); led 330 drivers/input/input.c !!test_bit(code, dev->led) != !!value) { led 332 drivers/input/input.c __change_bit(code, dev->led); led 1509 drivers/input/input.c INPUT_DEV_CAP_ATTR(LED, led); led 1676 drivers/input/input.c INPUT_DO_TOGGLE(dev, LED, led, activate); led 2078 drivers/input/input.c INPUT_CLEANSE_BITMASK(dev, LED, led); led 580 drivers/input/joystick/xpad.c struct xpad_led *led; led 1408 drivers/input/joystick/xpad.c led_set_brightness(&xpad->led->led_cdev, (xpad->pad_nr % 4) + 2); led 1422 drivers/input/joystick/xpad.c struct xpad_led *led; led 1429 drivers/input/joystick/xpad.c xpad->led = led = kzalloc(sizeof(struct xpad_led), GFP_KERNEL); led 1430 drivers/input/joystick/xpad.c if (!led) led 1439 drivers/input/joystick/xpad.c snprintf(led->name, sizeof(led->name), "xpad%d", xpad->pad_nr); led 1440 drivers/input/joystick/xpad.c led->xpad = xpad; led 1442 drivers/input/joystick/xpad.c led_cdev = &led->led_cdev; led 1443 drivers/input/joystick/xpad.c led_cdev->name = led->name; led 1458 drivers/input/joystick/xpad.c kfree(led); led 1459 drivers/input/joystick/xpad.c xpad->led = NULL; led 1465 drivers/input/joystick/xpad.c struct xpad_led *xpad_led = xpad->led; led 247 drivers/input/keyboard/applespi.c u8 led; led 806 drivers/input/keyboard/applespi.c message->capsl_command.led = applespi->have_cl_led_on ? 2 : 0; led 930 drivers/input/keyboard/applespi.c applespi_set_capsl_led(applespi, !!test_bit(LED_CAPSL, dev->led)); led 562 drivers/input/keyboard/atkbd.c param[0] = (test_bit(LED_SCROLLL, dev->led) ? 1 : 0) led 563 drivers/input/keyboard/atkbd.c | (test_bit(LED_NUML, dev->led) ? 2 : 0) led 564 drivers/input/keyboard/atkbd.c | (test_bit(LED_CAPSL, dev->led) ? 4 : 0); led 570 drivers/input/keyboard/atkbd.c param[1] = (test_bit(LED_COMPOSE, dev->led) ? 0x01 : 0) led 571 drivers/input/keyboard/atkbd.c | (test_bit(LED_SLEEP, dev->led) ? 0x02 : 0) led 572 drivers/input/keyboard/atkbd.c | (test_bit(LED_SUSPEND, dev->led) ? 0x04 : 0) led 573 drivers/input/keyboard/atkbd.c | (test_bit(LED_MISC, dev->led) ? 0x10 : 0) led 574 drivers/input/keyboard/atkbd.c | (test_bit(LED_MUTE, dev->led) ? 0x20 : 0); led 234 drivers/input/keyboard/cap11xx.c struct cap11xx_led *led = container_of(cdev, struct cap11xx_led, cdev); led 235 drivers/input/keyboard/cap11xx.c struct cap11xx_priv *priv = led->priv; led 244 drivers/input/keyboard/cap11xx.c BIT(led->reg), led 245 drivers/input/keyboard/cap11xx.c value ? BIT(led->reg) : 0); led 252 drivers/input/keyboard/cap11xx.c struct cap11xx_led *led; led 262 drivers/input/keyboard/cap11xx.c led = devm_kcalloc(dev, cnt, sizeof(struct cap11xx_led), GFP_KERNEL); led 263 drivers/input/keyboard/cap11xx.c if (!led) led 266 drivers/input/keyboard/cap11xx.c priv->leds = led; led 283 drivers/input/keyboard/cap11xx.c led->cdev.name = led 285 drivers/input/keyboard/cap11xx.c led->cdev.default_trigger = led 287 drivers/input/keyboard/cap11xx.c led->cdev.flags = 0; led 288 drivers/input/keyboard/cap11xx.c led->cdev.brightness_set_blocking = cap11xx_led_set; led 289 drivers/input/keyboard/cap11xx.c led->cdev.max_brightness = 1; led 290 drivers/input/keyboard/cap11xx.c led->cdev.brightness = LED_OFF; led 298 drivers/input/keyboard/cap11xx.c led->reg = reg; led 299 drivers/input/keyboard/cap11xx.c led->priv = priv; led 301 drivers/input/keyboard/cap11xx.c error = devm_led_classdev_register(dev, &led->cdev); led 308 drivers/input/keyboard/cap11xx.c led++; led 255 drivers/input/keyboard/lkkbd.c if (test_bit(LED, (LK)->dev->led)) \ led 73 drivers/input/keyboard/qt2160.c struct qt2160_led *led = container_of(cdev, struct qt2160_led, cdev); led 74 drivers/input/keyboard/qt2160.c struct qt2160_data *qt2160 = led->qt2160; led 78 drivers/input/keyboard/qt2160.c if (value != led->brightness) { led 82 drivers/input/keyboard/qt2160.c drive |= BIT(led->id); led 83 drivers/input/keyboard/qt2160.c pwmen |= BIT(led->id); led 86 drivers/input/keyboard/qt2160.c drive &= ~BIT(led->id); led 87 drivers/input/keyboard/qt2160.c pwmen &= ~BIT(led->id); led 99 drivers/input/keyboard/qt2160.c led->brightness = value; led 267 drivers/input/keyboard/qt2160.c struct qt2160_led *led = &qt2160->leds[i]; led 269 drivers/input/keyboard/qt2160.c snprintf(led->name, sizeof(led->name), "qt2160:x%d", i); led 270 drivers/input/keyboard/qt2160.c led->cdev.name = led->name; led 271 drivers/input/keyboard/qt2160.c led->cdev.brightness_set_blocking = qt2160_led_set; led 272 drivers/input/keyboard/qt2160.c led->cdev.brightness = LED_OFF; led 273 drivers/input/keyboard/qt2160.c led->id = i; led 274 drivers/input/keyboard/qt2160.c led->qt2160 = qt2160; led 276 drivers/input/keyboard/qt2160.c ret = led_classdev_register(&client->dev, &led->cdev); led 148 drivers/input/keyboard/sunkbd.c (!!test_bit(LED_CAPSL, dev->led) << 3) | led 149 drivers/input/keyboard/sunkbd.c (!!test_bit(LED_SCROLLL, dev->led) << 2) | led 150 drivers/input/keyboard/sunkbd.c (!!test_bit(LED_COMPOSE, dev->led) << 1) | led 151 drivers/input/keyboard/sunkbd.c !!test_bit(LED_NUML, dev->led)); led 215 drivers/input/keyboard/sunkbd.c (!!test_bit(LED_CAPSL, sunkbd->dev->led) << 3) | led 216 drivers/input/keyboard/sunkbd.c (!!test_bit(LED_SCROLLL, sunkbd->dev->led) << 2) | led 217 drivers/input/keyboard/sunkbd.c (!!test_bit(LED_COMPOSE, sunkbd->dev->led) << 1) | led 218 drivers/input/keyboard/sunkbd.c !!test_bit(LED_NUML, sunkbd->dev->led)); led 106 drivers/input/misc/apanel.c static int mail_led_set(struct led_classdev *led, led 109 drivers/input/misc/apanel.c struct apanel *ap = container_of(led, struct apanel, mail_led); led 51 drivers/input/misc/yealink.c u8 led; led 353 drivers/input/misc/yealink.c case offsetof(struct yld_status, led): led 200 drivers/input/misc/yealink.h _PIC('.', offsetof(struct yld_status, led) , 0x01, "LED" ), led 1124 drivers/input/serio/i8042.c char led; led 1126 drivers/input/serio/i8042.c led = (state) ? 0x01 | 0x04 : 0; led 1136 drivers/input/serio/i8042.c dbg("%02x -> i8042 (panic blink)\n", led); led 1137 drivers/input/serio/i8042.c i8042_write_data(led); led 125 drivers/input/tablet/pegasus_notetaker.c static int pegasus_set_mode(struct pegasus *pegasus, u8 mode, u8 led) led 127 drivers/input/tablet/pegasus_notetaker.c u8 cmd[] = { NOTETAKER_SET_CMD, NOTETAKER_SET_MODE, led, mode }; led 1609 drivers/isdn/hardware/mISDN/hfcmulti.c int led[4]; led 1619 drivers/isdn/hardware/mISDN/hfcmulti.c led[0] = 0; led 1620 drivers/isdn/hardware/mISDN/hfcmulti.c led[1] = 0; led 1621 drivers/isdn/hardware/mISDN/hfcmulti.c led[2] = 0; led 1622 drivers/isdn/hardware/mISDN/hfcmulti.c led[3] = 0; led 1626 drivers/isdn/hardware/mISDN/hfcmulti.c led[1] = 1; led 1628 drivers/isdn/hardware/mISDN/hfcmulti.c led[0] = 1; led 1632 drivers/isdn/hardware/mISDN/hfcmulti.c led[2] = 1; led 1633 drivers/isdn/hardware/mISDN/hfcmulti.c led[3] = 1; led 1639 drivers/isdn/hardware/mISDN/hfcmulti.c led[2] = 0; led 1641 drivers/isdn/hardware/mISDN/hfcmulti.c led[3] = 0; led 1652 drivers/isdn/hardware/mISDN/hfcmulti.c leds = (led[0] | (led[1]<<2) | (led[2]<<1) | (led[3]<<3))^0xF; led 1678 drivers/isdn/hardware/mISDN/hfcmulti.c led[i] = 1; /* led green */ led 1684 drivers/isdn/hardware/mISDN/hfcmulti.c led[i] = 0; /* led off */ led 1690 drivers/isdn/hardware/mISDN/hfcmulti.c led[i] = 2; /* led red */ led 1694 drivers/isdn/hardware/mISDN/hfcmulti.c led[i] = 0; /* led off */ led 1699 drivers/isdn/hardware/mISDN/hfcmulti.c if (led[i] == 1) { led 1702 drivers/isdn/hardware/mISDN/hfcmulti.c } else if (led[i] == 2) { led 1712 drivers/isdn/hardware/mISDN/hfcmulti.c leds = ((led[3] > 0) << 0) | ((led[1] > 0) << 1) | led 1713 drivers/isdn/hardware/mISDN/hfcmulti.c ((led[0] > 0) << 2) | ((led[2] > 0) << 3) | led 1714 drivers/isdn/hardware/mISDN/hfcmulti.c ((led[3] & 1) << 4) | ((led[1] & 1) << 5) | led 1715 drivers/isdn/hardware/mISDN/hfcmulti.c ((led[0] & 1) << 6) | ((led[2] & 1) << 7); led 1742 drivers/isdn/hardware/mISDN/hfcmulti.c led[i] = 1; /* led green */ led 1748 drivers/isdn/hardware/mISDN/hfcmulti.c led[i] = 0; /* led off */ led 1754 drivers/isdn/hardware/mISDN/hfcmulti.c led[i] = 2; /* led red */ led 1758 drivers/isdn/hardware/mISDN/hfcmulti.c led[i] = 0; /* led off */ led 1760 drivers/isdn/hardware/mISDN/hfcmulti.c leds = (led[0] > 0) | ((led[1] > 0) << 1) | ((led[0]&1) << 2) led 1761 drivers/isdn/hardware/mISDN/hfcmulti.c | ((led[1]&1) << 3); led 1764 drivers/isdn/hardware/mISDN/hfcmulti.c ((led[0] > 0) << 2) | ((led[1] > 0) << 3)); led 1766 drivers/isdn/hardware/mISDN/hfcmulti.c ((led[0] & 1) << 2) | ((led[1] & 1) << 3)); led 76 drivers/isdn/hardware/mISDN/w6692.c static u32 led; led 108 drivers/isdn/hardware/mISDN/w6692.c module_param(led, uint, S_IRUGO | S_IWUSR); led 109 drivers/isdn/hardware/mISDN/w6692.c MODULE_PARM_DESC(led, "W6692 LED support bitmask (one bit per card)"); led 164 drivers/isdn/hardware/mISDN/w6692.c if ((!(card->fmask & led)) || card->subtype == W6692_USR) led 420 drivers/isdn/hardware/mISDN/w6692.c if (card->fmask & led) { led 873 drivers/isdn/hardware/mISDN/w6692.c if (card->fmask & led) led 875 drivers/isdn/hardware/mISDN/w6692.c if ((card->fmask & pots) || (card->fmask & led)) { led 1252 drivers/isdn/hardware/mISDN/w6692.c if ((card->fmask & led) || card->subtype == W6692_USR) { led 69 drivers/leds/leds-88pm860x.c struct pm860x_led *led = container_of(cdev, struct pm860x_led, cdev); led 74 drivers/leds/leds-88pm860x.c chip = led->chip; led 75 drivers/leds/leds-88pm860x.c mutex_lock(&led->lock); led 76 drivers/leds/leds-88pm860x.c led->brightness = value >> 3; led 78 drivers/leds/leds-88pm860x.c if ((led->current_brightness == 0) && led->brightness) { led 79 drivers/leds/leds-88pm860x.c led_power_set(chip, led->port, 1); led 80 drivers/leds/leds-88pm860x.c if (led->iset) { led 81 drivers/leds/leds-88pm860x.c pm860x_set_bits(led->i2c, led->reg_control, led 82 drivers/leds/leds-88pm860x.c LED_CURRENT_MASK, led->iset); led 84 drivers/leds/leds-88pm860x.c pm860x_set_bits(led->i2c, led->reg_blink, led 86 drivers/leds/leds-88pm860x.c pm860x_set_bits(led->i2c, PM8606_WLED3B, led->blink_mask, led 87 drivers/leds/leds-88pm860x.c led->blink_mask); led 89 drivers/leds/leds-88pm860x.c pm860x_set_bits(led->i2c, led->reg_control, LED_PWM_MASK, led 90 drivers/leds/leds-88pm860x.c led->brightness); led 92 drivers/leds/leds-88pm860x.c if (led->brightness == 0) { led 93 drivers/leds/leds-88pm860x.c pm860x_bulk_read(led->i2c, led->reg_control, 3, buf); led 99 drivers/leds/leds-88pm860x.c pm860x_set_bits(led->i2c, led->reg_control, led 101 drivers/leds/leds-88pm860x.c pm860x_set_bits(led->i2c, PM8606_WLED3B, led 102 drivers/leds/leds-88pm860x.c led->blink_mask, 0); led 103 drivers/leds/leds-88pm860x.c led_power_set(chip, led->port, 0); led 106 drivers/leds/leds-88pm860x.c led->current_brightness = led->brightness; led 108 drivers/leds/leds-88pm860x.c led->reg_control, led->brightness); led 109 drivers/leds/leds-88pm860x.c mutex_unlock(&led->lock); led 96 drivers/leds/leds-aat1290.c static void aat1290_as2cwire_write(struct aat1290_led *led, int addr, int value) led 100 drivers/leds/leds-aat1290.c gpiod_direction_output(led->gpio_fl_en, 0); led 101 drivers/leds/leds-aat1290.c gpiod_direction_output(led->gpio_en_set, 0); led 108 drivers/leds/leds-aat1290.c gpiod_direction_output(led->gpio_en_set, 0); led 110 drivers/leds/leds-aat1290.c gpiod_direction_output(led->gpio_en_set, 1); led 118 drivers/leds/leds-aat1290.c gpiod_direction_output(led->gpio_en_set, 0); led 120 drivers/leds/leds-aat1290.c gpiod_direction_output(led->gpio_en_set, 1); led 126 drivers/leds/leds-aat1290.c static void aat1290_set_flash_safety_timer(struct aat1290_led *led, led 129 drivers/leds/leds-aat1290.c struct led_classdev_flash *fled_cdev = &led->fled_cdev; led 134 drivers/leds/leds-aat1290.c aat1290_as2cwire_write(led, AAT1290_FLASH_SAFETY_TIMER_ADDR, led 144 drivers/leds/leds-aat1290.c struct aat1290_led *led = fled_cdev_to_led(fled_cdev); led 146 drivers/leds/leds-aat1290.c mutex_lock(&led->lock); led 149 drivers/leds/leds-aat1290.c gpiod_direction_output(led->gpio_fl_en, 0); led 150 drivers/leds/leds-aat1290.c gpiod_direction_output(led->gpio_en_set, 0); led 151 drivers/leds/leds-aat1290.c led->movie_mode = false; led 153 drivers/leds/leds-aat1290.c if (!led->movie_mode) { led 154 drivers/leds/leds-aat1290.c aat1290_as2cwire_write(led, led 157 drivers/leds/leds-aat1290.c led->movie_mode = true; led 160 drivers/leds/leds-aat1290.c aat1290_as2cwire_write(led, AAT1290_MOVIE_MODE_CURRENT_ADDR, led 162 drivers/leds/leds-aat1290.c aat1290_as2cwire_write(led, AAT1290_MOVIE_MODE_CONFIG_ADDR, led 166 drivers/leds/leds-aat1290.c mutex_unlock(&led->lock); led 175 drivers/leds/leds-aat1290.c struct aat1290_led *led = fled_cdev_to_led(fled_cdev); led 179 drivers/leds/leds-aat1290.c mutex_lock(&led->lock); led 182 drivers/leds/leds-aat1290.c aat1290_set_flash_safety_timer(led, timeout->val); led 183 drivers/leds/leds-aat1290.c gpiod_direction_output(led->gpio_fl_en, 1); led 185 drivers/leds/leds-aat1290.c gpiod_direction_output(led->gpio_fl_en, 0); led 186 drivers/leds/leds-aat1290.c gpiod_direction_output(led->gpio_en_set, 0); led 196 drivers/leds/leds-aat1290.c led->movie_mode = false; led 198 drivers/leds/leds-aat1290.c mutex_unlock(&led->lock); led 215 drivers/leds/leds-aat1290.c static int aat1290_led_parse_dt(struct aat1290_led *led, led 219 drivers/leds/leds-aat1290.c struct device *dev = &led->pdev->dev; led 226 drivers/leds/leds-aat1290.c led->gpio_fl_en = devm_gpiod_get(dev, "flen", GPIOD_ASIS); led 227 drivers/leds/leds-aat1290.c if (IS_ERR(led->gpio_fl_en)) { led 228 drivers/leds/leds-aat1290.c ret = PTR_ERR(led->gpio_fl_en); led 233 drivers/leds/leds-aat1290.c led->gpio_en_set = devm_gpiod_get(dev, "enset", GPIOD_ASIS); led 234 drivers/leds/leds-aat1290.c if (IS_ERR(led->gpio_en_set)) { led 235 drivers/leds/leds-aat1290.c ret = PTR_ERR(led->gpio_en_set); led 241 drivers/leds/leds-aat1290.c pinctrl = devm_pinctrl_get_select_default(&led->pdev->dev); led 291 drivers/leds/leds-aat1290.c static void aat1290_led_validate_mm_current(struct aat1290_led *led, led 298 drivers/leds/leds-aat1290.c if (cfg->max_mm_current < led->mm_current_scale[i]) led 304 drivers/leds/leds-aat1290.c cfg->max_mm_current = led->mm_current_scale[b]; led 308 drivers/leds/leds-aat1290.c static int init_mm_current_scale(struct aat1290_led *led, led 318 drivers/leds/leds-aat1290.c led->mm_current_scale = devm_kzalloc(&led->pdev->dev, led 321 drivers/leds/leds-aat1290.c if (!led->mm_current_scale) led 325 drivers/leds/leds-aat1290.c led->mm_current_scale[i] = max_mm_current * led 331 drivers/leds/leds-aat1290.c static int aat1290_led_get_configuration(struct aat1290_led *led, led 337 drivers/leds/leds-aat1290.c ret = aat1290_led_parse_dt(led, cfg, sub_node); led 344 drivers/leds/leds-aat1290.c ret = init_mm_current_scale(led, cfg); led 348 drivers/leds/leds-aat1290.c aat1290_led_validate_mm_current(led, cfg); led 352 drivers/leds/leds-aat1290.c devm_kfree(&led->pdev->dev, led->mm_current_scale); led 358 drivers/leds/leds-aat1290.c static void aat1290_init_flash_timeout(struct aat1290_led *led, led 361 drivers/leds/leds-aat1290.c struct led_classdev_flash *fled_cdev = &led->fled_cdev; led 378 drivers/leds/leds-aat1290.c struct aat1290_led *led = fled_cdev_to_led(fled_cdev); led 382 drivers/leds/leds-aat1290.c if (intensity >= led->mm_current_scale[i]) led 392 drivers/leds/leds-aat1290.c struct aat1290_led *led = fled_cdev_to_led(fled_cdev); led 394 drivers/leds/leds-aat1290.c return led->mm_current_scale[brightness - 1]; led 400 drivers/leds/leds-aat1290.c struct aat1290_led *led = fled_cdev_to_led(v4l2_flash->fled_cdev); led 405 drivers/leds/leds-aat1290.c gpiod_direction_output(led->gpio_fl_en, 0); led 406 drivers/leds/leds-aat1290.c gpiod_direction_output(led->gpio_en_set, 0); led 408 drivers/leds/leds-aat1290.c led->movie_mode = false; led 411 drivers/leds/leds-aat1290.c pinctrl = devm_pinctrl_get_select(&led->pdev->dev, led 414 drivers/leds/leds-aat1290.c dev_warn(&led->pdev->dev, "Unable to switch strobe source.\n"); led 421 drivers/leds/leds-aat1290.c static void aat1290_init_v4l2_flash_config(struct aat1290_led *led, led 425 drivers/leds/leds-aat1290.c struct led_classdev *led_cdev = &led->fled_cdev.led_cdev; led 432 drivers/leds/leds-aat1290.c s->min = led->mm_current_scale[0]; led 446 drivers/leds/leds-aat1290.c static inline void aat1290_init_v4l2_flash_config(struct aat1290_led *led, led 463 drivers/leds/leds-aat1290.c struct aat1290_led *led; led 471 drivers/leds/leds-aat1290.c led = devm_kzalloc(dev, sizeof(*led), GFP_KERNEL); led 472 drivers/leds/leds-aat1290.c if (!led) led 475 drivers/leds/leds-aat1290.c led->pdev = pdev; led 476 drivers/leds/leds-aat1290.c platform_set_drvdata(pdev, led); led 478 drivers/leds/leds-aat1290.c fled_cdev = &led->fled_cdev; led 482 drivers/leds/leds-aat1290.c ret = aat1290_led_get_configuration(led, &led_cfg, &sub_node); led 486 drivers/leds/leds-aat1290.c mutex_init(&led->lock); led 493 drivers/leds/leds-aat1290.c aat1290_init_flash_timeout(led, &led_cfg); led 504 drivers/leds/leds-aat1290.c aat1290_init_v4l2_flash_config(led, &led_cfg, &v4l2_sd_cfg); led 507 drivers/leds/leds-aat1290.c led->v4l2_flash = v4l2_flash_init(dev, of_fwnode_handle(sub_node), led 510 drivers/leds/leds-aat1290.c if (IS_ERR(led->v4l2_flash)) { led 511 drivers/leds/leds-aat1290.c ret = PTR_ERR(led->v4l2_flash); led 520 drivers/leds/leds-aat1290.c mutex_destroy(&led->lock); led 527 drivers/leds/leds-aat1290.c struct aat1290_led *led = platform_get_drvdata(pdev); led 529 drivers/leds/leds-aat1290.c v4l2_flash_release(led->v4l2_flash); led 530 drivers/leds/leds-aat1290.c led_classdev_flash_unregister(&led->fled_cdev); led 532 drivers/leds/leds-aat1290.c mutex_destroy(&led->lock); led 32 drivers/leds/leds-adp5520.c struct adp5520_led *led; led 34 drivers/leds/leds-adp5520.c led = container_of(led_cdev, struct adp5520_led, cdev); led 35 drivers/leds/leds-adp5520.c return adp5520_write(led->master, ADP5520_LED1_CURRENT + led->id - 1, led 39 drivers/leds/leds-adp5520.c static int adp5520_led_setup(struct adp5520_led *led) led 41 drivers/leds/leds-adp5520.c struct device *dev = led->master; led 42 drivers/leds/leds-adp5520.c int flags = led->flags; led 45 drivers/leds/leds-adp5520.c switch (led->id) { led 95 drivers/leds/leds-adp5520.c struct adp5520_led *led, *led_dat; led 110 drivers/leds/leds-adp5520.c led = devm_kcalloc(&pdev->dev, pdata->num_leds, sizeof(*led), led 112 drivers/leds/leds-adp5520.c if (!led) led 123 drivers/leds/leds-adp5520.c led_dat = &led[i]; led 154 drivers/leds/leds-adp5520.c platform_set_drvdata(pdev, led); led 160 drivers/leds/leds-adp5520.c led_classdev_unregister(&led[i].cdev); led 169 drivers/leds/leds-adp5520.c struct adp5520_led *led; led 172 drivers/leds/leds-adp5520.c led = platform_get_drvdata(pdev); led 174 drivers/leds/leds-adp5520.c adp5520_clr_bits(led->master, ADP5520_LED_CONTROL, led 178 drivers/leds/leds-adp5520.c led_classdev_unregister(&led[i].cdev); led 84 drivers/leds/leds-an30259a.c struct an30259a_led *led; led 88 drivers/leds/leds-an30259a.c led = container_of(cdev, struct an30259a_led, cdev); led 89 drivers/leds/leds-an30259a.c mutex_lock(&led->chip->mutex); led 91 drivers/leds/leds-an30259a.c ret = regmap_read(led->chip->regmap, AN30259A_REG_LED_ON, &led_on); led 97 drivers/leds/leds-an30259a.c led_on &= ~AN30259A_LED_EN(led->num); led 98 drivers/leds/leds-an30259a.c led_on &= ~AN30259A_LED_SLOPE(led->num); led 99 drivers/leds/leds-an30259a.c led->sloping = false; led 102 drivers/leds/leds-an30259a.c led_on |= AN30259A_LED_EN(led->num); led 103 drivers/leds/leds-an30259a.c if (led->sloping) led 104 drivers/leds/leds-an30259a.c led_on |= AN30259A_LED_SLOPE(led->num); led 105 drivers/leds/leds-an30259a.c ret = regmap_write(led->chip->regmap, led 106 drivers/leds/leds-an30259a.c AN30259A_REG_LEDCNT1(led->num), led 114 drivers/leds/leds-an30259a.c ret = regmap_write(led->chip->regmap, AN30259A_REG_LED_ON, led_on); led 118 drivers/leds/leds-an30259a.c ret = regmap_write(led->chip->regmap, AN30259A_REG_LEDCC(led->num), led 122 drivers/leds/leds-an30259a.c mutex_unlock(&led->chip->mutex); led 130 drivers/leds/leds-an30259a.c struct an30259a_led *led; led 135 drivers/leds/leds-an30259a.c led = container_of(cdev, struct an30259a_led, cdev); led 137 drivers/leds/leds-an30259a.c mutex_lock(&led->chip->mutex); led 138 drivers/leds/leds-an30259a.c num = led->num; led 163 drivers/leds/leds-an30259a.c ret = regmap_write(led->chip->regmap, AN30259A_REG_LEDCNT2(num), led 169 drivers/leds/leds-an30259a.c ret = regmap_write(led->chip->regmap, AN30259A_REG_LEDCNT3(num), led 173 drivers/leds/leds-an30259a.c ret = regmap_write(led->chip->regmap, AN30259A_REG_LEDCNT4(num), led 179 drivers/leds/leds-an30259a.c ret = regmap_write(led->chip->regmap, AN30259A_REG_SLOPE(num), led 186 drivers/leds/leds-an30259a.c ret = regmap_read(led->chip->regmap, AN30259A_REG_LED_ON, &led_on); led 190 drivers/leds/leds-an30259a.c led_on |= AN30259A_LED_SLOPE(num) | AN30259A_LED_EN(led->num); led 192 drivers/leds/leds-an30259a.c ret = regmap_write(led->chip->regmap, AN30259A_REG_LED_ON, led_on); led 195 drivers/leds/leds-an30259a.c led->sloping = true; led 197 drivers/leds/leds-an30259a.c mutex_unlock(&led->chip->mutex); led 209 drivers/leds/leds-an30259a.c struct an30259a_led *led; led 226 drivers/leds/leds-an30259a.c led = &chip->leds[i]; led 228 drivers/leds/leds-an30259a.c led->num = source; led 229 drivers/leds/leds-an30259a.c led->chip = chip; led 230 drivers/leds/leds-an30259a.c led->fwnode = of_fwnode_handle(child); led 234 drivers/leds/leds-an30259a.c led->default_state = STATE_ON; led 236 drivers/leds/leds-an30259a.c led->default_state = STATE_KEEP; led 238 drivers/leds/leds-an30259a.c led->default_state = STATE_OFF; led 242 drivers/leds/leds-an30259a.c &led->cdev.default_trigger); led 261 drivers/leds/leds-an30259a.c static void an30259a_init_default_state(struct an30259a_led *led) led 263 drivers/leds/leds-an30259a.c struct an30259a *chip = led->chip; led 266 drivers/leds/leds-an30259a.c switch (led->default_state) { led 268 drivers/leds/leds-an30259a.c led->cdev.brightness = LED_FULL; led 275 drivers/leds/leds-an30259a.c if (!(led_on & AN30259A_LED_EN(led->num))) { led 276 drivers/leds/leds-an30259a.c led->cdev.brightness = LED_OFF; led 279 drivers/leds/leds-an30259a.c regmap_read(chip->regmap, AN30259A_REG_LEDCC(led->num), led 280 drivers/leds/leds-an30259a.c &led->cdev.brightness); led 283 drivers/leds/leds-an30259a.c led->cdev.brightness = LED_OFF; led 286 drivers/leds/leds-an30259a.c an30259a_brightness_set(&led->cdev, led->cdev.brightness); led 97 drivers/leds/leds-apu.c static void apu1_led_brightness_set(struct led_classdev *led, enum led_brightness value) led 99 drivers/leds/leds-apu.c struct apu_led_priv *pled = cdev_to_priv(led); led 634 drivers/leds/leds-as3645a.c struct led_classdev *led = &fled->led_cdev; led 652 drivers/leds/leds-as3645a.c strlcpy(cfg.dev_name, led->dev->kobj.name, sizeof(cfg.dev_name)); led 93 drivers/leds/leds-asic3.c struct asic3_led *led = dev_get_platdata(&pdev->dev); led 100 drivers/leds/leds-asic3.c led->cdev = devm_kzalloc(&pdev->dev, sizeof(struct led_classdev), led 102 drivers/leds/leds-asic3.c if (!led->cdev) { led 107 drivers/leds/leds-asic3.c led->cdev->name = led->name; led 108 drivers/leds/leds-asic3.c led->cdev->flags = LED_CORE_SUSPENDRESUME; led 109 drivers/leds/leds-asic3.c led->cdev->brightness_set = brightness_set; led 110 drivers/leds/leds-asic3.c led->cdev->blink_set = blink_set; led 111 drivers/leds/leds-asic3.c led->cdev->default_trigger = led->default_trigger; led 113 drivers/leds/leds-asic3.c ret = led_classdev_register(&pdev->dev, led->cdev); led 126 drivers/leds/leds-asic3.c struct asic3_led *led = dev_get_platdata(&pdev->dev); led 128 drivers/leds/leds-asic3.c led_classdev_unregister(led->cdev); led 105 drivers/leds/leds-bcm6328.c static void bcm6328_led_mode(struct bcm6328_led *led, unsigned long value) led 110 drivers/leds/leds-bcm6328.c shift = bcm6328_pin2shift(led->pin); led 112 drivers/leds/leds-bcm6328.c mode = led->mem + BCM6328_REG_MODE_HI; led 114 drivers/leds/leds-bcm6328.c mode = led->mem + BCM6328_REG_MODE_LO; led 125 drivers/leds/leds-bcm6328.c struct bcm6328_led *led = led 129 drivers/leds/leds-bcm6328.c spin_lock_irqsave(led->lock, flags); led 130 drivers/leds/leds-bcm6328.c *(led->blink_leds) &= ~BIT(led->pin); led 131 drivers/leds/leds-bcm6328.c if ((led->active_low && value == LED_OFF) || led 132 drivers/leds/leds-bcm6328.c (!led->active_low && value != LED_OFF)) led 133 drivers/leds/leds-bcm6328.c bcm6328_led_mode(led, BCM6328_LED_MODE_ON); led 135 drivers/leds/leds-bcm6328.c bcm6328_led_mode(led, BCM6328_LED_MODE_OFF); led 136 drivers/leds/leds-bcm6328.c spin_unlock_irqrestore(led->lock, flags); led 154 drivers/leds/leds-bcm6328.c struct bcm6328_led *led = led 178 drivers/leds/leds-bcm6328.c spin_lock_irqsave(led->lock, flags); led 179 drivers/leds/leds-bcm6328.c if (*(led->blink_leds) == 0 || led 180 drivers/leds/leds-bcm6328.c *(led->blink_leds) == BIT(led->pin) || led 181 drivers/leds/leds-bcm6328.c *(led->blink_delay) == delay) { led 184 drivers/leds/leds-bcm6328.c *(led->blink_leds) |= BIT(led->pin); led 185 drivers/leds/leds-bcm6328.c *(led->blink_delay) = delay; led 187 drivers/leds/leds-bcm6328.c val = bcm6328_led_read(led->mem + BCM6328_REG_INIT); led 190 drivers/leds/leds-bcm6328.c bcm6328_led_write(led->mem + BCM6328_REG_INIT, val); led 192 drivers/leds/leds-bcm6328.c bcm6328_led_mode(led, BCM6328_LED_MODE_BLINK); led 199 drivers/leds/leds-bcm6328.c spin_unlock_irqrestore(led->lock, flags); led 280 drivers/leds/leds-bcm6328.c struct bcm6328_led *led; led 284 drivers/leds/leds-bcm6328.c led = devm_kzalloc(dev, sizeof(*led), GFP_KERNEL); led 285 drivers/leds/leds-bcm6328.c if (!led) led 288 drivers/leds/leds-bcm6328.c led->pin = reg; led 289 drivers/leds/leds-bcm6328.c led->mem = mem; led 290 drivers/leds/leds-bcm6328.c led->lock = lock; led 291 drivers/leds/leds-bcm6328.c led->blink_leds = blink_leds; led 292 drivers/leds/leds-bcm6328.c led->blink_delay = blink_delay; led 295 drivers/leds/leds-bcm6328.c led->active_low = true; led 297 drivers/leds/leds-bcm6328.c led->cdev.name = of_get_property(nc, "label", NULL) ? : nc->name; led 298 drivers/leds/leds-bcm6328.c led->cdev.default_trigger = of_get_property(nc, led 304 drivers/leds/leds-bcm6328.c led->cdev.brightness = LED_FULL; led 309 drivers/leds/leds-bcm6328.c shift = bcm6328_pin2shift(led->pin); led 318 drivers/leds/leds-bcm6328.c if ((led->active_low && val == BCM6328_LED_MODE_OFF) || led 319 drivers/leds/leds-bcm6328.c (!led->active_low && val == BCM6328_LED_MODE_ON)) led 320 drivers/leds/leds-bcm6328.c led->cdev.brightness = LED_FULL; led 322 drivers/leds/leds-bcm6328.c led->cdev.brightness = LED_OFF; led 324 drivers/leds/leds-bcm6328.c led->cdev.brightness = LED_OFF; led 327 drivers/leds/leds-bcm6328.c led->cdev.brightness = LED_OFF; led 330 drivers/leds/leds-bcm6328.c bcm6328_led_set(&led->cdev, led->cdev.brightness); led 332 drivers/leds/leds-bcm6328.c led->cdev.brightness_set = bcm6328_led_set; led 333 drivers/leds/leds-bcm6328.c led->cdev.blink_set = bcm6328_blink_set; led 335 drivers/leds/leds-bcm6328.c rc = led_classdev_register(dev, &led->cdev); led 339 drivers/leds/leds-bcm6328.c dev_dbg(dev, "registered LED %s\n", led->cdev.name); led 78 drivers/leds/leds-bcm6358.c struct bcm6358_led *led = led 82 drivers/leds/leds-bcm6358.c spin_lock_irqsave(led->lock, flags); led 83 drivers/leds/leds-bcm6358.c bcm6358_led_busy(led->mem); led 84 drivers/leds/leds-bcm6358.c val = bcm6358_led_read(led->mem + BCM6358_REG_MODE); led 85 drivers/leds/leds-bcm6358.c if ((led->active_low && value == LED_OFF) || led 86 drivers/leds/leds-bcm6358.c (!led->active_low && value != LED_OFF)) led 87 drivers/leds/leds-bcm6358.c val |= BIT(led->pin); led 89 drivers/leds/leds-bcm6358.c val &= ~(BIT(led->pin)); led 90 drivers/leds/leds-bcm6358.c bcm6358_led_write(led->mem + BCM6358_REG_MODE, val); led 91 drivers/leds/leds-bcm6358.c spin_unlock_irqrestore(led->lock, flags); led 97 drivers/leds/leds-bcm6358.c struct bcm6358_led *led; led 101 drivers/leds/leds-bcm6358.c led = devm_kzalloc(dev, sizeof(*led), GFP_KERNEL); led 102 drivers/leds/leds-bcm6358.c if (!led) led 105 drivers/leds/leds-bcm6358.c led->pin = reg; led 106 drivers/leds/leds-bcm6358.c led->mem = mem; led 107 drivers/leds/leds-bcm6358.c led->lock = lock; led 110 drivers/leds/leds-bcm6358.c led->active_low = true; led 112 drivers/leds/leds-bcm6358.c led->cdev.name = of_get_property(nc, "label", NULL) ? : nc->name; led 113 drivers/leds/leds-bcm6358.c led->cdev.default_trigger = of_get_property(nc, led 119 drivers/leds/leds-bcm6358.c led->cdev.brightness = LED_FULL; led 122 drivers/leds/leds-bcm6358.c val = bcm6358_led_read(led->mem + BCM6358_REG_MODE); led 123 drivers/leds/leds-bcm6358.c val &= BIT(led->pin); led 124 drivers/leds/leds-bcm6358.c if ((led->active_low && !val) || led 125 drivers/leds/leds-bcm6358.c (!led->active_low && val)) led 126 drivers/leds/leds-bcm6358.c led->cdev.brightness = LED_FULL; led 128 drivers/leds/leds-bcm6358.c led->cdev.brightness = LED_OFF; led 130 drivers/leds/leds-bcm6358.c led->cdev.brightness = LED_OFF; led 133 drivers/leds/leds-bcm6358.c led->cdev.brightness = LED_OFF; led 136 drivers/leds/leds-bcm6358.c bcm6358_led_set(&led->cdev, led->cdev.brightness); led 138 drivers/leds/leds-bcm6358.c led->cdev.brightness_set = bcm6358_led_set; led 140 drivers/leds/leds-bcm6358.c rc = led_classdev_register(dev, &led->cdev); led 144 drivers/leds/leds-bcm6358.c dev_dbg(dev, "registered LED %s\n", led->cdev.name); led 72 drivers/leds/leds-bd2802.c struct led_state led[2]; led 107 drivers/leds/leds-bd2802.c static inline int bd2802_is_rgb_off(struct bd2802_led *led, enum led_ids id, led 112 drivers/leds/leds-bd2802.c return !led->led[id].r; led 114 drivers/leds/leds-bd2802.c return !led->led[id].g; led 116 drivers/leds/leds-bd2802.c return !led->led[id].b; led 118 drivers/leds/leds-bd2802.c dev_err(&led->client->dev, "%s: Invalid color\n", __func__); led 123 drivers/leds/leds-bd2802.c static inline int bd2802_is_led_off(struct bd2802_led *led, enum led_ids id) led 125 drivers/leds/leds-bd2802.c if (led->led[id].r || led->led[id].g || led->led[id].b) led 131 drivers/leds/leds-bd2802.c static inline int bd2802_is_all_off(struct bd2802_led *led) led 136 drivers/leds/leds-bd2802.c if (!bd2802_is_led_off(led, i)) led 170 drivers/leds/leds-bd2802.c static void bd2802_update_state(struct bd2802_led *led, enum led_ids id, led 180 drivers/leds/leds-bd2802.c led->led[i].r = led_bit; led 183 drivers/leds/leds-bd2802.c led->led[i].g = led_bit; led 186 drivers/leds/leds-bd2802.c led->led[i].b = led_bit; led 189 drivers/leds/leds-bd2802.c dev_err(&led->client->dev, led 199 drivers/leds/leds-bd2802.c if (!bd2802_is_led_off(led, id)) led 202 drivers/leds/leds-bd2802.c if (bd2802_is_all_off(led) && !led->adf_on) { led 203 drivers/leds/leds-bd2802.c gpio_set_value(led->pdata->reset_gpio, 0); led 212 drivers/leds/leds-bd2802.c bd2802_write_byte(led->client, BD2802_REG_CONTROL, value); led 215 drivers/leds/leds-bd2802.c static void bd2802_configure(struct bd2802_led *led) led 217 drivers/leds/leds-bd2802.c struct bd2802_led_platform_data *pdata = led->pdata; led 221 drivers/leds/leds-bd2802.c bd2802_write_byte(led->client, reg, pdata->rgb_time); led 224 drivers/leds/leds-bd2802.c bd2802_write_byte(led->client, reg, pdata->rgb_time); led 227 drivers/leds/leds-bd2802.c static void bd2802_reset_cancel(struct bd2802_led *led) led 229 drivers/leds/leds-bd2802.c gpio_set_value(led->pdata->reset_gpio, 1); led 231 drivers/leds/leds-bd2802.c bd2802_configure(led); led 234 drivers/leds/leds-bd2802.c static void bd2802_enable(struct bd2802_led *led, enum led_ids id) led 239 drivers/leds/leds-bd2802.c other_led_on = !bd2802_is_led_off(led, other_led); led 245 drivers/leds/leds-bd2802.c bd2802_write_byte(led->client, BD2802_REG_CONTROL, value); led 248 drivers/leds/leds-bd2802.c static void bd2802_set_on(struct bd2802_led *led, enum led_ids id, led 253 drivers/leds/leds-bd2802.c if (bd2802_is_all_off(led) && !led->adf_on) led 254 drivers/leds/leds-bd2802.c bd2802_reset_cancel(led); led 257 drivers/leds/leds-bd2802.c bd2802_write_byte(led->client, reg, led->rgb_current); led 259 drivers/leds/leds-bd2802.c bd2802_write_byte(led->client, reg, BD2802_CURRENT_000); led 261 drivers/leds/leds-bd2802.c bd2802_write_byte(led->client, reg, BD2802_PATTERN_FULL); led 263 drivers/leds/leds-bd2802.c bd2802_enable(led, id); led 264 drivers/leds/leds-bd2802.c bd2802_update_state(led, id, color, BD2802_ON); led 267 drivers/leds/leds-bd2802.c static void bd2802_set_blink(struct bd2802_led *led, enum led_ids id, led 272 drivers/leds/leds-bd2802.c if (bd2802_is_all_off(led) && !led->adf_on) led 273 drivers/leds/leds-bd2802.c bd2802_reset_cancel(led); led 276 drivers/leds/leds-bd2802.c bd2802_write_byte(led->client, reg, BD2802_CURRENT_000); led 278 drivers/leds/leds-bd2802.c bd2802_write_byte(led->client, reg, led->rgb_current); led 280 drivers/leds/leds-bd2802.c bd2802_write_byte(led->client, reg, led->wave_pattern); led 282 drivers/leds/leds-bd2802.c bd2802_enable(led, id); led 283 drivers/leds/leds-bd2802.c bd2802_update_state(led, id, color, BD2802_BLINK); led 286 drivers/leds/leds-bd2802.c static void bd2802_turn_on(struct bd2802_led *led, enum led_ids id, led 290 drivers/leds/leds-bd2802.c dev_err(&led->client->dev, led 296 drivers/leds/leds-bd2802.c bd2802_set_blink(led, id, color); led 298 drivers/leds/leds-bd2802.c bd2802_set_on(led, id, color); led 301 drivers/leds/leds-bd2802.c static void bd2802_turn_off(struct bd2802_led *led, enum led_ids id, led 306 drivers/leds/leds-bd2802.c if (bd2802_is_rgb_off(led, id, color)) led 310 drivers/leds/leds-bd2802.c bd2802_write_byte(led->client, reg, BD2802_CURRENT_000); led 312 drivers/leds/leds-bd2802.c bd2802_write_byte(led->client, reg, BD2802_CURRENT_000); led 314 drivers/leds/leds-bd2802.c bd2802_update_state(led, id, color, BD2802_OFF); led 321 drivers/leds/leds-bd2802.c struct bd2802_led *led = i2c_get_clientdata(to_i2c_client(dev));\ led 329 drivers/leds/leds-bd2802.c down_write(&led->rwsem); \ led 330 drivers/leds/leds-bd2802.c bd2802_write_byte(led->client, reg_addr, (u8) val); \ led 331 drivers/leds/leds-bd2802.c up_write(&led->rwsem); \ led 387 drivers/leds/leds-bd2802.c static void bd2802_enable_adv_conf(struct bd2802_led *led) led 392 drivers/leds/leds-bd2802.c ret = device_create_file(&led->client->dev, led 395 drivers/leds/leds-bd2802.c dev_err(&led->client->dev, "failed: sysfs file %s\n", led 401 drivers/leds/leds-bd2802.c if (bd2802_is_all_off(led)) led 402 drivers/leds/leds-bd2802.c bd2802_reset_cancel(led); led 404 drivers/leds/leds-bd2802.c led->adf_on = 1; led 410 drivers/leds/leds-bd2802.c device_remove_file(&led->client->dev, led 414 drivers/leds/leds-bd2802.c static void bd2802_disable_adv_conf(struct bd2802_led *led) led 419 drivers/leds/leds-bd2802.c device_remove_file(&led->client->dev, led 422 drivers/leds/leds-bd2802.c if (bd2802_is_all_off(led)) led 423 drivers/leds/leds-bd2802.c gpio_set_value(led->pdata->reset_gpio, 0); led 425 drivers/leds/leds-bd2802.c led->adf_on = 0; led 431 drivers/leds/leds-bd2802.c struct bd2802_led *led = i2c_get_clientdata(to_i2c_client(dev)); led 434 drivers/leds/leds-bd2802.c down_read(&led->rwsem); led 435 drivers/leds/leds-bd2802.c if (led->adf_on) led 439 drivers/leds/leds-bd2802.c up_read(&led->rwsem); led 447 drivers/leds/leds-bd2802.c struct bd2802_led *led = i2c_get_clientdata(to_i2c_client(dev)); led 452 drivers/leds/leds-bd2802.c down_write(&led->rwsem); led 453 drivers/leds/leds-bd2802.c if (!led->adf_on && !strncmp(buf, "on", 2)) led 454 drivers/leds/leds-bd2802.c bd2802_enable_adv_conf(led); led 455 drivers/leds/leds-bd2802.c else if (led->adf_on && !strncmp(buf, "off", 3)) led 456 drivers/leds/leds-bd2802.c bd2802_disable_adv_conf(led); led 457 drivers/leds/leds-bd2802.c up_write(&led->rwsem); led 475 drivers/leds/leds-bd2802.c struct bd2802_led *led = i2c_get_clientdata(to_i2c_client(dev));\ led 477 drivers/leds/leds-bd2802.c down_read(&led->rwsem); \ led 478 drivers/leds/leds-bd2802.c ret = sprintf(buf, "0x%02x\n", led->attr_name); \ led 479 drivers/leds/leds-bd2802.c up_read(&led->rwsem); \ led 485 drivers/leds/leds-bd2802.c struct bd2802_led *led = i2c_get_clientdata(to_i2c_client(dev));\ led 493 drivers/leds/leds-bd2802.c down_write(&led->rwsem); \ led 494 drivers/leds/leds-bd2802.c led->attr_name = val; \ led 495 drivers/leds/leds-bd2802.c up_write(&led->rwsem); \ led 520 drivers/leds/leds-bd2802.c struct bd2802_led *led = \ led 522 drivers/leds/leds-bd2802.c led->led_id = id; \ led 523 drivers/leds/leds-bd2802.c led->color = clr; \ led 525 drivers/leds/leds-bd2802.c led->state = BD2802_OFF; \ led 526 drivers/leds/leds-bd2802.c bd2802_turn_off(led, led->led_id, led->color); \ led 528 drivers/leds/leds-bd2802.c led->state = BD2802_ON; \ led 529 drivers/leds/leds-bd2802.c bd2802_turn_on(led, led->led_id, led->color, BD2802_ON);\ led 536 drivers/leds/leds-bd2802.c struct bd2802_led *led = \ led 540 drivers/leds/leds-bd2802.c led->led_id = id; \ led 541 drivers/leds/leds-bd2802.c led->color = clr; \ led 542 drivers/leds/leds-bd2802.c led->state = BD2802_BLINK; \ led 543 drivers/leds/leds-bd2802.c bd2802_turn_on(led, led->led_id, led->color, BD2802_BLINK); \ led 554 drivers/leds/leds-bd2802.c static int bd2802_register_led_classdev(struct bd2802_led *led) led 558 drivers/leds/leds-bd2802.c led->cdev_led1r.name = "led1_R"; led 559 drivers/leds/leds-bd2802.c led->cdev_led1r.brightness = LED_OFF; led 560 drivers/leds/leds-bd2802.c led->cdev_led1r.brightness_set_blocking = bd2802_set_led1r_brightness; led 561 drivers/leds/leds-bd2802.c led->cdev_led1r.blink_set = bd2802_set_led1r_blink; led 563 drivers/leds/leds-bd2802.c ret = led_classdev_register(&led->client->dev, &led->cdev_led1r); led 565 drivers/leds/leds-bd2802.c dev_err(&led->client->dev, "couldn't register LED %s\n", led 566 drivers/leds/leds-bd2802.c led->cdev_led1r.name); led 570 drivers/leds/leds-bd2802.c led->cdev_led1g.name = "led1_G"; led 571 drivers/leds/leds-bd2802.c led->cdev_led1g.brightness = LED_OFF; led 572 drivers/leds/leds-bd2802.c led->cdev_led1g.brightness_set_blocking = bd2802_set_led1g_brightness; led 573 drivers/leds/leds-bd2802.c led->cdev_led1g.blink_set = bd2802_set_led1g_blink; led 575 drivers/leds/leds-bd2802.c ret = led_classdev_register(&led->client->dev, &led->cdev_led1g); led 577 drivers/leds/leds-bd2802.c dev_err(&led->client->dev, "couldn't register LED %s\n", led 578 drivers/leds/leds-bd2802.c led->cdev_led1g.name); led 582 drivers/leds/leds-bd2802.c led->cdev_led1b.name = "led1_B"; led 583 drivers/leds/leds-bd2802.c led->cdev_led1b.brightness = LED_OFF; led 584 drivers/leds/leds-bd2802.c led->cdev_led1b.brightness_set_blocking = bd2802_set_led1b_brightness; led 585 drivers/leds/leds-bd2802.c led->cdev_led1b.blink_set = bd2802_set_led1b_blink; led 587 drivers/leds/leds-bd2802.c ret = led_classdev_register(&led->client->dev, &led->cdev_led1b); led 589 drivers/leds/leds-bd2802.c dev_err(&led->client->dev, "couldn't register LED %s\n", led 590 drivers/leds/leds-bd2802.c led->cdev_led1b.name); led 594 drivers/leds/leds-bd2802.c led->cdev_led2r.name = "led2_R"; led 595 drivers/leds/leds-bd2802.c led->cdev_led2r.brightness = LED_OFF; led 596 drivers/leds/leds-bd2802.c led->cdev_led2r.brightness_set_blocking = bd2802_set_led2r_brightness; led 597 drivers/leds/leds-bd2802.c led->cdev_led2r.blink_set = bd2802_set_led2r_blink; led 599 drivers/leds/leds-bd2802.c ret = led_classdev_register(&led->client->dev, &led->cdev_led2r); led 601 drivers/leds/leds-bd2802.c dev_err(&led->client->dev, "couldn't register LED %s\n", led 602 drivers/leds/leds-bd2802.c led->cdev_led2r.name); led 606 drivers/leds/leds-bd2802.c led->cdev_led2g.name = "led2_G"; led 607 drivers/leds/leds-bd2802.c led->cdev_led2g.brightness = LED_OFF; led 608 drivers/leds/leds-bd2802.c led->cdev_led2g.brightness_set_blocking = bd2802_set_led2g_brightness; led 609 drivers/leds/leds-bd2802.c led->cdev_led2g.blink_set = bd2802_set_led2g_blink; led 611 drivers/leds/leds-bd2802.c ret = led_classdev_register(&led->client->dev, &led->cdev_led2g); led 613 drivers/leds/leds-bd2802.c dev_err(&led->client->dev, "couldn't register LED %s\n", led 614 drivers/leds/leds-bd2802.c led->cdev_led2g.name); led 618 drivers/leds/leds-bd2802.c led->cdev_led2b.name = "led2_B"; led 619 drivers/leds/leds-bd2802.c led->cdev_led2b.brightness = LED_OFF; led 620 drivers/leds/leds-bd2802.c led->cdev_led2b.brightness_set_blocking = bd2802_set_led2b_brightness; led 621 drivers/leds/leds-bd2802.c led->cdev_led2b.blink_set = bd2802_set_led2b_blink; led 622 drivers/leds/leds-bd2802.c led->cdev_led2b.flags |= LED_CORE_SUSPENDRESUME; led 624 drivers/leds/leds-bd2802.c ret = led_classdev_register(&led->client->dev, &led->cdev_led2b); led 626 drivers/leds/leds-bd2802.c dev_err(&led->client->dev, "couldn't register LED %s\n", led 627 drivers/leds/leds-bd2802.c led->cdev_led2b.name); led 634 drivers/leds/leds-bd2802.c led_classdev_unregister(&led->cdev_led2g); led 636 drivers/leds/leds-bd2802.c led_classdev_unregister(&led->cdev_led2r); led 638 drivers/leds/leds-bd2802.c led_classdev_unregister(&led->cdev_led1b); led 640 drivers/leds/leds-bd2802.c led_classdev_unregister(&led->cdev_led1g); led 642 drivers/leds/leds-bd2802.c led_classdev_unregister(&led->cdev_led1r); led 648 drivers/leds/leds-bd2802.c static void bd2802_unregister_led_classdev(struct bd2802_led *led) led 650 drivers/leds/leds-bd2802.c led_classdev_unregister(&led->cdev_led2b); led 651 drivers/leds/leds-bd2802.c led_classdev_unregister(&led->cdev_led2g); led 652 drivers/leds/leds-bd2802.c led_classdev_unregister(&led->cdev_led2r); led 653 drivers/leds/leds-bd2802.c led_classdev_unregister(&led->cdev_led1b); led 654 drivers/leds/leds-bd2802.c led_classdev_unregister(&led->cdev_led1g); led 655 drivers/leds/leds-bd2802.c led_classdev_unregister(&led->cdev_led1r); led 661 drivers/leds/leds-bd2802.c struct bd2802_led *led; led 665 drivers/leds/leds-bd2802.c led = devm_kzalloc(&client->dev, sizeof(struct bd2802_led), GFP_KERNEL); led 666 drivers/leds/leds-bd2802.c if (!led) led 669 drivers/leds/leds-bd2802.c led->client = client; led 670 drivers/leds/leds-bd2802.c pdata = led->pdata = dev_get_platdata(&client->dev); led 671 drivers/leds/leds-bd2802.c i2c_set_clientdata(client, led); led 688 drivers/leds/leds-bd2802.c gpio_set_value(led->pdata->reset_gpio, 0); led 691 drivers/leds/leds-bd2802.c led->wave_pattern = BD2802_PATTERN_HALF; led 692 drivers/leds/leds-bd2802.c led->rgb_current = BD2802_CURRENT_032; led 694 drivers/leds/leds-bd2802.c init_rwsem(&led->rwsem); led 697 drivers/leds/leds-bd2802.c ret = device_create_file(&led->client->dev, led 700 drivers/leds/leds-bd2802.c dev_err(&led->client->dev, "failed: sysfs file %s\n", led 706 drivers/leds/leds-bd2802.c ret = bd2802_register_led_classdev(led); led 714 drivers/leds/leds-bd2802.c device_remove_file(&led->client->dev, bd2802_attributes[i]); led 720 drivers/leds/leds-bd2802.c struct bd2802_led *led = i2c_get_clientdata(client); led 723 drivers/leds/leds-bd2802.c gpio_set_value(led->pdata->reset_gpio, 0); led 724 drivers/leds/leds-bd2802.c bd2802_unregister_led_classdev(led); led 725 drivers/leds/leds-bd2802.c if (led->adf_on) led 726 drivers/leds/leds-bd2802.c bd2802_disable_adv_conf(led); led 728 drivers/leds/leds-bd2802.c device_remove_file(&led->client->dev, bd2802_attributes[i]); led 734 drivers/leds/leds-bd2802.c static void bd2802_restore_state(struct bd2802_led *led) led 739 drivers/leds/leds-bd2802.c if (led->led[i].r) led 740 drivers/leds/leds-bd2802.c bd2802_turn_on(led, i, RED, led->led[i].r); led 741 drivers/leds/leds-bd2802.c if (led->led[i].g) led 742 drivers/leds/leds-bd2802.c bd2802_turn_on(led, i, GREEN, led->led[i].g); led 743 drivers/leds/leds-bd2802.c if (led->led[i].b) led 744 drivers/leds/leds-bd2802.c bd2802_turn_on(led, i, BLUE, led->led[i].b); led 751 drivers/leds/leds-bd2802.c struct bd2802_led *led = i2c_get_clientdata(client); led 753 drivers/leds/leds-bd2802.c gpio_set_value(led->pdata->reset_gpio, 0); led 761 drivers/leds/leds-bd2802.c struct bd2802_led *led = i2c_get_clientdata(client); led 763 drivers/leds/leds-bd2802.c if (!bd2802_is_all_off(led) || led->adf_on) { led 764 drivers/leds/leds-bd2802.c bd2802_reset_cancel(led); led 765 drivers/leds/leds-bd2802.c bd2802_restore_state(led); led 426 drivers/leds/leds-blinkm.c struct blinkm_led *led = cdev_to_blmled(led_cdev); led 427 drivers/leds/leds-blinkm.c struct blinkm_data *data = i2c_get_clientdata(led->i2c_client); led 450 drivers/leds/leds-blinkm.c dev_err(&led->i2c_client->dev, "BlinkM: unknown color.\n"); led 454 drivers/leds/leds-blinkm.c blinkm_transfer_hw(led->i2c_client, BLM_GO_RGB); led 455 drivers/leds/leds-blinkm.c dev_dbg(&led->i2c_client->dev, led 573 drivers/leds/leds-blinkm.c struct blinkm_led *led[3]; led 604 drivers/leds/leds-blinkm.c led[i] = &data->blinkm_leds[i]; led 605 drivers/leds/leds-blinkm.c led[i]->i2c_client = client; led 606 drivers/leds/leds-blinkm.c led[i]->id = i; led 607 drivers/leds/leds-blinkm.c led[i]->led_cdev.max_brightness = 255; led 608 drivers/leds/leds-blinkm.c led[i]->led_cdev.flags = LED_CORE_SUSPENDRESUME; led 615 drivers/leds/leds-blinkm.c led[i]->led_cdev.name = blinkm_led_name; led 616 drivers/leds/leds-blinkm.c led[i]->led_cdev.brightness_set_blocking = led 619 drivers/leds/leds-blinkm.c &led[i]->led_cdev); led 623 drivers/leds/leds-blinkm.c led[i]->led_cdev.name); led 632 drivers/leds/leds-blinkm.c led[i]->led_cdev.name = blinkm_led_name; led 633 drivers/leds/leds-blinkm.c led[i]->led_cdev.brightness_set_blocking = led 636 drivers/leds/leds-blinkm.c &led[i]->led_cdev); led 640 drivers/leds/leds-blinkm.c led[i]->led_cdev.name); led 649 drivers/leds/leds-blinkm.c led[i]->led_cdev.name = blinkm_led_name; led 650 drivers/leds/leds-blinkm.c led[i]->led_cdev.brightness_set_blocking = led 653 drivers/leds/leds-blinkm.c &led[i]->led_cdev); led 657 drivers/leds/leds-blinkm.c led[i]->led_cdev.name); led 670 drivers/leds/leds-blinkm.c led_classdev_unregister(&led[GREEN]->led_cdev); led 673 drivers/leds/leds-blinkm.c led_classdev_unregister(&led[RED]->led_cdev); led 62 drivers/leds/leds-cpcap.c struct led_classdev led; led 81 drivers/leds/leds-cpcap.c static int cpcap_led_set_power(struct cpcap_led *led, bool status) led 85 drivers/leds/leds-cpcap.c if (status == led->powered) led 89 drivers/leds/leds-cpcap.c err = regulator_enable(led->vdd); led 91 drivers/leds/leds-cpcap.c err = regulator_disable(led->vdd); led 94 drivers/leds/leds-cpcap.c dev_err(led->dev, "regulator failure: %d", err); led 98 drivers/leds/leds-cpcap.c led->powered = status; led 105 drivers/leds/leds-cpcap.c struct cpcap_led *led = container_of(ledc, struct cpcap_led, led); led 109 drivers/leds/leds-cpcap.c mutex_lock(&led->update_lock); led 112 drivers/leds/leds-cpcap.c err = cpcap_led_set_power(led, true); led 119 drivers/leds/leds-cpcap.c err = regmap_update_bits(led->regmap, led 120 drivers/leds/leds-cpcap.c led->info->reg, led->info->mask, CPCAP_LED_NO_CURRENT); led 122 drivers/leds/leds-cpcap.c dev_err(led->dev, "regmap failed: %d", err); led 131 drivers/leds/leds-cpcap.c err = regmap_update_bits(led->regmap, led->info->reg, led->info->mask, led 134 drivers/leds/leds-cpcap.c dev_err(led->dev, "regmap failed: %d", err); led 139 drivers/leds/leds-cpcap.c err = cpcap_led_set_power(led, false); led 145 drivers/leds/leds-cpcap.c mutex_unlock(&led->update_lock); led 162 drivers/leds/leds-cpcap.c struct cpcap_led *led; led 169 drivers/leds/leds-cpcap.c led = devm_kzalloc(&pdev->dev, sizeof(*led), GFP_KERNEL); led 170 drivers/leds/leds-cpcap.c if (!led) led 172 drivers/leds/leds-cpcap.c platform_set_drvdata(pdev, led); led 173 drivers/leds/leds-cpcap.c led->info = match->data; led 174 drivers/leds/leds-cpcap.c led->dev = &pdev->dev; led 176 drivers/leds/leds-cpcap.c if (led->info->reg == 0x0000) { led 177 drivers/leds/leds-cpcap.c dev_err(led->dev, "Unsupported LED"); led 181 drivers/leds/leds-cpcap.c led->regmap = dev_get_regmap(pdev->dev.parent, NULL); led 182 drivers/leds/leds-cpcap.c if (!led->regmap) led 185 drivers/leds/leds-cpcap.c led->vdd = devm_regulator_get(&pdev->dev, "vdd"); led 186 drivers/leds/leds-cpcap.c if (IS_ERR(led->vdd)) { led 187 drivers/leds/leds-cpcap.c err = PTR_ERR(led->vdd); led 188 drivers/leds/leds-cpcap.c dev_err(led->dev, "Couldn't get regulator: %d", err); led 192 drivers/leds/leds-cpcap.c err = device_property_read_string(&pdev->dev, "label", &led->led.name); led 194 drivers/leds/leds-cpcap.c dev_err(led->dev, "Couldn't read LED label: %d", err); led 198 drivers/leds/leds-cpcap.c if (led->info->init_mask) { led 199 drivers/leds/leds-cpcap.c err = regmap_update_bits(led->regmap, led->info->reg, led 200 drivers/leds/leds-cpcap.c led->info->init_mask, led->info->init_val); led 202 drivers/leds/leds-cpcap.c dev_err(led->dev, "regmap failed: %d", err); led 207 drivers/leds/leds-cpcap.c mutex_init(&led->update_lock); led 209 drivers/leds/leds-cpcap.c led->led.max_brightness = led->info->limit; led 210 drivers/leds/leds-cpcap.c led->led.brightness_set_blocking = cpcap_led_set; led 211 drivers/leds/leds-cpcap.c err = devm_led_classdev_register(&pdev->dev, &led->led); led 213 drivers/leds/leds-cpcap.c dev_err(led->dev, "Couldn't register LED: %d", err); led 166 drivers/leds/leds-cr0014114.c struct cr0014114_led *led = container_of(ldev, led 170 drivers/leds/leds-cr0014114.c dev_dbg(led->priv->dev, "Set brightness to %d\n", brightness); led 172 drivers/leds/leds-cr0014114.c mutex_lock(&led->priv->lock); led 173 drivers/leds/leds-cr0014114.c led->brightness = (u8)brightness; led 174 drivers/leds/leds-cr0014114.c ret = cr0014114_sync(led->priv); led 175 drivers/leds/leds-cr0014114.c mutex_unlock(&led->priv->lock); led 183 drivers/leds/leds-cr0014114.c struct cr0014114_led *led; led 189 drivers/leds/leds-cr0014114.c led = &priv->leds[i]; led 192 drivers/leds/leds-cr0014114.c &led->ldev.default_trigger); led 194 drivers/leds/leds-cr0014114.c led->priv = priv; led 195 drivers/leds/leds-cr0014114.c led->ldev.max_brightness = CR_MAX_BRIGHTNESS; led 196 drivers/leds/leds-cr0014114.c led->ldev.brightness_set_blocking = cr0014114_set_sync; led 202 drivers/leds/leds-cr0014114.c ret = devm_led_classdev_register_ext(priv->dev, &led->ldev, led 43 drivers/leds/leds-da903x.c struct da903x_led *led = led 48 drivers/leds/leds-da903x.c switch (led->id) { led 54 drivers/leds/leds-da903x.c offset = DA9030_LED_OFFSET(led->id); led 55 drivers/leds/leds-da903x.c val = led->flags & ~0x87; led 58 drivers/leds/leds-da903x.c ret = da903x_write(led->master, DA9030_LED1_CONTROL + offset, led 62 drivers/leds/leds-da903x.c val = led->flags & ~0x80; led 64 drivers/leds/leds-da903x.c ret = da903x_write(led->master, DA9030_MISC_CONTROL_A, val); led 68 drivers/leds/leds-da903x.c offset = DA9034_LED_OFFSET(led->id); led 70 drivers/leds/leds-da903x.c val |= (led->flags & DA9034_LED_RAMP) ? 0x80 : 0; led 71 drivers/leds/leds-da903x.c ret = da903x_write(led->master, DA9034_LED1_CONTROL + offset, led 76 drivers/leds/leds-da903x.c ret = da903x_write(led->master, DA9034_VIBRA, val); led 86 drivers/leds/leds-da903x.c struct da903x_led *led; led 100 drivers/leds/leds-da903x.c led = devm_kzalloc(&pdev->dev, sizeof(struct da903x_led), GFP_KERNEL); led 101 drivers/leds/leds-da903x.c if (!led) led 104 drivers/leds/leds-da903x.c led->cdev.name = pdata->name; led 105 drivers/leds/leds-da903x.c led->cdev.default_trigger = pdata->default_trigger; led 106 drivers/leds/leds-da903x.c led->cdev.brightness_set_blocking = da903x_led_set; led 107 drivers/leds/leds-da903x.c led->cdev.brightness = LED_OFF; led 109 drivers/leds/leds-da903x.c led->id = id; led 110 drivers/leds/leds-da903x.c led->flags = pdata->flags; led 111 drivers/leds/leds-da903x.c led->master = pdev->dev.parent; led 113 drivers/leds/leds-da903x.c ret = devm_led_classdev_register(led->master, &led->cdev); led 39 drivers/leds/leds-da9052.c static int da9052_set_led_brightness(struct da9052_led *led, led 47 drivers/leds/leds-da9052.c error = da9052_reg_write(led->da9052, led_reg[led->led_index], val); led 49 drivers/leds/leds-da9052.c dev_err(led->da9052->dev, "Failed to set led brightness, %d\n", led 57 drivers/leds/leds-da9052.c struct da9052_led *led = led 60 drivers/leds/leds-da9052.c return da9052_set_led_brightness(led, value); led 94 drivers/leds/leds-da9052.c struct da9052_led *led = NULL; led 111 drivers/leds/leds-da9052.c led = devm_kcalloc(&pdev->dev, led 114 drivers/leds/leds-da9052.c if (!led) { led 120 drivers/leds/leds-da9052.c led[i].cdev.name = pled->leds[i].name; led 121 drivers/leds/leds-da9052.c led[i].cdev.brightness_set_blocking = da9052_led_set; led 122 drivers/leds/leds-da9052.c led[i].cdev.brightness = LED_OFF; led 123 drivers/leds/leds-da9052.c led[i].cdev.max_brightness = DA9052_MAX_BRIGHTNESS; led 124 drivers/leds/leds-da9052.c led[i].led_index = pled->leds[i].flags; led 125 drivers/leds/leds-da9052.c led[i].da9052 = dev_get_drvdata(pdev->dev.parent); led 127 drivers/leds/leds-da9052.c error = led_classdev_register(pdev->dev.parent, &led[i].cdev); led 130 drivers/leds/leds-da9052.c led[i].led_index); led 134 drivers/leds/leds-da9052.c error = da9052_set_led_brightness(&led[i], led 135 drivers/leds/leds-da9052.c led[i].cdev.brightness); led 138 drivers/leds/leds-da9052.c led[i].led_index); led 142 drivers/leds/leds-da9052.c error = da9052_configure_leds(led->da9052); led 148 drivers/leds/leds-da9052.c platform_set_drvdata(pdev, led); led 154 drivers/leds/leds-da9052.c led_classdev_unregister(&led[i].cdev); led 161 drivers/leds/leds-da9052.c struct da9052_led *led = platform_get_drvdata(pdev); led 172 drivers/leds/leds-da9052.c da9052_set_led_brightness(&led[i], LED_OFF); led 173 drivers/leds/leds-da9052.c led_classdev_unregister(&led[i].cdev); led 36 drivers/leds/leds-dac124s085.c struct dac124s085_led *led = container_of(ldev, struct dac124s085_led, led 41 drivers/leds/leds-dac124s085.c mutex_lock(&led->mutex); led 42 drivers/leds/leds-dac124s085.c word = cpu_to_le16(((led->id) << 14) | REG_WRITE_UPDATE | led 44 drivers/leds/leds-dac124s085.c ret = spi_write(led->spi, (const u8 *)&word, sizeof(word)); led 45 drivers/leds/leds-dac124s085.c mutex_unlock(&led->mutex); led 53 drivers/leds/leds-dac124s085.c struct dac124s085_led *led; led 63 drivers/leds/leds-dac124s085.c led = dac->leds + i; led 64 drivers/leds/leds-dac124s085.c led->id = i; led 65 drivers/leds/leds-dac124s085.c led->spi = spi; led 66 drivers/leds/leds-dac124s085.c snprintf(led->name, sizeof(led->name), "dac124s085-%d", i); led 67 drivers/leds/leds-dac124s085.c mutex_init(&led->mutex); led 68 drivers/leds/leds-dac124s085.c led->ldev.name = led->name; led 69 drivers/leds/leds-dac124s085.c led->ldev.brightness = LED_OFF; led 70 drivers/leds/leds-dac124s085.c led->ldev.max_brightness = 0xfff; led 71 drivers/leds/leds-dac124s085.c led->ldev.brightness_set_blocking = dac124s085_set_brightness; led 72 drivers/leds/leds-dac124s085.c ret = led_classdev_register(&spi->dev, &led->ldev); led 151 drivers/leds/leds-gpio.c struct gpio_led led = {}; led 159 drivers/leds/leds-gpio.c led.gpiod = devm_fwnode_get_gpiod_from_child(dev, NULL, child, led 162 drivers/leds/leds-gpio.c if (IS_ERR(led.gpiod)) { led 164 drivers/leds/leds-gpio.c return ERR_CAST(led.gpiod); led 167 drivers/leds/leds-gpio.c led_dat->gpiod = led.gpiod; led 170 drivers/leds/leds-gpio.c &led.default_trigger); led 175 drivers/leds/leds-gpio.c led.default_state = LEDS_GPIO_DEFSTATE_KEEP; led 177 drivers/leds/leds-gpio.c led.default_state = LEDS_GPIO_DEFSTATE_ON; led 179 drivers/leds/leds-gpio.c led.default_state = LEDS_GPIO_DEFSTATE_OFF; led 183 drivers/leds/leds-gpio.c led.retain_state_suspended = 1; led 185 drivers/leds/leds-gpio.c led.retain_state_shutdown = 1; led 187 drivers/leds/leds-gpio.c led.panic_indicator = 1; led 189 drivers/leds/leds-gpio.c ret = create_gpio_led(&led, led_dat, dev, child, NULL); led 309 drivers/leds/leds-gpio.c struct gpio_led_data *led = &priv->leds[i]; led 311 drivers/leds/leds-gpio.c if (!(led->cdev.flags & LED_RETAIN_AT_SHUTDOWN)) led 312 drivers/leds/leds-gpio.c gpio_led_set(&led->cdev, LED_OFF); led 110 drivers/leds/leds-is31fl319x.c struct is31fl319x_led *led = container_of(cdev, struct is31fl319x_led, led 112 drivers/leds/leds-is31fl319x.c struct is31fl319x_chip *is31 = led->chip; led 113 drivers/leds/leds-is31fl319x.c int chan = led - is31->leds; led 173 drivers/leds/leds-is31fl319x.c struct is31fl319x_led *led) led 175 drivers/leds/leds-is31fl319x.c struct led_classdev *cdev = &led->cdev; led 186 drivers/leds/leds-is31fl319x.c led->max_microamp = IS31FL319X_CURRENT_DEFAULT; led 188 drivers/leds/leds-is31fl319x.c &led->max_microamp); led 190 drivers/leds/leds-is31fl319x.c if (led->max_microamp < IS31FL319X_CURRENT_MIN) led 192 drivers/leds/leds-is31fl319x.c led->max_microamp = min(led->max_microamp, led 230 drivers/leds/leds-is31fl319x.c struct is31fl319x_led *led; led 245 drivers/leds/leds-is31fl319x.c led = &is31->leds[reg - 1]; led 247 drivers/leds/leds-is31fl319x.c if (led->configured) { led 253 drivers/leds/leds-is31fl319x.c ret = is31fl319x_parse_child_dt(dev, child, led); led 259 drivers/leds/leds-is31fl319x.c led->configured = true; led 387 drivers/leds/leds-is31fl319x.c struct is31fl319x_led *led = &is31->leds[i]; led 389 drivers/leds/leds-is31fl319x.c if (!led->configured) led 392 drivers/leds/leds-is31fl319x.c led->chip = is31; led 393 drivers/leds/leds-is31fl319x.c led->cdev.brightness_set_blocking = is31fl319x_brightness_set; led 395 drivers/leds/leds-is31fl319x.c err = devm_led_classdev_register(&client->dev, &led->cdev); led 95 drivers/leds/leds-ktd2692.c static void ktd2692_expresswire_start(struct ktd2692_context *led) led 97 drivers/leds/leds-ktd2692.c gpiod_direction_output(led->ctrl_gpio, KTD2692_HIGH); led 101 drivers/leds/leds-ktd2692.c static void ktd2692_expresswire_reset(struct ktd2692_context *led) led 103 drivers/leds/leds-ktd2692.c gpiod_direction_output(led->ctrl_gpio, KTD2692_LOW); led 107 drivers/leds/leds-ktd2692.c static void ktd2692_expresswire_end(struct ktd2692_context *led) led 109 drivers/leds/leds-ktd2692.c gpiod_direction_output(led->ctrl_gpio, KTD2692_LOW); led 111 drivers/leds/leds-ktd2692.c gpiod_direction_output(led->ctrl_gpio, KTD2692_HIGH); led 115 drivers/leds/leds-ktd2692.c static void ktd2692_expresswire_set_bit(struct ktd2692_context *led, bool bit) led 134 drivers/leds/leds-ktd2692.c gpiod_direction_output(led->ctrl_gpio, KTD2692_LOW); led 136 drivers/leds/leds-ktd2692.c gpiod_direction_output(led->ctrl_gpio, KTD2692_HIGH); led 139 drivers/leds/leds-ktd2692.c gpiod_direction_output(led->ctrl_gpio, KTD2692_LOW); led 141 drivers/leds/leds-ktd2692.c gpiod_direction_output(led->ctrl_gpio, KTD2692_HIGH); led 146 drivers/leds/leds-ktd2692.c static void ktd2692_expresswire_write(struct ktd2692_context *led, u8 value) led 150 drivers/leds/leds-ktd2692.c ktd2692_expresswire_start(led); led 152 drivers/leds/leds-ktd2692.c ktd2692_expresswire_set_bit(led, value & BIT(i)); led 153 drivers/leds/leds-ktd2692.c ktd2692_expresswire_end(led); led 160 drivers/leds/leds-ktd2692.c struct ktd2692_context *led = fled_cdev_to_led(fled_cdev); led 162 drivers/leds/leds-ktd2692.c mutex_lock(&led->lock); led 165 drivers/leds/leds-ktd2692.c led->mode = KTD2692_MODE_DISABLE; led 166 drivers/leds/leds-ktd2692.c gpiod_direction_output(led->aux_gpio, KTD2692_LOW); led 168 drivers/leds/leds-ktd2692.c ktd2692_expresswire_write(led, brightness | led 170 drivers/leds/leds-ktd2692.c led->mode = KTD2692_MODE_MOVIE; led 173 drivers/leds/leds-ktd2692.c ktd2692_expresswire_write(led, led->mode | KTD2692_REG_MODE_BASE); led 174 drivers/leds/leds-ktd2692.c mutex_unlock(&led->lock); led 182 drivers/leds/leds-ktd2692.c struct ktd2692_context *led = fled_cdev_to_led(fled_cdev); led 186 drivers/leds/leds-ktd2692.c mutex_lock(&led->lock); led 190 drivers/leds/leds-ktd2692.c ktd2692_expresswire_write(led, flash_tm_reg led 193 drivers/leds/leds-ktd2692.c led->mode = KTD2692_MODE_FLASH; led 194 drivers/leds/leds-ktd2692.c gpiod_direction_output(led->aux_gpio, KTD2692_HIGH); led 196 drivers/leds/leds-ktd2692.c led->mode = KTD2692_MODE_DISABLE; led 197 drivers/leds/leds-ktd2692.c gpiod_direction_output(led->aux_gpio, KTD2692_LOW); led 200 drivers/leds/leds-ktd2692.c ktd2692_expresswire_write(led, led->mode | KTD2692_REG_MODE_BASE); led 203 drivers/leds/leds-ktd2692.c led->mode = KTD2692_MODE_DISABLE; led 205 drivers/leds/leds-ktd2692.c mutex_unlock(&led->lock); led 247 drivers/leds/leds-ktd2692.c static void ktd2692_setup(struct ktd2692_context *led) led 249 drivers/leds/leds-ktd2692.c led->mode = KTD2692_MODE_DISABLE; led 250 drivers/leds/leds-ktd2692.c ktd2692_expresswire_reset(led); led 251 drivers/leds/leds-ktd2692.c gpiod_direction_output(led->aux_gpio, KTD2692_LOW); led 253 drivers/leds/leds-ktd2692.c ktd2692_expresswire_write(led, (KTD2692_MM_MIN_CURR_THRESHOLD_SCALE - 1) led 255 drivers/leds/leds-ktd2692.c ktd2692_expresswire_write(led, KTD2692_FLASH_MODE_CURR_PERCENT(45) led 259 drivers/leds/leds-ktd2692.c static int ktd2692_parse_dt(struct ktd2692_context *led, struct device *dev, led 269 drivers/leds/leds-ktd2692.c led->ctrl_gpio = devm_gpiod_get(dev, "ctrl", GPIOD_ASIS); led 270 drivers/leds/leds-ktd2692.c ret = PTR_ERR_OR_ZERO(led->ctrl_gpio); led 276 drivers/leds/leds-ktd2692.c led->aux_gpio = devm_gpiod_get(dev, "aux", GPIOD_ASIS); led 277 drivers/leds/leds-ktd2692.c ret = PTR_ERR_OR_ZERO(led->aux_gpio); led 283 drivers/leds/leds-ktd2692.c led->regulator = devm_regulator_get(dev, "vin"); led 284 drivers/leds/leds-ktd2692.c if (IS_ERR(led->regulator)) led 285 drivers/leds/leds-ktd2692.c led->regulator = NULL; led 287 drivers/leds/leds-ktd2692.c if (led->regulator) { led 288 drivers/leds/leds-ktd2692.c ret = regulator_enable(led->regulator); led 299 drivers/leds/leds-ktd2692.c led->fled_cdev.led_cdev.name = led 335 drivers/leds/leds-ktd2692.c struct ktd2692_context *led; led 341 drivers/leds/leds-ktd2692.c led = devm_kzalloc(&pdev->dev, sizeof(*led), GFP_KERNEL); led 342 drivers/leds/leds-ktd2692.c if (!led) led 345 drivers/leds/leds-ktd2692.c fled_cdev = &led->fled_cdev; led 348 drivers/leds/leds-ktd2692.c ret = ktd2692_parse_dt(led, &pdev->dev, &led_cfg); led 361 drivers/leds/leds-ktd2692.c mutex_init(&led->lock); led 363 drivers/leds/leds-ktd2692.c platform_set_drvdata(pdev, led); led 368 drivers/leds/leds-ktd2692.c mutex_destroy(&led->lock); led 372 drivers/leds/leds-ktd2692.c ktd2692_setup(led); led 379 drivers/leds/leds-ktd2692.c struct ktd2692_context *led = platform_get_drvdata(pdev); led 382 drivers/leds/leds-ktd2692.c led_classdev_flash_unregister(&led->fled_cdev); led 384 drivers/leds/leds-ktd2692.c if (led->regulator) { led 385 drivers/leds/leds-ktd2692.c ret = regulator_disable(led->regulator); led 391 drivers/leds/leds-ktd2692.c mutex_destroy(&led->lock); led 350 drivers/leds/leds-lm3532.c struct lm3532_led *led = led 355 drivers/leds/leds-lm3532.c mutex_lock(&led->priv->lock); led 357 drivers/leds/leds-lm3532.c if (led->mode == LM3532_ALS_CTRL) { led 359 drivers/leds/leds-lm3532.c ret = lm3532_led_enable(led); led 361 drivers/leds/leds-lm3532.c ret = lm3532_led_disable(led); led 367 drivers/leds/leds-lm3532.c ret = lm3532_led_disable(led); led 371 drivers/leds/leds-lm3532.c ret = lm3532_led_enable(led); led 375 drivers/leds/leds-lm3532.c brightness_reg = LM3532_REG_ZONE_TRGT_A + led->control_bank * 5 + led 376 drivers/leds/leds-lm3532.c (led->ctrl_brt_pointer >> 2); led 378 drivers/leds/leds-lm3532.c ret = regmap_write(led->priv->regmap, brightness_reg, brt_val); led 381 drivers/leds/leds-lm3532.c mutex_unlock(&led->priv->lock); led 385 drivers/leds/leds-lm3532.c static int lm3532_init_registers(struct lm3532_led *led) led 387 drivers/leds/leds-lm3532.c struct lm3532_data *drvdata = led->priv; led 401 drivers/leds/leds-lm3532.c brightness_config_reg = LM3532_REG_ZONE_CFG_A + led->control_bank * 2; led 407 drivers/leds/leds-lm3532.c &led->ctrl_brt_pointer); led 411 drivers/leds/leds-lm3532.c led->ctrl_brt_pointer &= LM3532_ZONE_MASK; led 412 drivers/leds/leds-lm3532.c brightness_config_val = led->ctrl_brt_pointer | led->mode; led 418 drivers/leds/leds-lm3532.c if (led->full_scale_current) { led 419 drivers/leds/leds-lm3532.c fs_current_reg = LM3532_REG_CTRL_A_FS_CURR + led->control_bank * 2; led 420 drivers/leds/leds-lm3532.c fs_current_val = (led->full_scale_current - LM3532_FS_CURR_MIN) / led 429 drivers/leds/leds-lm3532.c for (i = 0; i < led->num_leds; i++) { led 430 drivers/leds/leds-lm3532.c output_cfg_shift = led->led_strings[i] * 2; led 431 drivers/leds/leds-lm3532.c output_cfg_val |= (led->control_bank << output_cfg_shift); led 448 drivers/leds/leds-lm3532.c struct lm3532_led *led) led 549 drivers/leds/leds-lm3532.c struct lm3532_led *led; led 580 drivers/leds/leds-lm3532.c led = &priv->leds[i]; led 594 drivers/leds/leds-lm3532.c led->control_bank = control_bank; led 597 drivers/leds/leds-lm3532.c &led->mode); led 606 drivers/leds/leds-lm3532.c &led->full_scale_current)) led 610 drivers/leds/leds-lm3532.c led->full_scale_current = min(led->full_scale_current, led 613 drivers/leds/leds-lm3532.c if (led->mode == LM3532_BL_MODE_ALS) { led 614 drivers/leds/leds-lm3532.c led->mode = LM3532_ALS_CTRL; led 619 drivers/leds/leds-lm3532.c lm3532_als_configure(priv, led); led 621 drivers/leds/leds-lm3532.c led->mode = LM3532_I2C_CTRL; led 624 drivers/leds/leds-lm3532.c led->num_leds = fwnode_property_count_u32(child, "led-sources"); led 625 drivers/leds/leds-lm3532.c if (led->num_leds > LM3532_MAX_LED_STRINGS) { led 631 drivers/leds/leds-lm3532.c led->led_strings, led 632 drivers/leds/leds-lm3532.c led->num_leds); led 640 drivers/leds/leds-lm3532.c &led->led_dev.default_trigger); led 644 drivers/leds/leds-lm3532.c snprintf(led->label, sizeof(led->label), led 647 drivers/leds/leds-lm3532.c snprintf(led->label, sizeof(led->label), led 650 drivers/leds/leds-lm3532.c led->priv = priv; led 651 drivers/leds/leds-lm3532.c led->led_dev.name = led->label; led 652 drivers/leds/leds-lm3532.c led->led_dev.brightness_set_blocking = lm3532_brightness_set; led 654 drivers/leds/leds-lm3532.c ret = devm_led_classdev_register(priv->dev, &led->led_dev); led 662 drivers/leds/leds-lm3532.c ret = lm3532_init_registers(led); led 59 drivers/leds/leds-lm3533.c static inline int lm3533_led_get_ctrlbank_id(struct lm3533_led *led) led 61 drivers/leds/leds-lm3533.c return led->id + 2; led 64 drivers/leds/leds-lm3533.c static inline u8 lm3533_led_get_lv_reg(struct lm3533_led *led, u8 base) led 66 drivers/leds/leds-lm3533.c return base + led->id; led 69 drivers/leds/leds-lm3533.c static inline u8 lm3533_led_get_pattern(struct lm3533_led *led) led 71 drivers/leds/leds-lm3533.c return led->id; led 74 drivers/leds/leds-lm3533.c static inline u8 lm3533_led_get_pattern_reg(struct lm3533_led *led, led 77 drivers/leds/leds-lm3533.c return base + lm3533_led_get_pattern(led) * LM3533_REG_PATTERN_STEP; led 80 drivers/leds/leds-lm3533.c static int lm3533_led_pattern_enable(struct lm3533_led *led, int enable) led 88 drivers/leds/leds-lm3533.c dev_dbg(led->cdev.dev, "%s - %d\n", __func__, enable); led 90 drivers/leds/leds-lm3533.c mutex_lock(&led->mutex); led 92 drivers/leds/leds-lm3533.c state = test_bit(LM3533_LED_FLAG_PATTERN_ENABLE, &led->flags); led 96 drivers/leds/leds-lm3533.c pattern = lm3533_led_get_pattern(led); led 104 drivers/leds/leds-lm3533.c ret = lm3533_update(led->lm3533, LM3533_REG_PATTERN_ENABLE, val, mask); led 106 drivers/leds/leds-lm3533.c dev_err(led->cdev.dev, "failed to enable pattern %d (%d)\n", led 111 drivers/leds/leds-lm3533.c __change_bit(LM3533_LED_FLAG_PATTERN_ENABLE, &led->flags); led 113 drivers/leds/leds-lm3533.c mutex_unlock(&led->mutex); led 121 drivers/leds/leds-lm3533.c struct lm3533_led *led = to_lm3533_led(cdev); led 123 drivers/leds/leds-lm3533.c dev_dbg(led->cdev.dev, "%s - %d\n", __func__, value); led 126 drivers/leds/leds-lm3533.c lm3533_led_pattern_enable(led, 0); /* disable blink */ led 128 drivers/leds/leds-lm3533.c return lm3533_ctrlbank_set_brightness(&led->cb, value); led 133 drivers/leds/leds-lm3533.c struct lm3533_led *led = to_lm3533_led(cdev); led 137 drivers/leds/leds-lm3533.c ret = lm3533_ctrlbank_get_brightness(&led->cb, &val); led 141 drivers/leds/leds-lm3533.c dev_dbg(led->cdev.dev, "%s - %u\n", __func__, val); led 243 drivers/leds/leds-lm3533.c static u8 lm3533_led_delay_set(struct lm3533_led *led, u8 base, led 259 drivers/leds/leds-lm3533.c dev_dbg(led->cdev.dev, "%s - %lu: %u (0x%02x)\n", __func__, led 261 drivers/leds/leds-lm3533.c reg = lm3533_led_get_pattern_reg(led, base); led 262 drivers/leds/leds-lm3533.c ret = lm3533_write(led->lm3533, reg, val); led 264 drivers/leds/leds-lm3533.c dev_err(led->cdev.dev, "failed to set delay (%02x)\n", reg); led 271 drivers/leds/leds-lm3533.c static int lm3533_led_delay_on_set(struct lm3533_led *led, unsigned long *t) led 273 drivers/leds/leds-lm3533.c return lm3533_led_delay_set(led, LM3533_REG_PATTERN_HIGH_TIME_BASE, t); led 276 drivers/leds/leds-lm3533.c static int lm3533_led_delay_off_set(struct lm3533_led *led, unsigned long *t) led 278 drivers/leds/leds-lm3533.c return lm3533_led_delay_set(led, LM3533_REG_PATTERN_LOW_TIME_BASE, t); led 285 drivers/leds/leds-lm3533.c struct lm3533_led *led = to_lm3533_led(cdev); led 288 drivers/leds/leds-lm3533.c dev_dbg(led->cdev.dev, "%s - on = %lu, off = %lu\n", __func__, led 300 drivers/leds/leds-lm3533.c ret = lm3533_led_delay_on_set(led, delay_on); led 304 drivers/leds/leds-lm3533.c ret = lm3533_led_delay_off_set(led, delay_off); led 308 drivers/leds/leds-lm3533.c return lm3533_led_pattern_enable(led, 1); led 315 drivers/leds/leds-lm3533.c struct lm3533_led *led = to_lm3533_led(led_cdev); led 317 drivers/leds/leds-lm3533.c return scnprintf(buf, PAGE_SIZE, "%d\n", led->id); led 337 drivers/leds/leds-lm3533.c struct lm3533_led *led = to_lm3533_led(led_cdev); led 342 drivers/leds/leds-lm3533.c reg = lm3533_led_get_pattern_reg(led, base); led 343 drivers/leds/leds-lm3533.c ret = lm3533_read(led->lm3533, reg, &val); led 369 drivers/leds/leds-lm3533.c struct lm3533_led *led = to_lm3533_led(led_cdev); led 377 drivers/leds/leds-lm3533.c reg = lm3533_led_get_pattern_reg(led, base); led 378 drivers/leds/leds-lm3533.c ret = lm3533_write(led->lm3533, reg, val); led 405 drivers/leds/leds-lm3533.c struct lm3533_led *led = to_lm3533_led(led_cdev); led 411 drivers/leds/leds-lm3533.c reg = lm3533_led_get_lv_reg(led, LM3533_REG_CTRLBANK_BCONF_BASE); led 412 drivers/leds/leds-lm3533.c ret = lm3533_read(led->lm3533, reg, &val); led 426 drivers/leds/leds-lm3533.c struct lm3533_led *led = to_lm3533_led(led_cdev); led 440 drivers/leds/leds-lm3533.c reg = lm3533_led_get_lv_reg(led, LM3533_REG_CTRLBANK_BCONF_BASE); led 444 drivers/leds/leds-lm3533.c ret = lm3533_update(led->lm3533, reg, val, mask); led 455 drivers/leds/leds-lm3533.c struct lm3533_led *led = to_lm3533_led(led_cdev); led 461 drivers/leds/leds-lm3533.c reg = lm3533_led_get_lv_reg(led, LM3533_REG_CTRLBANK_BCONF_BASE); led 462 drivers/leds/leds-lm3533.c ret = lm3533_read(led->lm3533, reg, &val); led 476 drivers/leds/leds-lm3533.c struct lm3533_led *led = to_lm3533_led(led_cdev); led 486 drivers/leds/leds-lm3533.c reg = lm3533_led_get_lv_reg(led, LM3533_REG_CTRLBANK_BCONF_BASE); led 494 drivers/leds/leds-lm3533.c ret = lm3533_update(led->lm3533, reg, val, mask); led 505 drivers/leds/leds-lm3533.c struct lm3533_led *led = to_lm3533_led(led_cdev); led 511 drivers/leds/leds-lm3533.c reg = lm3533_led_get_lv_reg(led, LM3533_REG_CTRLBANK_BCONF_BASE); led 512 drivers/leds/leds-lm3533.c ret = lm3533_read(led->lm3533, reg, &val); led 529 drivers/leds/leds-lm3533.c struct lm3533_led *led = to_lm3533_led(led_cdev); led 539 drivers/leds/leds-lm3533.c reg = lm3533_led_get_lv_reg(led, LM3533_REG_CTRLBANK_BCONF_BASE); led 547 drivers/leds/leds-lm3533.c ret = lm3533_update(led->lm3533, reg, val, mask); led 559 drivers/leds/leds-lm3533.c struct lm3533_led *led = to_lm3533_led(led_cdev); led 563 drivers/leds/leds-lm3533.c ret = lm3533_ctrlbank_get_pwm(&led->cb, &val); led 575 drivers/leds/leds-lm3533.c struct lm3533_led *led = to_lm3533_led(led_cdev); led 582 drivers/leds/leds-lm3533.c ret = lm3533_ctrlbank_set_pwm(&led->cb, val); led 613 drivers/leds/leds-lm3533.c struct lm3533_led *led = to_lm3533_led(led_cdev); led 618 drivers/leds/leds-lm3533.c if (!led->lm3533->have_als) led 635 drivers/leds/leds-lm3533.c static int lm3533_led_setup(struct lm3533_led *led, led 640 drivers/leds/leds-lm3533.c ret = lm3533_ctrlbank_set_max_current(&led->cb, pdata->max_current); led 644 drivers/leds/leds-lm3533.c return lm3533_ctrlbank_set_pwm(&led->cb, pdata->pwm); led 651 drivers/leds/leds-lm3533.c struct lm3533_led *led; led 671 drivers/leds/leds-lm3533.c led = devm_kzalloc(&pdev->dev, sizeof(*led), GFP_KERNEL); led 672 drivers/leds/leds-lm3533.c if (!led) led 675 drivers/leds/leds-lm3533.c led->lm3533 = lm3533; led 676 drivers/leds/leds-lm3533.c led->cdev.name = pdata->name; led 677 drivers/leds/leds-lm3533.c led->cdev.default_trigger = pdata->default_trigger; led 678 drivers/leds/leds-lm3533.c led->cdev.brightness_set_blocking = lm3533_led_set; led 679 drivers/leds/leds-lm3533.c led->cdev.brightness_get = lm3533_led_get; led 680 drivers/leds/leds-lm3533.c led->cdev.blink_set = lm3533_led_blink_set; led 681 drivers/leds/leds-lm3533.c led->cdev.brightness = LED_OFF; led 682 drivers/leds/leds-lm3533.c led->cdev.groups = lm3533_led_attribute_groups, led 683 drivers/leds/leds-lm3533.c led->id = pdev->id; led 685 drivers/leds/leds-lm3533.c mutex_init(&led->mutex); led 691 drivers/leds/leds-lm3533.c led->cb.lm3533 = lm3533; led 692 drivers/leds/leds-lm3533.c led->cb.id = lm3533_led_get_ctrlbank_id(led); led 693 drivers/leds/leds-lm3533.c led->cb.dev = lm3533->dev; led 695 drivers/leds/leds-lm3533.c platform_set_drvdata(pdev, led); led 697 drivers/leds/leds-lm3533.c ret = devm_led_classdev_register(pdev->dev.parent, &led->cdev); led 703 drivers/leds/leds-lm3533.c led->cb.dev = led->cdev.dev; led 705 drivers/leds/leds-lm3533.c ret = lm3533_led_setup(led, pdata); led 709 drivers/leds/leds-lm3533.c ret = lm3533_ctrlbank_enable(&led->cb); led 718 drivers/leds/leds-lm3533.c struct lm3533_led *led = platform_get_drvdata(pdev); led 722 drivers/leds/leds-lm3533.c lm3533_ctrlbank_disable(&led->cb); led 730 drivers/leds/leds-lm3533.c struct lm3533_led *led = platform_get_drvdata(pdev); led 734 drivers/leds/leds-lm3533.c lm3533_ctrlbank_disable(&led->cb); led 735 drivers/leds/leds-lm3533.c lm3533_led_set(&led->cdev, LED_OFF); /* disable blink */ led 135 drivers/leds/leds-lm3601x.c static int lm3601x_read_faults(struct lm3601x_led *led) led 140 drivers/leds/leds-lm3601x.c ret = regmap_read(led->regmap, LM3601X_FLAGS_REG, &flags_val); led 144 drivers/leds/leds-lm3601x.c led->last_flag = 0; led 147 drivers/leds/leds-lm3601x.c led->last_flag |= LED_FAULT_OVER_VOLTAGE; led 150 drivers/leds/leds-lm3601x.c led->last_flag |= LED_FAULT_OVER_TEMPERATURE; led 153 drivers/leds/leds-lm3601x.c led->last_flag |= LED_FAULT_SHORT_CIRCUIT; led 156 drivers/leds/leds-lm3601x.c led->last_flag |= LED_FAULT_OVER_CURRENT; led 159 drivers/leds/leds-lm3601x.c led->last_flag |= LED_FAULT_UNDER_VOLTAGE; led 162 drivers/leds/leds-lm3601x.c led->last_flag |= LED_FAULT_INPUT_VOLTAGE; led 165 drivers/leds/leds-lm3601x.c led->last_flag |= LED_FAULT_LED_OVER_TEMPERATURE; led 167 drivers/leds/leds-lm3601x.c return led->last_flag; led 174 drivers/leds/leds-lm3601x.c struct lm3601x_led *led = fled_cdev_to_led(fled_cdev); led 177 drivers/leds/leds-lm3601x.c mutex_lock(&led->lock); led 179 drivers/leds/leds-lm3601x.c ret = lm3601x_read_faults(led); led 183 drivers/leds/leds-lm3601x.c if (led->led_mode == LM3601X_LED_TORCH) led 189 drivers/leds/leds-lm3601x.c ret = regmap_update_bits(led->regmap, LM3601X_ENABLE_REG, led 194 drivers/leds/leds-lm3601x.c ret = regmap_write(led->regmap, LM3601X_LED_TORCH_REG, brightness); led 198 drivers/leds/leds-lm3601x.c ret = regmap_update_bits(led->regmap, LM3601X_ENABLE_REG, led 202 drivers/leds/leds-lm3601x.c mutex_unlock(&led->lock); led 209 drivers/leds/leds-lm3601x.c struct lm3601x_led *led = fled_cdev_to_led(fled_cdev); led 214 drivers/leds/leds-lm3601x.c mutex_lock(&led->lock); led 216 drivers/leds/leds-lm3601x.c ret = regmap_read(led->regmap, LM3601X_CFG_REG, ¤t_timeout); led 220 drivers/leds/leds-lm3601x.c if (led->flash_timeout >= LM3601X_TIMEOUT_XOVER_US) led 221 drivers/leds/leds-lm3601x.c timeout_reg_val = led->flash_timeout / LM3601X_UPPER_STEP_US + 0x07; led 223 drivers/leds/leds-lm3601x.c timeout_reg_val = led->flash_timeout / LM3601X_LOWER_STEP_US - 0x01; led 225 drivers/leds/leds-lm3601x.c if (led->flash_timeout != current_timeout) led 226 drivers/leds/leds-lm3601x.c ret = regmap_update_bits(led->regmap, LM3601X_CFG_REG, led 230 drivers/leds/leds-lm3601x.c ret = regmap_update_bits(led->regmap, LM3601X_ENABLE_REG, led 234 drivers/leds/leds-lm3601x.c ret = regmap_update_bits(led->regmap, LM3601X_ENABLE_REG, led 237 drivers/leds/leds-lm3601x.c ret = lm3601x_read_faults(led); led 239 drivers/leds/leds-lm3601x.c mutex_unlock(&led->lock); led 246 drivers/leds/leds-lm3601x.c struct lm3601x_led *led = fled_cdev_to_led(fled_cdev); led 250 drivers/leds/leds-lm3601x.c mutex_lock(&led->lock); led 251 drivers/leds/leds-lm3601x.c ret = lm3601x_read_faults(led); led 256 drivers/leds/leds-lm3601x.c ret = regmap_update_bits(led->regmap, LM3601X_ENABLE_REG, led 263 drivers/leds/leds-lm3601x.c ret = regmap_write(led->regmap, LM3601X_LED_FLASH_REG, brightness_val); led 265 drivers/leds/leds-lm3601x.c mutex_unlock(&led->lock); led 272 drivers/leds/leds-lm3601x.c struct lm3601x_led *led = fled_cdev_to_led(fled_cdev); led 274 drivers/leds/leds-lm3601x.c mutex_lock(&led->lock); led 276 drivers/leds/leds-lm3601x.c led->flash_timeout = timeout; led 278 drivers/leds/leds-lm3601x.c mutex_unlock(&led->lock); led 285 drivers/leds/leds-lm3601x.c struct lm3601x_led *led = fled_cdev_to_led(fled_cdev); led 289 drivers/leds/leds-lm3601x.c mutex_lock(&led->lock); led 291 drivers/leds/leds-lm3601x.c ret = regmap_read(led->regmap, LM3601X_ENABLE_REG, &strobe_state); led 298 drivers/leds/leds-lm3601x.c mutex_unlock(&led->lock); led 305 drivers/leds/leds-lm3601x.c struct lm3601x_led *led = fled_cdev_to_led(fled_cdev); led 307 drivers/leds/leds-lm3601x.c lm3601x_read_faults(led); led 309 drivers/leds/leds-lm3601x.c *fault = led->last_flag; led 322 drivers/leds/leds-lm3601x.c static int lm3601x_register_leds(struct lm3601x_led *led, led 329 drivers/leds/leds-lm3601x.c led->fled_cdev.ops = &flash_ops; led 331 drivers/leds/leds-lm3601x.c setting = &led->fled_cdev.timeout; led 333 drivers/leds/leds-lm3601x.c setting->max = led->max_flash_timeout; led 335 drivers/leds/leds-lm3601x.c setting->val = led->max_flash_timeout; led 337 drivers/leds/leds-lm3601x.c setting = &led->fled_cdev.brightness; led 339 drivers/leds/leds-lm3601x.c setting->max = led->flash_current_max; led 341 drivers/leds/leds-lm3601x.c setting->val = led->flash_current_max; led 343 drivers/leds/leds-lm3601x.c led_cdev = &led->fled_cdev.led_cdev; led 345 drivers/leds/leds-lm3601x.c led_cdev->max_brightness = DIV_ROUND_UP(led->torch_current_max, led 350 drivers/leds/leds-lm3601x.c init_data.devicename = led->client->name; led 351 drivers/leds/leds-lm3601x.c init_data.default_label = (led->led_mode == LM3601X_LED_TORCH) ? led 354 drivers/leds/leds-lm3601x.c return led_classdev_flash_register_ext(&led->client->dev, led 355 drivers/leds/leds-lm3601x.c &led->fled_cdev, &init_data); led 358 drivers/leds/leds-lm3601x.c static int lm3601x_parse_node(struct lm3601x_led *led, led 364 drivers/leds/leds-lm3601x.c child = device_get_next_child_node(&led->client->dev, child); led 366 drivers/leds/leds-lm3601x.c dev_err(&led->client->dev, "No LED Child node\n"); led 370 drivers/leds/leds-lm3601x.c ret = fwnode_property_read_u32(child, "reg", &led->led_mode); led 372 drivers/leds/leds-lm3601x.c dev_err(&led->client->dev, "reg DT property missing\n"); led 376 drivers/leds/leds-lm3601x.c if (led->led_mode > LM3601X_LED_TORCH || led 377 drivers/leds/leds-lm3601x.c led->led_mode < LM3601X_LED_IR) { led 378 drivers/leds/leds-lm3601x.c dev_warn(&led->client->dev, "Invalid led mode requested\n"); led 384 drivers/leds/leds-lm3601x.c &led->torch_current_max); led 386 drivers/leds/leds-lm3601x.c dev_warn(&led->client->dev, led 392 drivers/leds/leds-lm3601x.c &led->flash_current_max); led 394 drivers/leds/leds-lm3601x.c dev_warn(&led->client->dev, led 400 drivers/leds/leds-lm3601x.c &led->max_flash_timeout); led 402 drivers/leds/leds-lm3601x.c dev_warn(&led->client->dev, led 416 drivers/leds/leds-lm3601x.c struct lm3601x_led *led; led 420 drivers/leds/leds-lm3601x.c led = devm_kzalloc(&client->dev, sizeof(*led), GFP_KERNEL); led 421 drivers/leds/leds-lm3601x.c if (!led) led 424 drivers/leds/leds-lm3601x.c led->client = client; led 425 drivers/leds/leds-lm3601x.c i2c_set_clientdata(client, led); led 427 drivers/leds/leds-lm3601x.c ret = lm3601x_parse_node(led, &fwnode); led 431 drivers/leds/leds-lm3601x.c led->regmap = devm_regmap_init_i2c(client, &lm3601x_regmap); led 432 drivers/leds/leds-lm3601x.c if (IS_ERR(led->regmap)) { led 433 drivers/leds/leds-lm3601x.c ret = PTR_ERR(led->regmap); led 439 drivers/leds/leds-lm3601x.c mutex_init(&led->lock); led 441 drivers/leds/leds-lm3601x.c return lm3601x_register_leds(led, fwnode); led 446 drivers/leds/leds-lm3601x.c struct lm3601x_led *led = i2c_get_clientdata(client); led 448 drivers/leds/leds-lm3601x.c led_classdev_flash_unregister(&led->fled_cdev); led 449 drivers/leds/leds-lm3601x.c mutex_destroy(&led->lock); led 451 drivers/leds/leds-lm3601x.c return regmap_update_bits(led->regmap, LM3601X_ENABLE_REG, led 46 drivers/leds/leds-lm36274.c struct lm36274 *led = container_of(led_cdev, struct lm36274, led_dev); led 48 drivers/leds/leds-lm36274.c return ti_lmu_common_set_brightness(&led->lmu_data, brt_val); led 142 drivers/leds/leds-lm3692x.c static int lm3692x_fault_check(struct lm3692x_led *led) led 147 drivers/leds/leds-lm3692x.c ret = regmap_read(led->regmap, LM3692X_FAULT_FLAGS, &read_buf); led 152 drivers/leds/leds-lm3692x.c dev_err(&led->client->dev, "Detected a fault 0x%X\n", read_buf); led 157 drivers/leds/leds-lm3692x.c regmap_read(led->regmap, LM3692X_FAULT_FLAGS, &read_buf); led 159 drivers/leds/leds-lm3692x.c dev_err(&led->client->dev, "Second read of fault flags 0x%X\n", led 168 drivers/leds/leds-lm3692x.c struct lm3692x_led *led = led 173 drivers/leds/leds-lm3692x.c mutex_lock(&led->lock); led 175 drivers/leds/leds-lm3692x.c ret = lm3692x_fault_check(led); led 177 drivers/leds/leds-lm3692x.c dev_err(&led->client->dev, "Cannot read/clear faults\n"); led 181 drivers/leds/leds-lm3692x.c ret = regmap_write(led->regmap, LM3692X_BRT_MSB, brt_val); led 183 drivers/leds/leds-lm3692x.c dev_err(&led->client->dev, "Cannot write MSB\n"); led 187 drivers/leds/leds-lm3692x.c ret = regmap_write(led->regmap, LM3692X_BRT_LSB, led_brightness_lsb); led 189 drivers/leds/leds-lm3692x.c dev_err(&led->client->dev, "Cannot write LSB\n"); led 193 drivers/leds/leds-lm3692x.c mutex_unlock(&led->lock); led 197 drivers/leds/leds-lm3692x.c static int lm3692x_init(struct lm3692x_led *led) led 202 drivers/leds/leds-lm3692x.c if (led->regulator) { led 203 drivers/leds/leds-lm3692x.c ret = regulator_enable(led->regulator); led 205 drivers/leds/leds-lm3692x.c dev_err(&led->client->dev, led 211 drivers/leds/leds-lm3692x.c if (led->enable_gpio) led 212 drivers/leds/leds-lm3692x.c gpiod_direction_output(led->enable_gpio, 1); led 214 drivers/leds/leds-lm3692x.c ret = lm3692x_fault_check(led); led 216 drivers/leds/leds-lm3692x.c dev_err(&led->client->dev, "Cannot read/clear faults\n"); led 220 drivers/leds/leds-lm3692x.c ret = regmap_write(led->regmap, LM3692X_BRT_CTRL, 0x00); led 230 drivers/leds/leds-lm3692x.c ret = regmap_write(led->regmap, LM3692X_EN, LM3692X_DEVICE_EN); led 237 drivers/leds/leds-lm3692x.c ret = regmap_write(led->regmap, LM3692X_BRT_MSB, 0); led 241 drivers/leds/leds-lm3692x.c ret = regmap_write(led->regmap, LM3692X_BRT_LSB, 0); led 245 drivers/leds/leds-lm3692x.c ret = regmap_write(led->regmap, LM3692X_PWM_CTRL, led 250 drivers/leds/leds-lm3692x.c ret = regmap_write(led->regmap, LM3692X_BOOST_CTRL, led 257 drivers/leds/leds-lm3692x.c ret = regmap_write(led->regmap, LM3692X_AUTO_FREQ_HI, 0x00); led 261 drivers/leds/leds-lm3692x.c ret = regmap_write(led->regmap, LM3692X_AUTO_FREQ_LO, 0x00); led 265 drivers/leds/leds-lm3692x.c ret = regmap_write(led->regmap, LM3692X_BL_ADJ_THRESH, 0x00); led 269 drivers/leds/leds-lm3692x.c ret = regmap_write(led->regmap, LM3692X_BRT_CTRL, led 274 drivers/leds/leds-lm3692x.c switch (led->led_enable) { led 277 drivers/leds/leds-lm3692x.c if (led->model_id == LM36923_MODEL) led 292 drivers/leds/leds-lm3692x.c if (led->model_id == LM36923_MODEL) { led 298 drivers/leds/leds-lm3692x.c dev_err(&led->client->dev, led 303 drivers/leds/leds-lm3692x.c ret = regmap_update_bits(led->regmap, LM3692X_EN, LM3692X_ENABLE_MASK, led 308 drivers/leds/leds-lm3692x.c dev_err(&led->client->dev, "Fail writing initialization values\n"); led 310 drivers/leds/leds-lm3692x.c if (led->enable_gpio) led 311 drivers/leds/leds-lm3692x.c gpiod_direction_output(led->enable_gpio, 0); led 313 drivers/leds/leds-lm3692x.c if (led->regulator) { led 314 drivers/leds/leds-lm3692x.c ret = regulator_disable(led->regulator); led 316 drivers/leds/leds-lm3692x.c dev_err(&led->client->dev, led 322 drivers/leds/leds-lm3692x.c static int lm3692x_probe_dt(struct lm3692x_led *led) led 328 drivers/leds/leds-lm3692x.c led->enable_gpio = devm_gpiod_get_optional(&led->client->dev, led 330 drivers/leds/leds-lm3692x.c if (IS_ERR(led->enable_gpio)) { led 331 drivers/leds/leds-lm3692x.c ret = PTR_ERR(led->enable_gpio); led 332 drivers/leds/leds-lm3692x.c dev_err(&led->client->dev, "Failed to get enable gpio: %d\n", led 337 drivers/leds/leds-lm3692x.c led->regulator = devm_regulator_get_optional(&led->client->dev, "vled"); led 338 drivers/leds/leds-lm3692x.c if (IS_ERR(led->regulator)) { led 339 drivers/leds/leds-lm3692x.c ret = PTR_ERR(led->regulator); led 342 drivers/leds/leds-lm3692x.c dev_err(&led->client->dev, led 347 drivers/leds/leds-lm3692x.c led->regulator = NULL; led 350 drivers/leds/leds-lm3692x.c child = device_get_next_child_node(&led->client->dev, child); led 352 drivers/leds/leds-lm3692x.c dev_err(&led->client->dev, "No LED Child node\n"); led 357 drivers/leds/leds-lm3692x.c &led->led_dev.default_trigger); led 359 drivers/leds/leds-lm3692x.c ret = fwnode_property_read_u32(child, "reg", &led->led_enable); led 361 drivers/leds/leds-lm3692x.c dev_err(&led->client->dev, "reg DT property missing\n"); led 366 drivers/leds/leds-lm3692x.c init_data.devicename = led->client->name; led 369 drivers/leds/leds-lm3692x.c ret = devm_led_classdev_register_ext(&led->client->dev, &led->led_dev, led 372 drivers/leds/leds-lm3692x.c dev_err(&led->client->dev, "led register err: %d\n", ret); led 382 drivers/leds/leds-lm3692x.c struct lm3692x_led *led; led 385 drivers/leds/leds-lm3692x.c led = devm_kzalloc(&client->dev, sizeof(*led), GFP_KERNEL); led 386 drivers/leds/leds-lm3692x.c if (!led) led 389 drivers/leds/leds-lm3692x.c mutex_init(&led->lock); led 390 drivers/leds/leds-lm3692x.c led->client = client; led 391 drivers/leds/leds-lm3692x.c led->led_dev.brightness_set_blocking = lm3692x_brightness_set; led 392 drivers/leds/leds-lm3692x.c led->model_id = id->driver_data; led 393 drivers/leds/leds-lm3692x.c i2c_set_clientdata(client, led); led 395 drivers/leds/leds-lm3692x.c led->regmap = devm_regmap_init_i2c(client, &lm3692x_regmap_config); led 396 drivers/leds/leds-lm3692x.c if (IS_ERR(led->regmap)) { led 397 drivers/leds/leds-lm3692x.c ret = PTR_ERR(led->regmap); led 403 drivers/leds/leds-lm3692x.c ret = lm3692x_probe_dt(led); led 407 drivers/leds/leds-lm3692x.c ret = lm3692x_init(led); led 416 drivers/leds/leds-lm3692x.c struct lm3692x_led *led = i2c_get_clientdata(client); led 419 drivers/leds/leds-lm3692x.c ret = regmap_update_bits(led->regmap, LM3692X_EN, LM3692X_DEVICE_EN, 0); led 421 drivers/leds/leds-lm3692x.c dev_err(&led->client->dev, "Failed to disable regulator\n"); led 425 drivers/leds/leds-lm3692x.c if (led->enable_gpio) led 426 drivers/leds/leds-lm3692x.c gpiod_direction_output(led->enable_gpio, 0); led 428 drivers/leds/leds-lm3692x.c if (led->regulator) { led 429 drivers/leds/leds-lm3692x.c ret = regulator_disable(led->regulator); led 431 drivers/leds/leds-lm3692x.c dev_err(&led->client->dev, led 435 drivers/leds/leds-lm3692x.c mutex_destroy(&led->lock); led 115 drivers/leds/leds-lm3697.c struct lm3697_led *led = container_of(led_cdev, struct lm3697_led, led 117 drivers/leds/leds-lm3697.c int ctrl_en_val = (1 << led->control_bank); led 120 drivers/leds/leds-lm3697.c mutex_lock(&led->priv->lock); led 123 drivers/leds/leds-lm3697.c ret = regmap_update_bits(led->priv->regmap, LM3697_CTRL_ENABLE, led 126 drivers/leds/leds-lm3697.c dev_err(&led->priv->client->dev, "Cannot write ctrl register\n"); led 130 drivers/leds/leds-lm3697.c led->enabled = LED_OFF; led 132 drivers/leds/leds-lm3697.c ret = ti_lmu_common_set_brightness(&led->lmu_data, brt_val); led 134 drivers/leds/leds-lm3697.c dev_err(&led->priv->client->dev, led 139 drivers/leds/leds-lm3697.c if (!led->enabled) { led 140 drivers/leds/leds-lm3697.c ret = regmap_update_bits(led->priv->regmap, led 144 drivers/leds/leds-lm3697.c dev_err(&led->priv->client->dev, led 149 drivers/leds/leds-lm3697.c led->enabled = brt_val; led 154 drivers/leds/leds-lm3697.c mutex_unlock(&led->priv->lock); led 160 drivers/leds/leds-lm3697.c struct lm3697_led *led; led 184 drivers/leds/leds-lm3697.c led = &priv->leds[i]; led 185 drivers/leds/leds-lm3697.c ret = ti_lmu_common_set_ramp(&led->lmu_data); led 196 drivers/leds/leds-lm3697.c struct lm3697_led *led; led 231 drivers/leds/leds-lm3697.c led = &priv->leds[i]; led 234 drivers/leds/leds-lm3697.c child, &led->lmu_data); led 238 drivers/leds/leds-lm3697.c led->control_bank = control_bank; led 239 drivers/leds/leds-lm3697.c led->lmu_data.regmap = priv->regmap; led 240 drivers/leds/leds-lm3697.c led->lmu_data.runtime_ramp_reg = LM3697_CTRL_A_RAMP + led 242 drivers/leds/leds-lm3697.c led->lmu_data.msb_brightness_reg = LM3697_CTRL_A_BRT_MSB + led 243 drivers/leds/leds-lm3697.c led->control_bank * 2; led 244 drivers/leds/leds-lm3697.c led->lmu_data.lsb_brightness_reg = LM3697_CTRL_A_BRT_LSB + led 245 drivers/leds/leds-lm3697.c led->control_bank * 2; led 247 drivers/leds/leds-lm3697.c led->num_leds = fwnode_property_count_u32(child, "led-sources"); led 248 drivers/leds/leds-lm3697.c if (led->num_leds > LM3697_MAX_LED_STRINGS) { led 254 drivers/leds/leds-lm3697.c led->hvled_strings, led 255 drivers/leds/leds-lm3697.c led->num_leds); led 262 drivers/leds/leds-lm3697.c for (j = 0; j < led->num_leds; j++) led 264 drivers/leds/leds-lm3697.c (led->control_bank << led->hvled_strings[j]); led 267 drivers/leds/leds-lm3697.c child, &led->lmu_data); led 272 drivers/leds/leds-lm3697.c &led->led_dev.default_trigger); led 276 drivers/leds/leds-lm3697.c snprintf(led->label, sizeof(led->label), led 279 drivers/leds/leds-lm3697.c snprintf(led->label, sizeof(led->label), led 282 drivers/leds/leds-lm3697.c led->priv = priv; led 283 drivers/leds/leds-lm3697.c led->led_dev.name = led->label; led 284 drivers/leds/leds-lm3697.c led->led_dev.max_brightness = led->lmu_data.max_brightness; led 285 drivers/leds/leds-lm3697.c led->led_dev.brightness_set_blocking = lm3697_brightness_set; led 287 drivers/leds/leds-lm3697.c ret = devm_led_classdev_register(priv->dev, &led->led_dev); led 305 drivers/leds/leds-lm3697.c struct lm3697 *led; led 315 drivers/leds/leds-lm3697.c led = devm_kzalloc(&client->dev, struct_size(led, leds, count), led 317 drivers/leds/leds-lm3697.c if (!led) led 320 drivers/leds/leds-lm3697.c mutex_init(&led->lock); led 321 drivers/leds/leds-lm3697.c i2c_set_clientdata(client, led); led 323 drivers/leds/leds-lm3697.c led->client = client; led 324 drivers/leds/leds-lm3697.c led->dev = &client->dev; led 325 drivers/leds/leds-lm3697.c led->regmap = devm_regmap_init_i2c(client, &lm3697_regmap_config); led 326 drivers/leds/leds-lm3697.c if (IS_ERR(led->regmap)) { led 327 drivers/leds/leds-lm3697.c ret = PTR_ERR(led->regmap); led 333 drivers/leds/leds-lm3697.c ret = lm3697_probe_dt(led); led 337 drivers/leds/leds-lm3697.c return lm3697_init(led); led 342 drivers/leds/leds-lm3697.c struct lm3697 *led = i2c_get_clientdata(client); led 345 drivers/leds/leds-lm3697.c ret = regmap_update_bits(led->regmap, LM3697_CTRL_ENABLE, led 348 drivers/leds/leds-lm3697.c dev_err(&led->client->dev, "Failed to disable the device\n"); led 352 drivers/leds/leds-lm3697.c if (led->enable_gpio) led 353 drivers/leds/leds-lm3697.c gpiod_direction_output(led->enable_gpio, 0); led 355 drivers/leds/leds-lm3697.c if (led->regulator) { led 356 drivers/leds/leds-lm3697.c ret = regulator_disable(led->regulator); led 358 drivers/leds/leds-lm3697.c dev_err(&led->client->dev, led 362 drivers/leds/leds-lm3697.c mutex_destroy(&led->lock); led 166 drivers/leds/leds-lp3944.c static int lp3944_led_set(struct lp3944_led_data *led, u8 status) led 168 drivers/leds/leds-lp3944.c struct lp3944_data *data = i2c_get_clientdata(led->client); led 169 drivers/leds/leds-lp3944.c u8 id = led->id; led 174 drivers/leds/leds-lp3944.c dev_dbg(&led->client->dev, "%s: %s, status before normalization:%d\n", led 175 drivers/leds/leds-lp3944.c __func__, led->ldev.name, status); led 204 drivers/leds/leds-lp3944.c if (led->type == LP3944_LED_TYPE_LED_INVERTED && status < 2) led 208 drivers/leds/leds-lp3944.c lp3944_reg_read(led->client, reg, &val); led 213 drivers/leds/leds-lp3944.c dev_dbg(&led->client->dev, "%s: %s, reg:%d id:%d status:%d val:%#x\n", led 214 drivers/leds/leds-lp3944.c __func__, led->ldev.name, reg, id, status, val); led 217 drivers/leds/leds-lp3944.c err = lp3944_reg_write(led->client, reg, val); led 227 drivers/leds/leds-lp3944.c struct lp3944_led_data *led = ldev_to_led(led_cdev); led 253 drivers/leds/leds-lp3944.c if (led->type == LP3944_LED_TYPE_LED_INVERTED) led 263 drivers/leds/leds-lp3944.c err = lp3944_dim_set_period(led->client, LP3944_DIM0, period); led 267 drivers/leds/leds-lp3944.c err = lp3944_dim_set_dutycycle(led->client, LP3944_DIM0, duty_cycle); led 271 drivers/leds/leds-lp3944.c dev_dbg(&led->client->dev, "%s: OK hardware accelerated blink!\n", led 274 drivers/leds/leds-lp3944.c lp3944_led_set(led, LP3944_LED_STATUS_DIM0); led 282 drivers/leds/leds-lp3944.c struct lp3944_led_data *led = ldev_to_led(led_cdev); led 284 drivers/leds/leds-lp3944.c dev_dbg(&led->client->dev, "%s: %s, %d\n", led 287 drivers/leds/leds-lp3944.c return lp3944_led_set(led, !!brightness); led 298 drivers/leds/leds-lp3944.c struct lp3944_led_data *led = &data->leds[i]; led 299 drivers/leds/leds-lp3944.c led->client = client; led 300 drivers/leds/leds-lp3944.c led->id = i; led 306 drivers/leds/leds-lp3944.c led->type = pled->type; led 307 drivers/leds/leds-lp3944.c led->ldev.name = pled->name; led 308 drivers/leds/leds-lp3944.c led->ldev.max_brightness = 1; led 309 drivers/leds/leds-lp3944.c led->ldev.brightness_set_blocking = led 311 drivers/leds/leds-lp3944.c led->ldev.blink_set = lp3944_led_set_blink; led 312 drivers/leds/leds-lp3944.c led->ldev.flags = LED_CORE_SUSPENDRESUME; led 314 drivers/leds/leds-lp3944.c err = led_classdev_register(&client->dev, &led->ldev); led 318 drivers/leds/leds-lp3944.c led->ldev.name); led 323 drivers/leds/leds-lp3944.c led->ldev.brightness = led 327 drivers/leds/leds-lp3944.c err = lp3944_led_set(led, pled->status); led 331 drivers/leds/leds-lp3944.c led->ldev.name, pled->status); led 62 drivers/leds/leds-lp3952.c struct lp3952_ctrl_hdl *led = container_of(cdev, led 65 drivers/leds/leds-lp3952.c struct lp3952_led_array *priv = (struct lp3952_led_array *)led->priv; led 68 drivers/leds/leds-lp3952.c led->channel); led 71 drivers/leds/leds-lp3952.c lp3952_on_off(priv, led->channel, false); led 75 drivers/leds/leds-lp3952.c if (led->channel > LP3952_RED_1) { led 80 drivers/leds/leds-lp3952.c if (led->channel >= LP3952_BLUE_1) { led 82 drivers/leds/leds-lp3952.c shift_val = (led->channel - LP3952_BLUE_1) * 2; led 85 drivers/leds/leds-lp3952.c shift_val = led->channel * 2; led 89 drivers/leds/leds-lp3952.c lp3952_on_off(priv, led->channel, true); led 114 drivers/leds/leds-lp5521.c static void lp5521_set_led_current(struct lp55xx_led *led, u8 led_current) led 116 drivers/leds/leds-lp5521.c led->led_current = led_current; led 117 drivers/leds/leds-lp5521.c lp55xx_write(led->chip, LP5521_REG_LED_CURRENT_BASE + led->chan_nr, led 352 drivers/leds/leds-lp5521.c static int lp5521_led_brightness(struct lp55xx_led *led) led 354 drivers/leds/leds-lp5521.c struct lp55xx_chip *chip = led->chip; led 358 drivers/leds/leds-lp5521.c ret = lp55xx_write(chip, LP5521_REG_LED_PWM_BASE + led->chan_nr, led 359 drivers/leds/leds-lp5521.c led->brightness); led 369 drivers/leds/leds-lp5521.c struct lp55xx_led *led = i2c_get_clientdata(to_i2c_client(dev)); led 370 drivers/leds/leds-lp5521.c struct lp55xx_chip *chip = led->chip; led 391 drivers/leds/leds-lp5521.c struct lp55xx_led *led = i2c_get_clientdata(to_i2c_client(dev)); led 392 drivers/leds/leds-lp5521.c struct lp55xx_chip *chip = led->chip; led 423 drivers/leds/leds-lp5521.c struct lp55xx_led *led = i2c_get_clientdata(to_i2c_client(dev)); led 424 drivers/leds/leds-lp5521.c struct lp55xx_chip *chip = led->chip; led 445 drivers/leds/leds-lp5521.c struct lp55xx_led *led = i2c_get_clientdata(to_i2c_client(dev)); led 446 drivers/leds/leds-lp5521.c struct lp55xx_chip *chip = led->chip; led 504 drivers/leds/leds-lp5521.c struct lp55xx_led *led; led 523 drivers/leds/leds-lp5521.c led = devm_kcalloc(&client->dev, led 524 drivers/leds/leds-lp5521.c pdata->num_channels, sizeof(*led), GFP_KERNEL); led 525 drivers/leds/leds-lp5521.c if (!led) led 534 drivers/leds/leds-lp5521.c i2c_set_clientdata(client, led); led 542 drivers/leds/leds-lp5521.c ret = lp55xx_register_leds(led, chip); led 555 drivers/leds/leds-lp5521.c lp55xx_unregister_leds(led, chip); led 564 drivers/leds/leds-lp5521.c struct lp55xx_led *led = i2c_get_clientdata(client); led 565 drivers/leds/leds-lp5521.c struct lp55xx_chip *chip = led->chip; led 569 drivers/leds/leds-lp5521.c lp55xx_unregister_leds(led, chip); led 104 drivers/leds/leds-lp5523.c #define LED_ACTIVE(mux, led) (!!(mux & (0x0001 << led))) led 118 drivers/leds/leds-lp5523.c static void lp5523_set_led_current(struct lp55xx_led *led, u8 led_current) led 120 drivers/leds/leds-lp5523.c led->led_current = led_current; led 121 drivers/leds/leds-lp5523.c lp55xx_write(led->chip, LP5523_REG_LED_CURRENT_BASE + led->chan_nr, led 392 drivers/leds/leds-lp5523.c struct lp55xx_led *led = i2c_get_clientdata(to_i2c_client(dev)); led 393 drivers/leds/leds-lp5523.c struct lp55xx_chip *chip = led->chip; led 414 drivers/leds/leds-lp5523.c struct lp55xx_led *led = i2c_get_clientdata(to_i2c_client(dev)); led 415 drivers/leds/leds-lp5523.c struct lp55xx_chip *chip = led->chip; led 481 drivers/leds/leds-lp5523.c struct lp55xx_led *led = i2c_get_clientdata(to_i2c_client(dev)); led 482 drivers/leds/leds-lp5523.c struct lp55xx_chip *chip = led->chip; led 525 drivers/leds/leds-lp5523.c struct lp55xx_led *led = i2c_get_clientdata(to_i2c_client(dev)); led 526 drivers/leds/leds-lp5523.c struct lp55xx_chip *chip = led->chip; led 558 drivers/leds/leds-lp5523.c struct lp55xx_led *led = i2c_get_clientdata(to_i2c_client(dev)); led 559 drivers/leds/leds-lp5523.c struct lp55xx_chip *chip = led->chip; led 580 drivers/leds/leds-lp5523.c struct lp55xx_led *led = i2c_get_clientdata(to_i2c_client(dev)); led 581 drivers/leds/leds-lp5523.c struct lp55xx_chip *chip = led->chip; led 648 drivers/leds/leds-lp5523.c led->led_current); led 649 drivers/leds/leds-lp5523.c led++; led 683 drivers/leds/leds-lp5523.c struct lp55xx_led *led = i2c_get_clientdata(to_i2c_client(dev)); led 684 drivers/leds/leds-lp5523.c struct lp55xx_chip *chip = led->chip; led 705 drivers/leds/leds-lp5523.c struct lp55xx_led *led = i2c_get_clientdata(to_i2c_client(dev)); led 706 drivers/leds/leds-lp5523.c struct lp55xx_chip *chip = led->chip; led 734 drivers/leds/leds-lp5523.c struct lp55xx_led *led = i2c_get_clientdata(to_i2c_client(dev)); led 735 drivers/leds/leds-lp5523.c struct lp55xx_chip *chip = led->chip; led 765 drivers/leds/leds-lp5523.c struct lp55xx_led *led = i2c_get_clientdata(to_i2c_client(dev)); led 766 drivers/leds/leds-lp5523.c struct lp55xx_chip *chip = led->chip; led 794 drivers/leds/leds-lp5523.c static int lp5523_led_brightness(struct lp55xx_led *led) led 796 drivers/leds/leds-lp5523.c struct lp55xx_chip *chip = led->chip; led 800 drivers/leds/leds-lp5523.c ret = lp55xx_write(chip, LP5523_REG_LED_PWM_BASE + led->chan_nr, led 801 drivers/leds/leds-lp5523.c led->brightness); led 871 drivers/leds/leds-lp5523.c struct lp55xx_led *led; led 890 drivers/leds/leds-lp5523.c led = devm_kcalloc(&client->dev, led 891 drivers/leds/leds-lp5523.c pdata->num_channels, sizeof(*led), GFP_KERNEL); led 892 drivers/leds/leds-lp5523.c if (!led) led 901 drivers/leds/leds-lp5523.c i2c_set_clientdata(client, led); led 909 drivers/leds/leds-lp5523.c ret = lp55xx_register_leds(led, chip); led 922 drivers/leds/leds-lp5523.c lp55xx_unregister_leds(led, chip); led 931 drivers/leds/leds-lp5523.c struct lp55xx_led *led = i2c_get_clientdata(client); led 932 drivers/leds/leds-lp5523.c struct lp55xx_chip *chip = led->chip; led 936 drivers/leds/leds-lp5523.c lp55xx_unregister_leds(led, chip); led 114 drivers/leds/leds-lp5562.c static void lp5562_set_led_current(struct lp55xx_led *led, u8 led_current) led 123 drivers/leds/leds-lp5562.c led->led_current = led_current; led 124 drivers/leds/leds-lp5562.c lp55xx_write(led->chip, addr[led->chan_nr], led_current); led 315 drivers/leds/leds-lp5562.c static int lp5562_led_brightness(struct lp55xx_led *led) led 317 drivers/leds/leds-lp5562.c struct lp55xx_chip *chip = led->chip; led 327 drivers/leds/leds-lp5562.c ret = lp55xx_write(chip, addr[led->chan_nr], led->brightness); led 409 drivers/leds/leds-lp5562.c struct lp55xx_led *led = i2c_get_clientdata(to_i2c_client(dev)); led 410 drivers/leds/leds-lp5562.c struct lp55xx_chip *chip = led->chip; led 437 drivers/leds/leds-lp5562.c struct lp55xx_led *led = i2c_get_clientdata(to_i2c_client(dev)); led 438 drivers/leds/leds-lp5562.c struct lp55xx_chip *chip = led->chip; led 519 drivers/leds/leds-lp5562.c struct lp55xx_led *led; led 538 drivers/leds/leds-lp5562.c led = devm_kcalloc(&client->dev, led 539 drivers/leds/leds-lp5562.c pdata->num_channels, sizeof(*led), GFP_KERNEL); led 540 drivers/leds/leds-lp5562.c if (!led) led 549 drivers/leds/leds-lp5562.c i2c_set_clientdata(client, led); led 555 drivers/leds/leds-lp5562.c ret = lp55xx_register_leds(led, chip); led 568 drivers/leds/leds-lp5562.c lp55xx_unregister_leds(led, chip); led 577 drivers/leds/leds-lp5562.c struct lp55xx_led *led = i2c_get_clientdata(client); led 578 drivers/leds/leds-lp5562.c struct lp55xx_chip *chip = led->chip; led 583 drivers/leds/leds-lp5562.c lp55xx_unregister_leds(led, chip); led 85 drivers/leds/leds-lp55xx-common.c struct lp55xx_led *led = dev_to_lp55xx_led(dev); led 87 drivers/leds/leds-lp55xx-common.c return scnprintf(buf, PAGE_SIZE, "%d\n", led->led_current); led 94 drivers/leds/leds-lp55xx-common.c struct lp55xx_led *led = dev_to_lp55xx_led(dev); led 95 drivers/leds/leds-lp55xx-common.c struct lp55xx_chip *chip = led->chip; led 101 drivers/leds/leds-lp55xx-common.c if (curr > led->max_current) led 108 drivers/leds/leds-lp55xx-common.c chip->cfg->set_led_current(led, (u8)curr); led 118 drivers/leds/leds-lp55xx-common.c struct lp55xx_led *led = dev_to_lp55xx_led(dev); led 120 drivers/leds/leds-lp55xx-common.c return scnprintf(buf, PAGE_SIZE, "%d\n", led->max_current); led 137 drivers/leds/leds-lp55xx-common.c struct lp55xx_led *led = cdev_to_lp55xx_led(cdev); led 138 drivers/leds/leds-lp55xx-common.c struct lp55xx_device_config *cfg = led->chip->cfg; led 140 drivers/leds/leds-lp55xx-common.c led->brightness = (u8)brightness; led 141 drivers/leds/leds-lp55xx-common.c return cfg->brightness_fn(led); led 144 drivers/leds/leds-lp55xx-common.c static int lp55xx_init_led(struct lp55xx_led *led, led 162 drivers/leds/leds-lp55xx-common.c led->led_current = pdata->led_config[chan].led_current; led 163 drivers/leds/leds-lp55xx-common.c led->max_current = pdata->led_config[chan].max_current; led 164 drivers/leds/leds-lp55xx-common.c led->chan_nr = pdata->led_config[chan].chan_nr; led 165 drivers/leds/leds-lp55xx-common.c led->cdev.default_trigger = pdata->led_config[chan].default_trigger; led 167 drivers/leds/leds-lp55xx-common.c if (led->chan_nr >= max_channel) { led 173 drivers/leds/leds-lp55xx-common.c led->cdev.brightness_set_blocking = lp55xx_set_brightness; led 174 drivers/leds/leds-lp55xx-common.c led->cdev.groups = lp55xx_led_groups; led 177 drivers/leds/leds-lp55xx-common.c led->cdev.name = pdata->led_config[chan].name; led 181 drivers/leds/leds-lp55xx-common.c led->cdev.name = name; led 184 drivers/leds/leds-lp55xx-common.c ret = led_classdev_register(dev, &led->cdev); led 232 drivers/leds/leds-lp55xx-common.c struct lp55xx_led *led = i2c_get_clientdata(to_i2c_client(dev)); led 233 drivers/leds/leds-lp55xx-common.c struct lp55xx_chip *chip = led->chip; led 242 drivers/leds/leds-lp55xx-common.c struct lp55xx_led *led = i2c_get_clientdata(to_i2c_client(dev)); led 243 drivers/leds/leds-lp55xx-common.c struct lp55xx_chip *chip = led->chip; led 284 drivers/leds/leds-lp55xx-common.c struct lp55xx_led *led = i2c_get_clientdata(to_i2c_client(dev)); led 285 drivers/leds/leds-lp55xx-common.c struct lp55xx_chip *chip = led->chip; led 455 drivers/leds/leds-lp55xx-common.c int lp55xx_register_leds(struct lp55xx_led *led, struct lp55xx_chip *chip) led 477 drivers/leds/leds-lp55xx-common.c each = led + i; led 493 drivers/leds/leds-lp55xx-common.c lp55xx_unregister_leds(led, chip); led 498 drivers/leds/leds-lp55xx-common.c void lp55xx_unregister_leds(struct lp55xx_led *led, struct lp55xx_chip *chip) led 504 drivers/leds/leds-lp55xx-common.c each = led + i; led 110 drivers/leds/leds-lp55xx-common.h int (*brightness_fn)(struct lp55xx_led *led); led 113 drivers/leds/leds-lp55xx-common.h void (*set_led_current) (struct lp55xx_led *led, u8 led_current); led 190 drivers/leds/leds-lp55xx-common.h extern int lp55xx_register_leds(struct lp55xx_led *led, led 192 drivers/leds/leds-lp55xx-common.h extern void lp55xx_unregister_leds(struct lp55xx_led *led, led 83 drivers/leds/leds-lp8501.c static void lp8501_set_led_current(struct lp55xx_led *led, u8 led_current) led 85 drivers/leds/leds-lp8501.c led->led_current = led_current; led 86 drivers/leds/leds-lp8501.c lp55xx_write(led->chip, LP8501_REG_LED_CURRENT_BASE + led->chan_nr, led 271 drivers/leds/leds-lp8501.c static int lp8501_led_brightness(struct lp55xx_led *led) led 273 drivers/leds/leds-lp8501.c struct lp55xx_chip *chip = led->chip; led 277 drivers/leds/leds-lp8501.c ret = lp55xx_write(chip, LP8501_REG_LED_PWM_BASE + led->chan_nr, led 278 drivers/leds/leds-lp8501.c led->brightness); led 307 drivers/leds/leds-lp8501.c struct lp55xx_led *led; led 326 drivers/leds/leds-lp8501.c led = devm_kcalloc(&client->dev, led 327 drivers/leds/leds-lp8501.c pdata->num_channels, sizeof(*led), GFP_KERNEL); led 328 drivers/leds/leds-lp8501.c if (!led) led 337 drivers/leds/leds-lp8501.c i2c_set_clientdata(client, led); led 345 drivers/leds/leds-lp8501.c ret = lp55xx_register_leds(led, chip); led 358 drivers/leds/leds-lp8501.c lp55xx_unregister_leds(led, chip); led 367 drivers/leds/leds-lp8501.c struct lp55xx_led *led = i2c_get_clientdata(client); led 368 drivers/leds/leds-lp8501.c struct lp55xx_chip *chip = led->chip; led 372 drivers/leds/leds-lp8501.c lp55xx_unregister_leds(led, chip); led 42 drivers/leds/leds-lp8788.c static int lp8788_led_init_device(struct lp8788_led *led, led 55 drivers/leds/leds-lp8788.c led->isink_num = cfg->num; led 61 drivers/leds/leds-lp8788.c ret = lp8788_update_bits(led->lp, addr, mask, val); led 70 drivers/leds/leds-lp8788.c return lp8788_update_bits(led->lp, addr, mask, val); led 73 drivers/leds/leds-lp8788.c static int lp8788_led_enable(struct lp8788_led *led, led 81 drivers/leds/leds-lp8788.c ret = lp8788_update_bits(led->lp, LP8788_ISINK_CTRL, mask, val); led 83 drivers/leds/leds-lp8788.c led->on = on; led 91 drivers/leds/leds-lp8788.c struct lp8788_led *led = led 94 drivers/leds/leds-lp8788.c enum lp8788_isink_number num = led->isink_num; led 97 drivers/leds/leds-lp8788.c mutex_lock(&led->lock); led 103 drivers/leds/leds-lp8788.c ret = lp8788_write_byte(led->lp, lp8788_pwm_addr[num], val); led 108 drivers/leds/leds-lp8788.c mutex_unlock(&led->lock); led 113 drivers/leds/leds-lp8788.c if (enable != led->on) led 114 drivers/leds/leds-lp8788.c ret = lp8788_led_enable(led, num, enable); led 116 drivers/leds/leds-lp8788.c mutex_unlock(&led->lock); led 124 drivers/leds/leds-lp8788.c struct lp8788_led *led; led 128 drivers/leds/leds-lp8788.c led = devm_kzalloc(dev, sizeof(struct lp8788_led), GFP_KERNEL); led 129 drivers/leds/leds-lp8788.c if (!led) led 132 drivers/leds/leds-lp8788.c led->lp = lp; led 133 drivers/leds/leds-lp8788.c led->led_dev.max_brightness = MAX_BRIGHTNESS; led 134 drivers/leds/leds-lp8788.c led->led_dev.brightness_set_blocking = lp8788_brightness_set; led 139 drivers/leds/leds-lp8788.c led->led_dev.name = DEFAULT_LED_NAME; led 141 drivers/leds/leds-lp8788.c led->led_dev.name = led_pdata->name; led 143 drivers/leds/leds-lp8788.c mutex_init(&led->lock); led 145 drivers/leds/leds-lp8788.c ret = lp8788_led_init_device(led, led_pdata); led 151 drivers/leds/leds-lp8788.c ret = devm_led_classdev_register(dev, &led->led_dev); led 140 drivers/leds/leds-lp8860.c static int lp8860_unlock_eeprom(struct lp8860_led *led, int lock) led 144 drivers/leds/leds-lp8860.c mutex_lock(&led->lock); led 147 drivers/leds/leds-lp8860.c ret = regmap_write(led->regmap, led 151 drivers/leds/leds-lp8860.c dev_err(&led->client->dev, "EEPROM Unlock failed\n"); led 155 drivers/leds/leds-lp8860.c ret = regmap_write(led->regmap, led 159 drivers/leds/leds-lp8860.c dev_err(&led->client->dev, "EEPROM Unlock failed\n"); led 162 drivers/leds/leds-lp8860.c ret = regmap_write(led->regmap, led 166 drivers/leds/leds-lp8860.c dev_err(&led->client->dev, "EEPROM Unlock failed\n"); led 170 drivers/leds/leds-lp8860.c ret = regmap_write(led->regmap, led 176 drivers/leds/leds-lp8860.c mutex_unlock(&led->lock); led 180 drivers/leds/leds-lp8860.c static int lp8860_fault_check(struct lp8860_led *led) led 185 drivers/leds/leds-lp8860.c ret = regmap_read(led->regmap, LP8860_LED_FAULT, &read_buf); led 191 drivers/leds/leds-lp8860.c ret = regmap_read(led->regmap, LP8860_FAULT, &read_buf); led 199 drivers/leds/leds-lp8860.c ret = regmap_write(led->regmap, LP8860_FAULT_CLEAR, led 208 drivers/leds/leds-lp8860.c struct lp8860_led *led = led 213 drivers/leds/leds-lp8860.c mutex_lock(&led->lock); led 215 drivers/leds/leds-lp8860.c ret = lp8860_fault_check(led); led 217 drivers/leds/leds-lp8860.c dev_err(&led->client->dev, "Cannot read/clear faults\n"); led 221 drivers/leds/leds-lp8860.c ret = regmap_write(led->regmap, LP8860_DISP_CL1_BRT_MSB, led 224 drivers/leds/leds-lp8860.c dev_err(&led->client->dev, "Cannot write CL1 MSB\n"); led 228 drivers/leds/leds-lp8860.c ret = regmap_write(led->regmap, LP8860_DISP_CL1_BRT_LSB, led 231 drivers/leds/leds-lp8860.c dev_err(&led->client->dev, "Cannot write CL1 LSB\n"); led 235 drivers/leds/leds-lp8860.c mutex_unlock(&led->lock); led 239 drivers/leds/leds-lp8860.c static int lp8860_init(struct lp8860_led *led) led 244 drivers/leds/leds-lp8860.c if (led->regulator) { led 245 drivers/leds/leds-lp8860.c ret = regulator_enable(led->regulator); led 247 drivers/leds/leds-lp8860.c dev_err(&led->client->dev, led 253 drivers/leds/leds-lp8860.c if (led->enable_gpio) led 254 drivers/leds/leds-lp8860.c gpiod_direction_output(led->enable_gpio, 1); led 256 drivers/leds/leds-lp8860.c ret = lp8860_fault_check(led); led 260 drivers/leds/leds-lp8860.c ret = regmap_read(led->regmap, LP8860_STATUS, &read_buf); led 264 drivers/leds/leds-lp8860.c ret = lp8860_unlock_eeprom(led, LP8860_UNLOCK_EEPROM); led 266 drivers/leds/leds-lp8860.c dev_err(&led->client->dev, "Failed unlocking EEPROM\n"); led 272 drivers/leds/leds-lp8860.c ret = regmap_write(led->eeprom_regmap, led 276 drivers/leds/leds-lp8860.c dev_err(&led->client->dev, "Failed writing EEPROM\n"); led 281 drivers/leds/leds-lp8860.c ret = lp8860_unlock_eeprom(led, LP8860_LOCK_EEPROM); led 285 drivers/leds/leds-lp8860.c ret = regmap_write(led->regmap, led 289 drivers/leds/leds-lp8860.c dev_err(&led->client->dev, "Failed programming EEPROM\n"); led 297 drivers/leds/leds-lp8860.c if (led->enable_gpio) led 298 drivers/leds/leds-lp8860.c gpiod_direction_output(led->enable_gpio, 0); led 300 drivers/leds/leds-lp8860.c if (led->regulator) { led 301 drivers/leds/leds-lp8860.c ret = regulator_disable(led->regulator); led 303 drivers/leds/leds-lp8860.c dev_err(&led->client->dev, led 382 drivers/leds/leds-lp8860.c struct lp8860_led *led; led 387 drivers/leds/leds-lp8860.c led = devm_kzalloc(&client->dev, sizeof(*led), GFP_KERNEL); led 388 drivers/leds/leds-lp8860.c if (!led) led 395 drivers/leds/leds-lp8860.c led->led_dev.default_trigger = of_get_property(child_node, led 399 drivers/leds/leds-lp8860.c led->enable_gpio = devm_gpiod_get_optional(&client->dev, led 401 drivers/leds/leds-lp8860.c if (IS_ERR(led->enable_gpio)) { led 402 drivers/leds/leds-lp8860.c ret = PTR_ERR(led->enable_gpio); led 407 drivers/leds/leds-lp8860.c led->regulator = devm_regulator_get(&client->dev, "vled"); led 408 drivers/leds/leds-lp8860.c if (IS_ERR(led->regulator)) led 409 drivers/leds/leds-lp8860.c led->regulator = NULL; led 411 drivers/leds/leds-lp8860.c led->client = client; led 412 drivers/leds/leds-lp8860.c led->led_dev.brightness_set_blocking = lp8860_brightness_set; led 414 drivers/leds/leds-lp8860.c mutex_init(&led->lock); led 416 drivers/leds/leds-lp8860.c i2c_set_clientdata(client, led); led 418 drivers/leds/leds-lp8860.c led->regmap = devm_regmap_init_i2c(client, &lp8860_regmap_config); led 419 drivers/leds/leds-lp8860.c if (IS_ERR(led->regmap)) { led 420 drivers/leds/leds-lp8860.c ret = PTR_ERR(led->regmap); led 426 drivers/leds/leds-lp8860.c led->eeprom_regmap = devm_regmap_init_i2c(client, &lp8860_eeprom_regmap_config); led 427 drivers/leds/leds-lp8860.c if (IS_ERR(led->eeprom_regmap)) { led 428 drivers/leds/leds-lp8860.c ret = PTR_ERR(led->eeprom_regmap); led 434 drivers/leds/leds-lp8860.c ret = lp8860_init(led); led 442 drivers/leds/leds-lp8860.c ret = devm_led_classdev_register_ext(&client->dev, &led->led_dev, led 454 drivers/leds/leds-lp8860.c struct lp8860_led *led = i2c_get_clientdata(client); led 457 drivers/leds/leds-lp8860.c if (led->enable_gpio) led 458 drivers/leds/leds-lp8860.c gpiod_direction_output(led->enable_gpio, 0); led 460 drivers/leds/leds-lp8860.c if (led->regulator) { led 461 drivers/leds/leds-lp8860.c ret = regulator_disable(led->regulator); led 463 drivers/leds/leds-lp8860.c dev_err(&led->client->dev, led 467 drivers/leds/leds-lp8860.c mutex_destroy(&led->lock); led 50 drivers/leds/leds-max77650.c struct max77650_led *led = max77650_to_led(cdev); led 60 drivers/leds/leds-max77650.c return regmap_update_bits(led->map, led->regA, mask, val); led 66 drivers/leds/leds-max77650.c struct max77650_led *leds, *led; led 95 drivers/leds/leds-max77650.c led = &leds[reg]; led 96 drivers/leds/leds-max77650.c led->map = map; led 97 drivers/leds/leds-max77650.c led->regA = MAX77650_LED_A_BASE + reg; led 98 drivers/leds/leds-max77650.c led->regB = MAX77650_LED_B_BASE + reg; led 99 drivers/leds/leds-max77650.c led->cdev.brightness_set_blocking = max77650_led_brightness_set; led 100 drivers/leds/leds-max77650.c led->cdev.max_brightness = MAX77650_LED_MAX_BRIGHTNESS; led 104 drivers/leds/leds-max77650.c led->cdev.name = "max77650::"; led 106 drivers/leds/leds-max77650.c led->cdev.name = devm_kasprintf(dev, GFP_KERNEL, led 108 drivers/leds/leds-max77650.c if (!led->cdev.name) { led 115 drivers/leds/leds-max77650.c &led->cdev.default_trigger); led 117 drivers/leds/leds-max77650.c rv = devm_led_classdev_register(dev, &led->cdev); led 121 drivers/leds/leds-max77650.c rv = regmap_write(map, led->regA, MAX77650_LED_A_DEFAULT); led 125 drivers/leds/leds-max77650.c rv = regmap_write(map, led->regB, MAX77650_LED_B_DEFAULT); led 140 drivers/leds/leds-max77693.c static inline bool max77693_fled_used(struct max77693_led_device *led, led 145 drivers/leds/leds-max77693.c return led->fled_mask & fled_bit; led 148 drivers/leds/leds-max77693.c static int max77693_set_mode_reg(struct max77693_led_device *led, u8 mode) led 150 drivers/leds/leds-max77693.c struct regmap *rmap = led->regmap; led 180 drivers/leds/leds-max77693.c static int max77693_add_mode(struct max77693_led_device *led, u8 mode) led 185 drivers/leds/leds-max77693.c if (led->iout_joint) led 196 drivers/leds/leds-max77693.c led->mode_flags &= (~MODE_TORCH(i) & ~MODE_FLASH(i)); led 198 drivers/leds/leds-max77693.c new_mode_flags = mode | led->mode_flags; led 199 drivers/leds/leds-max77693.c new_mode_flags &= led->allowed_modes; led 201 drivers/leds/leds-max77693.c if (new_mode_flags ^ led->mode_flags) led 202 drivers/leds/leds-max77693.c led->mode_flags = new_mode_flags; led 206 drivers/leds/leds-max77693.c ret = max77693_set_mode_reg(led, led->mode_flags); led 215 drivers/leds/leds-max77693.c led->mode_flags &= ~mode; led 220 drivers/leds/leds-max77693.c static int max77693_clear_mode(struct max77693_led_device *led, led 223 drivers/leds/leds-max77693.c if (led->iout_joint) led 227 drivers/leds/leds-max77693.c led->mode_flags &= ~mode; led 229 drivers/leds/leds-max77693.c return max77693_set_mode_reg(led, led->mode_flags); led 232 drivers/leds/leds-max77693.c static void max77693_add_allowed_modes(struct max77693_led_device *led, led 236 drivers/leds/leds-max77693.c led->allowed_modes |= (MODE_FLASH(fled_id) | led 239 drivers/leds/leds-max77693.c led->allowed_modes |= MODE_TORCH(fled_id); led 242 drivers/leds/leds-max77693.c static void max77693_distribute_currents(struct max77693_led_device *led, led 246 drivers/leds/leds-max77693.c if (!led->iout_joint) { led 248 drivers/leds/leds-max77693.c max77693_add_allowed_modes(led, fled_id, mode); led 256 drivers/leds/leds-max77693.c led->allowed_modes &= ~MODE_FLASH_MASK; led 258 drivers/leds/leds-max77693.c led->allowed_modes &= ~MODE_TORCH_MASK; led 260 drivers/leds/leds-max77693.c max77693_add_allowed_modes(led, FLED1, mode); led 263 drivers/leds/leds-max77693.c max77693_add_allowed_modes(led, FLED2, mode); led 266 drivers/leds/leds-max77693.c static int max77693_set_torch_current(struct max77693_led_device *led, led 269 drivers/leds/leds-max77693.c struct regmap *rmap = led->regmap; led 273 drivers/leds/leds-max77693.c max77693_distribute_currents(led, fled_id, TORCH, micro_amp, led 274 drivers/leds/leds-max77693.c led->iout_torch_max, iout); led 276 drivers/leds/leds-max77693.c if (fled_id == FLED1 || led->iout_joint) { led 278 drivers/leds/leds-max77693.c led->torch_iout_reg &= TORCH_IOUT_MASK(TORCH_IOUT2_SHIFT); led 280 drivers/leds/leds-max77693.c if (fled_id == FLED2 || led->iout_joint) { led 282 drivers/leds/leds-max77693.c led->torch_iout_reg &= TORCH_IOUT_MASK(TORCH_IOUT1_SHIFT); led 285 drivers/leds/leds-max77693.c led->torch_iout_reg |= ((iout1_reg << TORCH_IOUT1_SHIFT) | led 289 drivers/leds/leds-max77693.c led->torch_iout_reg); led 292 drivers/leds/leds-max77693.c static int max77693_set_flash_current(struct max77693_led_device *led, led 296 drivers/leds/leds-max77693.c struct regmap *rmap = led->regmap; led 301 drivers/leds/leds-max77693.c max77693_distribute_currents(led, fled_id, FLASH, micro_amp, led 302 drivers/leds/leds-max77693.c led->iout_flash_max, iout); led 304 drivers/leds/leds-max77693.c if (fled_id == FLED1 || led->iout_joint) { led 311 drivers/leds/leds-max77693.c if (fled_id == FLED2 || led->iout_joint) { led 320 drivers/leds/leds-max77693.c static int max77693_set_timeout(struct max77693_led_device *led, u32 microsec) led 322 drivers/leds/leds-max77693.c struct regmap *rmap = led->regmap; led 332 drivers/leds/leds-max77693.c led->current_flash_timeout = microsec; led 337 drivers/leds/leds-max77693.c static int max77693_get_strobe_status(struct max77693_led_device *led, led 340 drivers/leds/leds-max77693.c struct regmap *rmap = led->regmap; led 355 drivers/leds/leds-max77693.c struct max77693_led_device *led = sub_led_to_led(sub_led); led 356 drivers/leds/leds-max77693.c struct regmap *rmap = led->regmap; led 363 drivers/leds/leds-max77693.c if (led->iout_joint) { led 390 drivers/leds/leds-max77693.c static int max77693_setup(struct max77693_led_device *led, led 393 drivers/leds/leds-max77693.c struct regmap *rmap = led->regmap; led 403 drivers/leds/leds-max77693.c if (led->iout_joint) { led 409 drivers/leds/leds-max77693.c first_led = max77693_fled_used(led, FLED1) ? FLED1 : FLED2; led 410 drivers/leds/leds-max77693.c last_led = max77693_fled_used(led, FLED2) ? FLED2 : FLED1; led 416 drivers/leds/leds-max77693.c ret = max77693_set_flash_current(led, i, led 445 drivers/leds/leds-max77693.c if (max77693_fled_used(led, FLED1) && max77693_fled_used(led, FLED2)) led 457 drivers/leds/leds-max77693.c return max77693_set_mode_reg(led, MODE_OFF); led 466 drivers/leds/leds-max77693.c struct max77693_led_device *led = sub_led_to_led(sub_led); led 469 drivers/leds/leds-max77693.c mutex_lock(&led->lock); led 472 drivers/leds/leds-max77693.c ret = max77693_clear_mode(led, MODE_TORCH(fled_id)); led 474 drivers/leds/leds-max77693.c dev_dbg(&led->pdev->dev, led 480 drivers/leds/leds-max77693.c ret = max77693_set_torch_current(led, fled_id, value * TORCH_IOUT_STEP); led 482 drivers/leds/leds-max77693.c dev_dbg(&led->pdev->dev, led 488 drivers/leds/leds-max77693.c ret = max77693_add_mode(led, MODE_TORCH(fled_id)); led 490 drivers/leds/leds-max77693.c dev_dbg(&led->pdev->dev, led 494 drivers/leds/leds-max77693.c mutex_unlock(&led->lock); led 504 drivers/leds/leds-max77693.c struct max77693_led_device *led = sub_led_to_led(sub_led); led 507 drivers/leds/leds-max77693.c mutex_lock(&led->lock); led 508 drivers/leds/leds-max77693.c ret = max77693_set_flash_current(led, sub_led->fled_id, brightness); led 509 drivers/leds/leds-max77693.c mutex_unlock(&led->lock); led 519 drivers/leds/leds-max77693.c struct max77693_led_device *led = sub_led_to_led(sub_led); led 523 drivers/leds/leds-max77693.c mutex_lock(&led->lock); led 526 drivers/leds/leds-max77693.c ret = max77693_clear_mode(led, MODE_FLASH(fled_id)); led 530 drivers/leds/leds-max77693.c if (sub_led->flash_timeout != led->current_flash_timeout) { led 531 drivers/leds/leds-max77693.c ret = max77693_set_timeout(led, sub_led->flash_timeout); led 536 drivers/leds/leds-max77693.c led->strobing_sub_led_id = fled_id; led 538 drivers/leds/leds-max77693.c ret = max77693_add_mode(led, MODE_FLASH(fled_id)); led 545 drivers/leds/leds-max77693.c mutex_unlock(&led->lock); led 565 drivers/leds/leds-max77693.c struct max77693_led_device *led = sub_led_to_led(sub_led); led 571 drivers/leds/leds-max77693.c mutex_lock(&led->lock); led 573 drivers/leds/leds-max77693.c ret = max77693_get_strobe_status(led, state); led 575 drivers/leds/leds-max77693.c *state = !!(*state && (led->strobing_sub_led_id == sub_led->fled_id)); led 577 drivers/leds/leds-max77693.c mutex_unlock(&led->lock); led 587 drivers/leds/leds-max77693.c struct max77693_led_device *led = sub_led_to_led(sub_led); led 589 drivers/leds/leds-max77693.c mutex_lock(&led->lock); led 591 drivers/leds/leds-max77693.c mutex_unlock(&led->lock); led 596 drivers/leds/leds-max77693.c static int max77693_led_parse_dt(struct max77693_led_device *led, led 600 drivers/leds/leds-max77693.c struct device *dev = &led->pdev->dev; led 601 drivers/leds/leds-max77693.c struct max77693_sub_led *sub_leds = led->sub_leds; led 631 drivers/leds/leds-max77693.c led->fled_mask = FLED1_IOUT | FLED2_IOUT; led 634 drivers/leds/leds-max77693.c led->fled_mask |= FLED1_IOUT; led 637 drivers/leds/leds-max77693.c led->fled_mask |= FLED2_IOUT; led 683 drivers/leds/leds-max77693.c (max77693_fled_used(led, FLED1) && led 684 drivers/leds/leds-max77693.c max77693_fled_used(led, FLED2))) { led 705 drivers/leds/leds-max77693.c static void max77693_align_iout_current(struct max77693_led_device *led, led 710 drivers/leds/leds-max77693.c if (led->iout_joint) { led 722 drivers/leds/leds-max77693.c if (max77693_fled_used(led, i)) led 728 drivers/leds/leds-max77693.c static void max77693_led_validate_configuration(struct max77693_led_device *led, led 736 drivers/leds/leds-max77693.c max77693_fled_used(led, FLED1) && max77693_fled_used(led, FLED2)) led 737 drivers/leds/leds-max77693.c led->iout_joint = true; led 743 drivers/leds/leds-max77693.c if ((cfg->boost_mode == MAX77693_LED_BOOST_NONE) && led->iout_joint) led 746 drivers/leds/leds-max77693.c max77693_align_iout_current(led, cfg->iout_torch_max, led 749 drivers/leds/leds-max77693.c max77693_align_iout_current(led, cfg->iout_flash_max, led 764 drivers/leds/leds-max77693.c static int max77693_led_get_configuration(struct max77693_led_device *led, led 770 drivers/leds/leds-max77693.c ret = max77693_led_parse_dt(led, cfg, sub_nodes); led 774 drivers/leds/leds-max77693.c max77693_led_validate_configuration(led, cfg); led 776 drivers/leds/leds-max77693.c memcpy(led->iout_torch_max, cfg->iout_torch_max, led 777 drivers/leds/leds-max77693.c sizeof(led->iout_torch_max)); led 778 drivers/leds/leds-max77693.c memcpy(led->iout_flash_max, cfg->iout_flash_max, led 779 drivers/leds/leds-max77693.c sizeof(led->iout_flash_max)); led 796 drivers/leds/leds-max77693.c struct max77693_led_device *led = sub_led_to_led(sub_led); led 803 drivers/leds/leds-max77693.c setting->max = led->iout_joint ? led 826 drivers/leds/leds-max77693.c struct max77693_led_device *led = sub_led_to_led(sub_led); led 830 drivers/leds/leds-max77693.c mutex_lock(&led->lock); led 833 drivers/leds/leds-max77693.c ret = max77693_add_mode(led, MODE_FLASH_EXTERNAL(fled_id)); led 835 drivers/leds/leds-max77693.c ret = max77693_clear_mode(led, MODE_FLASH_EXTERNAL(fled_id)); led 837 drivers/leds/leds-max77693.c mutex_unlock(&led->lock); led 846 drivers/leds/leds-max77693.c struct max77693_led_device *led = sub_led_to_led(sub_led); led 847 drivers/leds/leds-max77693.c struct device *dev = &led->pdev->dev; led 886 drivers/leds/leds-max77693.c struct max77693_led_device *led = sub_led_to_led(sub_led); led 899 drivers/leds/leds-max77693.c led_cdev->max_brightness = (led->iout_joint ? led 916 drivers/leds/leds-max77693.c struct max77693_led_device *led = sub_led_to_led(sub_led); led 918 drivers/leds/leds-max77693.c struct device *dev = &led->pdev->dev; led 949 drivers/leds/leds-max77693.c struct max77693_led_device *led; led 955 drivers/leds/leds-max77693.c led = devm_kzalloc(dev, sizeof(*led), GFP_KERNEL); led 956 drivers/leds/leds-max77693.c if (!led) led 959 drivers/leds/leds-max77693.c led->pdev = pdev; led 960 drivers/leds/leds-max77693.c led->regmap = iodev->regmap; led 961 drivers/leds/leds-max77693.c led->allowed_modes = MODE_FLASH_MASK; led 962 drivers/leds/leds-max77693.c sub_leds = led->sub_leds; led 964 drivers/leds/leds-max77693.c platform_set_drvdata(pdev, led); led 965 drivers/leds/leds-max77693.c ret = max77693_led_get_configuration(led, &led_cfg, sub_nodes); led 969 drivers/leds/leds-max77693.c ret = max77693_setup(led, &led_cfg); led 973 drivers/leds/leds-max77693.c mutex_init(&led->lock); led 976 drivers/leds/leds-max77693.c led->iout_joint || max77693_fled_used(led, FLED1); led 978 drivers/leds/leds-max77693.c !led->iout_joint && max77693_fled_used(led, FLED2); led 1014 drivers/leds/leds-max77693.c mutex_destroy(&led->lock); led 1021 drivers/leds/leds-max77693.c struct max77693_led_device *led = platform_get_drvdata(pdev); led 1022 drivers/leds/leds-max77693.c struct max77693_sub_led *sub_leds = led->sub_leds; led 1024 drivers/leds/leds-max77693.c if (led->iout_joint || max77693_fled_used(led, FLED1)) { led 1029 drivers/leds/leds-max77693.c if (!led->iout_joint && max77693_fled_used(led, FLED2)) { led 1034 drivers/leds/leds-max77693.c mutex_destroy(&led->lock); led 47 drivers/leds/leds-max8997.c static void max8997_led_set_mode(struct max8997_led *led, led 51 drivers/leds/leds-max8997.c struct i2c_client *client = led->iodev->i2c; led 57 drivers/leds/leds-max8997.c val = led->id ? led 59 drivers/leds/leds-max8997.c led->cdev.max_brightness = MAX8997_LED_FLASH_MAX_BRIGHTNESS; led 63 drivers/leds/leds-max8997.c val = led->id ? led 65 drivers/leds/leds-max8997.c led->cdev.max_brightness = MAX8997_LED_MOVIE_MAX_BRIGHTNESS; led 70 drivers/leds/leds-max8997.c val = led->id ? led 72 drivers/leds/leds-max8997.c led->cdev.max_brightness = MAX8997_LED_FLASH_MAX_BRIGHTNESS; led 77 drivers/leds/leds-max8997.c val = led->id ? led 79 drivers/leds/leds-max8997.c led->cdev.max_brightness = MAX8997_LED_MOVIE_MAX_BRIGHTNESS; led 82 drivers/leds/leds-max8997.c led->cdev.max_brightness = MAX8997_LED_NONE_MAX_BRIGHTNESS; led 90 drivers/leds/leds-max8997.c dev_err(led->iodev->dev, led 94 drivers/leds/leds-max8997.c led->led_mode = mode; led 97 drivers/leds/leds-max8997.c static void max8997_led_enable(struct max8997_led *led, bool enable) led 100 drivers/leds/leds-max8997.c struct i2c_client *client = led->iodev->i2c; led 103 drivers/leds/leds-max8997.c if (led->enabled == enable) led 110 drivers/leds/leds-max8997.c dev_err(led->iodev->dev, led 113 drivers/leds/leds-max8997.c led->enabled = enable; led 116 drivers/leds/leds-max8997.c static void max8997_led_set_current(struct max8997_led *led, led 120 drivers/leds/leds-max8997.c struct i2c_client *client = led->iodev->i2c; led 123 drivers/leds/leds-max8997.c switch (led->led_mode) { led 128 drivers/leds/leds-max8997.c reg = led->id ? MAX8997_REG_FLASH2_CUR : MAX8997_REG_FLASH1_CUR; led 143 drivers/leds/leds-max8997.c dev_err(led->iodev->dev, led 151 drivers/leds/leds-max8997.c struct max8997_led *led = led 155 drivers/leds/leds-max8997.c max8997_led_set_current(led, value); led 156 drivers/leds/leds-max8997.c max8997_led_enable(led, true); led 158 drivers/leds/leds-max8997.c max8997_led_set_current(led, value); led 159 drivers/leds/leds-max8997.c max8997_led_enable(led, false); led 167 drivers/leds/leds-max8997.c struct max8997_led *led = led 171 drivers/leds/leds-max8997.c mutex_lock(&led->mutex); led 173 drivers/leds/leds-max8997.c switch (led->led_mode) { led 191 drivers/leds/leds-max8997.c mutex_unlock(&led->mutex); led 201 drivers/leds/leds-max8997.c struct max8997_led *led = led 205 drivers/leds/leds-max8997.c mutex_lock(&led->mutex); led 218 drivers/leds/leds-max8997.c max8997_led_set_mode(led, mode); led 220 drivers/leds/leds-max8997.c mutex_unlock(&led->mutex); led 237 drivers/leds/leds-max8997.c struct max8997_led *led; led 246 drivers/leds/leds-max8997.c led = devm_kzalloc(&pdev->dev, sizeof(*led), GFP_KERNEL); led 247 drivers/leds/leds-max8997.c if (led == NULL) led 250 drivers/leds/leds-max8997.c led->id = pdev->id; led 253 drivers/leds/leds-max8997.c led->cdev.name = name; led 254 drivers/leds/leds-max8997.c led->cdev.brightness_set = max8997_led_brightness_set; led 255 drivers/leds/leds-max8997.c led->cdev.flags |= LED_CORE_SUSPENDRESUME; led 256 drivers/leds/leds-max8997.c led->cdev.brightness = 0; led 257 drivers/leds/leds-max8997.c led->cdev.groups = max8997_groups; led 258 drivers/leds/leds-max8997.c led->iodev = iodev; led 264 drivers/leds/leds-max8997.c mode = pdata->led_pdata->mode[led->id]; led 265 drivers/leds/leds-max8997.c brightness = pdata->led_pdata->brightness[led->id]; led 267 drivers/leds/leds-max8997.c max8997_led_set_mode(led, mode); led 269 drivers/leds/leds-max8997.c if (brightness > led->cdev.max_brightness) led 270 drivers/leds/leds-max8997.c brightness = led->cdev.max_brightness; led 271 drivers/leds/leds-max8997.c max8997_led_set_current(led, brightness); led 272 drivers/leds/leds-max8997.c led->cdev.brightness = brightness; led 274 drivers/leds/leds-max8997.c max8997_led_set_mode(led, MAX8997_NONE); led 275 drivers/leds/leds-max8997.c max8997_led_set_current(led, 0); led 278 drivers/leds/leds-max8997.c mutex_init(&led->mutex); led 280 drivers/leds/leds-max8997.c ret = devm_led_classdev_register(&pdev->dev, &led->cdev); led 39 drivers/leds/leds-mc13783.c struct mc13xxx_led *led; led 55 drivers/leds/leds-mc13783.c struct mc13xxx_led *led = led 57 drivers/leds/leds-mc13783.c struct mc13xxx_leds *leds = led->leds; led 60 drivers/leds/leds-mc13783.c switch (led->id) { led 65 drivers/leds/leds-mc13783.c shift = 9 + (led->id - MC13783_LED_MD) * 4; led 76 drivers/leds/leds-mc13783.c off = led->id - MC13783_LED_R1; led 84 drivers/leds/leds-mc13783.c off = led->id - MC13892_LED_MD; led 91 drivers/leds/leds-mc13783.c off = led->id - MC13892_LED_R; led 99 drivers/leds/leds-mc13783.c shift = 3 + (led->id - MC34708_LED_R) * 12; led 106 drivers/leds/leds-mc13783.c mc13xxx_max_brightness(led->id) << shift, led 136 drivers/leds/leds-mc13783.c pdata->led = devm_kcalloc(dev, pdata->num_leds, sizeof(*pdata->led), led 138 drivers/leds/leds-mc13783.c if (!pdata->led) { led 149 drivers/leds/leds-mc13783.c pdata->led[i].id = leds->devtype->led_min + tmp; led 152 drivers/leds/leds-mc13783.c pdata->led[i].name = str; led 155 drivers/leds/leds-mc13783.c pdata->led[i].default_trigger = str; led 210 drivers/leds/leds-mc13783.c leds->led = devm_kcalloc(dev, leds->num_leds, sizeof(*leds->led), led 212 drivers/leds/leds-mc13783.c if (!leds->led) led 227 drivers/leds/leds-mc13783.c id = pdata->led[i].id; led 228 drivers/leds/leds-mc13783.c name = pdata->led[i].name; led 229 drivers/leds/leds-mc13783.c trig = pdata->led[i].default_trigger; led 242 drivers/leds/leds-mc13783.c leds->led[i].id = id; led 243 drivers/leds/leds-mc13783.c leds->led[i].leds = leds; led 244 drivers/leds/leds-mc13783.c leds->led[i].cdev.name = name; led 245 drivers/leds/leds-mc13783.c leds->led[i].cdev.default_trigger = trig; led 246 drivers/leds/leds-mc13783.c leds->led[i].cdev.flags = LED_CORE_SUSPENDRESUME; led 247 drivers/leds/leds-mc13783.c leds->led[i].cdev.brightness_set_blocking = mc13xxx_led_set; led 248 drivers/leds/leds-mc13783.c leds->led[i].cdev.max_brightness = mc13xxx_max_brightness(id); led 250 drivers/leds/leds-mc13783.c ret = led_classdev_register(dev->parent, &leds->led[i].cdev); led 259 drivers/leds/leds-mc13783.c led_classdev_unregister(&leds->led[i].cdev); led 270 drivers/leds/leds-mc13783.c led_classdev_unregister(&leds->led[i].cdev); led 56 drivers/leds/leds-menf21bmc.c struct menf21bmc_led *led = container_of(led_cdev, led 60 drivers/leds/leds-menf21bmc.c led_val = i2c_smbus_read_byte_data(led->i2c_client, led 66 drivers/leds/leds-menf21bmc.c led_val &= ~led->led_bit; led 68 drivers/leds/leds-menf21bmc.c led_val |= led->led_bit; led 70 drivers/leds/leds-menf21bmc.c i2c_smbus_write_byte_data(led->i2c_client, led 282 drivers/leds/leds-mlxcpld.c static void mlxcpld_led_brightness_set(struct led_classdev *led, led 285 drivers/leds/leds-mlxcpld.c struct mlxcpld_led_priv *pled = cdev_to_priv(led); led 297 drivers/leds/leds-mlxcpld.c static int mlxcpld_led_blink_set(struct led_classdev *led, led 301 drivers/leds/leds-mlxcpld.c struct mlxcpld_led_priv *pled = cdev_to_priv(led); led 104 drivers/leds/leds-mt6323.c struct mt6323_led *led[MT6323_MAX_LEDS]; led 110 drivers/leds/leds-mt6323.c struct mt6323_led *led = container_of(cdev, struct mt6323_led, cdev); led 111 drivers/leds/leds-mt6323.c struct mt6323_leds *leds = led->parent; led 127 drivers/leds/leds-mt6323.c ret = regmap_update_bits(regmap, MT6323_ISINK_CON2(led->id), led 134 drivers/leds/leds-mt6323.c struct mt6323_led *led = container_of(cdev, struct mt6323_led, cdev); led 135 drivers/leds/leds-mt6323.c struct mt6323_leds *leds = led->parent; led 140 drivers/leds/leds-mt6323.c status = MT6323_ISINK_CH_EN(led->id); led 142 drivers/leds/leds-mt6323.c MT6323_ISINK_CH_EN_MASK(led->id), ~status); led 148 drivers/leds/leds-mt6323.c MT6323_RG_ISINK_CK_PDN_MASK(led->id), led 149 drivers/leds/leds-mt6323.c MT6323_RG_ISINK_CK_PDN(led->id)); led 159 drivers/leds/leds-mt6323.c struct mt6323_led *led = container_of(cdev, struct mt6323_led, cdev); led 160 drivers/leds/leds-mt6323.c struct mt6323_leds *leds = led->parent; led 169 drivers/leds/leds-mt6323.c if (status & MT6323_RG_ISINK_CK_PDN_MASK(led->id)) led 176 drivers/leds/leds-mt6323.c if (!(status & MT6323_ISINK_CH_EN(led->id))) led 179 drivers/leds/leds-mt6323.c ret = regmap_read(regmap, MT6323_ISINK_CON2(led->id), &status); led 190 drivers/leds/leds-mt6323.c struct mt6323_led *led = container_of(cdev, struct mt6323_led, cdev); led 191 drivers/leds/leds-mt6323.c struct mt6323_leds *leds = led->parent; led 202 drivers/leds/leds-mt6323.c MT6323_RG_ISINK_CK_SEL_MASK(led->id), 0); led 206 drivers/leds/leds-mt6323.c status = MT6323_RG_ISINK_CK_PDN(led->id); led 208 drivers/leds/leds-mt6323.c MT6323_RG_ISINK_CK_PDN_MASK(led->id), led 216 drivers/leds/leds-mt6323.c MT6323_ISINK_CH_EN_MASK(led->id), led 217 drivers/leds/leds-mt6323.c MT6323_ISINK_CH_EN(led->id)); led 225 drivers/leds/leds-mt6323.c ret = regmap_update_bits(regmap, MT6323_ISINK_CON0(led->id), led 231 drivers/leds/leds-mt6323.c ret = regmap_update_bits(regmap, MT6323_ISINK_CON1(led->id), led 244 drivers/leds/leds-mt6323.c struct mt6323_led *led = container_of(cdev, struct mt6323_led, cdev); led 245 drivers/leds/leds-mt6323.c struct mt6323_leds *leds = led->parent; led 286 drivers/leds/leds-mt6323.c if (!led->current_brightness) { led 290 drivers/leds/leds-mt6323.c led->current_brightness = cdev->max_brightness; led 293 drivers/leds/leds-mt6323.c ret = regmap_update_bits(regmap, MT6323_ISINK_CON0(led->id), led 299 drivers/leds/leds-mt6323.c ret = regmap_update_bits(regmap, MT6323_ISINK_CON1(led->id), led 311 drivers/leds/leds-mt6323.c struct mt6323_led *led = container_of(cdev, struct mt6323_led, cdev); led 312 drivers/leds/leds-mt6323.c struct mt6323_leds *leds = led->parent; led 317 drivers/leds/leds-mt6323.c if (!led->current_brightness && brightness) { led 331 drivers/leds/leds-mt6323.c led->current_brightness = brightness; led 341 drivers/leds/leds-mt6323.c struct mt6323_led *led = container_of(cdev, struct mt6323_led, cdev); led 345 drivers/leds/leds-mt6323.c led->cdev.name = of_get_property(np, "label", NULL) ? : np->name; led 346 drivers/leds/leds-mt6323.c led->cdev.default_trigger = of_get_property(np, led 356 drivers/leds/leds-mt6323.c led->current_brightness = ret; led 376 drivers/leds/leds-mt6323.c struct mt6323_led *led; led 411 drivers/leds/leds-mt6323.c if (reg >= MT6323_MAX_LEDS || leds->led[reg]) { led 417 drivers/leds/leds-mt6323.c led = devm_kzalloc(dev, sizeof(*led), GFP_KERNEL); led 418 drivers/leds/leds-mt6323.c if (!led) { led 423 drivers/leds/leds-mt6323.c leds->led[reg] = led; led 424 drivers/leds/leds-mt6323.c leds->led[reg]->id = reg; led 425 drivers/leds/leds-mt6323.c leds->led[reg]->cdev.max_brightness = MT6323_MAX_BRIGHTNESS; led 426 drivers/leds/leds-mt6323.c leds->led[reg]->cdev.brightness_set_blocking = led 428 drivers/leds/leds-mt6323.c leds->led[reg]->cdev.blink_set = mt6323_led_set_blink; led 429 drivers/leds/leds-mt6323.c leds->led[reg]->cdev.brightness_get = led 431 drivers/leds/leds-mt6323.c leds->led[reg]->parent = leds; led 433 drivers/leds/leds-mt6323.c ret = mt6323_led_set_dt_default(&leds->led[reg]->cdev, child); led 440 drivers/leds/leds-mt6323.c ret = devm_led_classdev_register(dev, &leds->led[reg]->cdev); led 446 drivers/leds/leds-mt6323.c leds->led[reg]->cdev.dev->of_node = child; led 462 drivers/leds/leds-mt6323.c for (i = 0 ; leds->led[i] ; i++) led 463 drivers/leds/leds-mt6323.c mt6323_led_hw_off(&leds->led[i]->cdev); led 417 drivers/leds/leds-netxbig.c struct netxbig_led *leds, *led; led 480 drivers/leds/leds-netxbig.c led = leds; led 487 drivers/leds/leds-netxbig.c &led->mode_addr); led 492 drivers/leds/leds-netxbig.c &led->bright_addr); led 497 drivers/leds/leds-netxbig.c &led->bright_max); led 538 drivers/leds/leds-netxbig.c led->mode_val = mode_val; led 541 drivers/leds/leds-netxbig.c led->name = string; led 543 drivers/leds/leds-netxbig.c led->name = child->name; led 547 drivers/leds/leds-netxbig.c led->default_trigger = string; led 549 drivers/leds/leds-netxbig.c led++; led 247 drivers/leds/leds-ns2.c struct ns2_led *led, *leds; led 259 drivers/leds/leds-ns2.c led = leds; led 268 drivers/leds/leds-ns2.c led->cmd = ret; led 272 drivers/leds/leds-ns2.c led->slow = ret; led 274 drivers/leds/leds-ns2.c led->name = (ret == 0) ? string : child->name; led 278 drivers/leds/leds-ns2.c led->default_trigger = string; led 310 drivers/leds/leds-ns2.c led->num_modes = num_modes; led 311 drivers/leds/leds-ns2.c led->modval = modval; led 313 drivers/leds/leds-ns2.c led++; led 95 drivers/leds/leds-ot200.c struct ot200_led *led = container_of(led_cdev, struct ot200_led, cdev); led 101 drivers/leds/leds-ot200.c if (led->port == 0x49) led 103 drivers/leds/leds-ot200.c else if (led->port == 0x5a) led 109 drivers/leds/leds-ot200.c *val &= ~led->mask; led 111 drivers/leds/leds-ot200.c *val |= led->mask; led 113 drivers/leds/leds-ot200.c outb(*val, led->port); led 28 drivers/leds/leds-pca9532.c #define LED_REG(m, led) (PCA9532_REG_OFFSET(m) + 0x5 + (led >> 2)) led 29 drivers/leds/leds-pca9532.c #define LED_NUM(led) (led & 0x3) led 155 drivers/leds/leds-pca9532.c static void pca9532_setled(struct pca9532_led *led) led 157 drivers/leds/leds-pca9532.c struct i2c_client *client = led->client; led 163 drivers/leds/leds-pca9532.c reg = i2c_smbus_read_byte_data(client, LED_REG(maxleds, led->id)); led 165 drivers/leds/leds-pca9532.c reg = reg & ~(0x3<<LED_NUM(led->id)*2); led 167 drivers/leds/leds-pca9532.c reg = reg | (led->state << LED_NUM(led->id)*2); led 168 drivers/leds/leds-pca9532.c i2c_smbus_write_byte_data(client, LED_REG(maxleds, led->id), reg); led 176 drivers/leds/leds-pca9532.c struct pca9532_led *led = ldev_to_led(led_cdev); led 179 drivers/leds/leds-pca9532.c led->state = PCA9532_OFF; led 181 drivers/leds/leds-pca9532.c led->state = PCA9532_ON; led 183 drivers/leds/leds-pca9532.c led->state = PCA9532_PWM0; /* Thecus: hardcode one pwm */ led 184 drivers/leds/leds-pca9532.c err = pca9532_calcpwm(led->client, 0, 0, value); led 188 drivers/leds/leds-pca9532.c if (led->state == PCA9532_PWM0) led 189 drivers/leds/leds-pca9532.c pca9532_setpwm(led->client, 0); led 190 drivers/leds/leds-pca9532.c pca9532_setled(led); led 197 drivers/leds/leds-pca9532.c struct pca9532_led *led = ldev_to_led(led_cdev); led 198 drivers/leds/leds-pca9532.c struct i2c_client *client = led->client; led 215 drivers/leds/leds-pca9532.c if (led->state == PCA9532_PWM0) led 216 drivers/leds/leds-pca9532.c pca9532_setpwm(led->client, 0); led 217 drivers/leds/leds-pca9532.c pca9532_setled(led); led 253 drivers/leds/leds-pca9532.c static enum pca9532_state pca9532_getled(struct pca9532_led *led) led 255 drivers/leds/leds-pca9532.c struct i2c_client *client = led->client; led 262 drivers/leds/leds-pca9532.c reg = i2c_smbus_read_byte_data(client, LED_REG(maxleds, led->id)); led 263 drivers/leds/leds-pca9532.c ret = reg >> LED_NUM(led->id)/2; led 272 drivers/leds/leds-pca9532.c struct pca9532_led *led = &data->leds[offset]; led 274 drivers/leds/leds-pca9532.c if (led->type == PCA9532_TYPE_GPIO) led 283 drivers/leds/leds-pca9532.c struct pca9532_led *led = &data->leds[offset]; led 286 drivers/leds/leds-pca9532.c led->state = PCA9532_ON; led 288 drivers/leds/leds-pca9532.c led->state = PCA9532_OFF; led 290 drivers/leds/leds-pca9532.c pca9532_setled(led); led 368 drivers/leds/leds-pca9532.c struct pca9532_led *led = &data->leds[i]; led 370 drivers/leds/leds-pca9532.c led->client = client; led 371 drivers/leds/leds-pca9532.c led->id = i; led 372 drivers/leds/leds-pca9532.c led->type = pled->type; led 373 drivers/leds/leds-pca9532.c switch (led->type) { led 381 drivers/leds/leds-pca9532.c led->state = pca9532_getled(led); led 383 drivers/leds/leds-pca9532.c led->state = pled->state; led 384 drivers/leds/leds-pca9532.c led->name = pled->name; led 385 drivers/leds/leds-pca9532.c led->ldev.name = led->name; led 386 drivers/leds/leds-pca9532.c led->ldev.default_trigger = pled->default_trigger; led 387 drivers/leds/leds-pca9532.c led->ldev.brightness = LED_OFF; led 388 drivers/leds/leds-pca9532.c led->ldev.brightness_set_blocking = led 390 drivers/leds/leds-pca9532.c led->ldev.blink_set = pca9532_set_blink; led 391 drivers/leds/leds-pca9532.c err = led_classdev_register(&client->dev, &led->ldev); led 395 drivers/leds/leds-pca9532.c led->name); led 398 drivers/leds/leds-pca9532.c pca9532_setled(led); led 402 drivers/leds/leds-pca9532.c led->state = PCA9532_PWM1; led 403 drivers/leds/leds-pca9532.c pca9532_setled(led); led 308 drivers/leds/leds-pca955x.c struct pca955x_led *led = &pca955x->leds[offset]; led 310 drivers/leds/leds-pca955x.c if (led->type == PCA955X_TYPE_GPIO) led 320 drivers/leds/leds-pca955x.c struct pca955x_led *led = &pca955x->leds[offset]; led 323 drivers/leds/leds-pca955x.c return pca955x_led_set(&led->led_cdev, PCA955X_GPIO_HIGH); led 325 drivers/leds/leds-pca955x.c return pca955x_led_set(&led->led_cdev, PCA955X_GPIO_LOW); led 337 drivers/leds/leds-pca955x.c struct pca955x_led *led = &pca955x->leds[offset]; led 341 drivers/leds/leds-pca955x.c pca955x_read_input(pca955x->client, led->led_num / 8, ®); led 343 drivers/leds/leds-pca955x.c return !!(reg & (1 << (led->led_num % 8))); led 350 drivers/leds/leds-pca955x.c struct pca955x_led *led = &pca955x->leds[offset]; led 353 drivers/leds/leds-pca955x.c return pca955x_led_set(&led->led_cdev, PCA955X_GPIO_INPUT); led 298 drivers/leds/leds-pca963x.c struct led_info led = {}; led 306 drivers/leds/leds-pca963x.c res = fwnode_property_read_string(child, "label", &led.name); led 308 drivers/leds/leds-pca963x.c led.name = to_of_node(child)->name; led 311 drivers/leds/leds-pca963x.c &led.default_trigger); led 313 drivers/leds/leds-pca963x.c pca963x_leds[reg] = led; led 31 drivers/leds/leds-pm8058.c struct pm8058_led *led; led 36 drivers/leds/leds-pm8058.c led = container_of(cled, struct pm8058_led, cdev); led 37 drivers/leds/leds-pm8058.c switch (led->ledtype) { led 51 drivers/leds/leds-pm8058.c ret = regmap_update_bits(led->map, led->reg, mask, val); led 58 drivers/leds/leds-pm8058.c struct pm8058_led *led; led 62 drivers/leds/leds-pm8058.c led = container_of(cled, struct pm8058_led, cdev); led 64 drivers/leds/leds-pm8058.c ret = regmap_read(led->map, led->reg, &val); led 70 drivers/leds/leds-pm8058.c switch (led->ledtype) { led 90 drivers/leds/leds-pm8058.c struct pm8058_led *led; led 97 drivers/leds/leds-pm8058.c led = devm_kzalloc(&pdev->dev, sizeof(*led), GFP_KERNEL); led 98 drivers/leds/leds-pm8058.c if (!led) led 101 drivers/leds/leds-pm8058.c led->ledtype = (u32)(unsigned long)of_device_get_match_data(&pdev->dev); led 108 drivers/leds/leds-pm8058.c led->map = map; led 110 drivers/leds/leds-pm8058.c ret = of_property_read_u32(np, "reg", &led->reg); led 117 drivers/leds/leds-pm8058.c led->cdev.name = of_get_property(np, "label", NULL) ? : np->name; led 118 drivers/leds/leds-pm8058.c led->cdev.default_trigger = led 120 drivers/leds/leds-pm8058.c led->cdev.brightness_set = pm8058_led_set; led 121 drivers/leds/leds-pm8058.c led->cdev.brightness_get = pm8058_led_get; led 122 drivers/leds/leds-pm8058.c if (led->ledtype == PM8058_LED_TYPE_COMMON) led 126 drivers/leds/leds-pm8058.c led->cdev.max_brightness = maxbright; led 131 drivers/leds/leds-pm8058.c led->cdev.brightness = pm8058_led_get(&led->cdev); led 133 drivers/leds/leds-pm8058.c led->cdev.brightness = maxbright; led 134 drivers/leds/leds-pm8058.c pm8058_led_set(&led->cdev, maxbright); led 136 drivers/leds/leds-pm8058.c led->cdev.brightness = LED_OFF; led 137 drivers/leds/leds-pm8058.c pm8058_led_set(&led->cdev, LED_OFF); led 141 drivers/leds/leds-pm8058.c if (led->ledtype == PM8058_LED_TYPE_KEYPAD || led 142 drivers/leds/leds-pm8058.c led->ledtype == PM8058_LED_TYPE_FLASH) led 143 drivers/leds/leds-pm8058.c led->cdev.flags = LED_CORE_SUSPENDRESUME; led 145 drivers/leds/leds-pm8058.c ret = devm_led_classdev_register(&pdev->dev, &led->cdev); led 148 drivers/leds/leds-pm8058.c led->cdev.name); led 69 drivers/leds/leds-pwm.c struct led_pwm *led, struct fwnode_handle *fwnode) led 75 drivers/leds/leds-pwm.c led_data->active_low = led->active_low; led 76 drivers/leds/leds-pwm.c led_data->cdev.name = led->name; led 77 drivers/leds/leds-pwm.c led_data->cdev.default_trigger = led->default_trigger; led 79 drivers/leds/leds-pwm.c led_data->cdev.max_brightness = led->max_brightness; led 85 drivers/leds/leds-pwm.c led_data->pwm = devm_pwm_get(dev, led->name); led 90 drivers/leds/leds-pwm.c led->name, ret); led 105 drivers/leds/leds-pwm.c if (!led_data->period && (led->pwm_period_ns > 0)) led 106 drivers/leds/leds-pwm.c led_data->period = led->pwm_period_ns; led 114 drivers/leds/leds-pwm.c led->name, ret); led 123 drivers/leds/leds-pwm.c struct led_pwm led; led 126 drivers/leds/leds-pwm.c memset(&led, 0, sizeof(led)); led 129 drivers/leds/leds-pwm.c ret = fwnode_property_read_string(fwnode, "label", &led.name); led 131 drivers/leds/leds-pwm.c led.name = to_of_node(fwnode)->name; led 133 drivers/leds/leds-pwm.c if (!led.name) { led 139 drivers/leds/leds-pwm.c &led.default_trigger); led 141 drivers/leds/leds-pwm.c led.active_low = fwnode_property_read_bool(fwnode, led 144 drivers/leds/leds-pwm.c &led.max_brightness); led 146 drivers/leds/leds-pwm.c ret = led_pwm_add(dev, priv, &led, fwnode); led 58 drivers/leds/leds-regulator.c static void regulator_led_enable(struct regulator_led *led) led 62 drivers/leds/leds-regulator.c if (led->enabled) led 65 drivers/leds/leds-regulator.c ret = regulator_enable(led->vcc); led 67 drivers/leds/leds-regulator.c dev_err(led->cdev.dev, "Failed to enable vcc: %d\n", ret); led 71 drivers/leds/leds-regulator.c led->enabled = 1; led 74 drivers/leds/leds-regulator.c static void regulator_led_disable(struct regulator_led *led) led 78 drivers/leds/leds-regulator.c if (!led->enabled) led 81 drivers/leds/leds-regulator.c ret = regulator_disable(led->vcc); led 83 drivers/leds/leds-regulator.c dev_err(led->cdev.dev, "Failed to disable vcc: %d\n", ret); led 87 drivers/leds/leds-regulator.c led->enabled = 0; led 93 drivers/leds/leds-regulator.c struct regulator_led *led = to_regulator_led(led_cdev); led 97 drivers/leds/leds-regulator.c mutex_lock(&led->mutex); led 100 drivers/leds/leds-regulator.c regulator_led_disable(led); led 104 drivers/leds/leds-regulator.c if (led->cdev.max_brightness > 1) { led 105 drivers/leds/leds-regulator.c voltage = led_regulator_get_voltage(led->vcc, value); led 106 drivers/leds/leds-regulator.c dev_dbg(led->cdev.dev, "brightness: %d voltage: %d\n", led 109 drivers/leds/leds-regulator.c ret = regulator_set_voltage(led->vcc, voltage, voltage); led 111 drivers/leds/leds-regulator.c dev_err(led->cdev.dev, "Failed to set voltage %d: %d\n", led 115 drivers/leds/leds-regulator.c regulator_led_enable(led); led 118 drivers/leds/leds-regulator.c mutex_unlock(&led->mutex); led 126 drivers/leds/leds-regulator.c struct regulator_led *led; led 141 drivers/leds/leds-regulator.c led = devm_kzalloc(&pdev->dev, sizeof(*led), GFP_KERNEL); led 142 drivers/leds/leds-regulator.c if (led == NULL) led 145 drivers/leds/leds-regulator.c led->cdev.max_brightness = led_regulator_get_max_brightness(vcc); led 146 drivers/leds/leds-regulator.c if (pdata->brightness > led->cdev.max_brightness) { led 152 drivers/leds/leds-regulator.c led->cdev.brightness_set_blocking = regulator_led_brightness_set; led 153 drivers/leds/leds-regulator.c led->cdev.name = pdata->name; led 154 drivers/leds/leds-regulator.c led->cdev.flags |= LED_CORE_SUSPENDRESUME; led 155 drivers/leds/leds-regulator.c led->vcc = vcc; led 158 drivers/leds/leds-regulator.c if (regulator_is_enabled(led->vcc)) led 159 drivers/leds/leds-regulator.c led->enabled = 1; led 161 drivers/leds/leds-regulator.c mutex_init(&led->mutex); led 163 drivers/leds/leds-regulator.c platform_set_drvdata(pdev, led); led 165 drivers/leds/leds-regulator.c ret = led_classdev_register(&pdev->dev, &led->cdev); led 170 drivers/leds/leds-regulator.c led->cdev.brightness = pdata->brightness; led 173 drivers/leds/leds-regulator.c regulator_led_brightness_set(&led->cdev, led->cdev.brightness); led 180 drivers/leds/leds-regulator.c struct regulator_led *led = platform_get_drvdata(pdev); led 182 drivers/leds/leds-regulator.c led_classdev_unregister(&led->cdev); led 183 drivers/leds/leds-regulator.c regulator_led_disable(led); led 37 drivers/leds/leds-s3c24xx.c struct s3c24xx_gpio_led *led = to_gpio(led_cdev); led 38 drivers/leds/leds-s3c24xx.c struct s3c24xx_led_platdata *pd = led->pdata; led 57 drivers/leds/leds-s3c24xx.c struct s3c24xx_gpio_led *led; led 60 drivers/leds/leds-s3c24xx.c led = devm_kzalloc(&dev->dev, sizeof(struct s3c24xx_gpio_led), led 62 drivers/leds/leds-s3c24xx.c if (!led) led 65 drivers/leds/leds-s3c24xx.c led->cdev.brightness_set = s3c24xx_led_set; led 66 drivers/leds/leds-s3c24xx.c led->cdev.default_trigger = pdata->def_trigger; led 67 drivers/leds/leds-s3c24xx.c led->cdev.name = pdata->name; led 68 drivers/leds/leds-s3c24xx.c led->cdev.flags |= LED_CORE_SUSPENDRESUME; led 70 drivers/leds/leds-s3c24xx.c led->pdata = pdata; led 88 drivers/leds/leds-s3c24xx.c ret = devm_led_classdev_register(&dev->dev, &led->cdev); led 250 drivers/leds/leds-sc27xx-bltc.c struct sc27xx_led *led = &priv->leds[i]; led 253 drivers/leds/leds-sc27xx-bltc.c if (!led->active) led 256 drivers/leds/leds-sc27xx-bltc.c led->line = i; led 257 drivers/leds/leds-sc27xx-bltc.c led->priv = priv; led 258 drivers/leds/leds-sc27xx-bltc.c led->ldev.brightness_set_blocking = sc27xx_led_set; led 259 drivers/leds/leds-sc27xx-bltc.c led->ldev.pattern_set = sc27xx_led_pattern_set; led 260 drivers/leds/leds-sc27xx-bltc.c led->ldev.pattern_clear = sc27xx_led_pattern_clear; led 261 drivers/leds/leds-sc27xx-bltc.c led->ldev.default_trigger = "pattern"; led 263 drivers/leds/leds-sc27xx-bltc.c init_data.fwnode = led->fwnode; led 267 drivers/leds/leds-sc27xx-bltc.c err = devm_led_classdev_register_ext(dev, &led->ldev, led 68 drivers/leds/leds-spi-byte.c struct spi_byte_led *led = container_of(dev, struct spi_byte_led, ldev); led 72 drivers/leds/leds-spi-byte.c value = (u8) brightness + led->cdef->off_value; led 74 drivers/leds/leds-spi-byte.c mutex_lock(&led->mutex); led 75 drivers/leds/leds-spi-byte.c ret = spi_write(led->spi, &value, sizeof(value)); led 76 drivers/leds/leds-spi-byte.c mutex_unlock(&led->mutex); led 86 drivers/leds/leds-spi-byte.c struct spi_byte_led *led; led 101 drivers/leds/leds-spi-byte.c led = devm_kzalloc(dev, sizeof(*led), GFP_KERNEL); led 102 drivers/leds/leds-spi-byte.c if (!led) led 106 drivers/leds/leds-spi-byte.c strlcpy(led->name, name, sizeof(led->name)); led 107 drivers/leds/leds-spi-byte.c led->spi = spi; led 108 drivers/leds/leds-spi-byte.c mutex_init(&led->mutex); led 109 drivers/leds/leds-spi-byte.c led->cdef = of_dev_id->data; led 110 drivers/leds/leds-spi-byte.c led->ldev.name = led->name; led 111 drivers/leds/leds-spi-byte.c led->ldev.brightness = LED_OFF; led 112 drivers/leds/leds-spi-byte.c led->ldev.max_brightness = led->cdef->max_value - led->cdef->off_value; led 113 drivers/leds/leds-spi-byte.c led->ldev.brightness_set_blocking = spi_byte_brightness_set_blocking; led 118 drivers/leds/leds-spi-byte.c led->ldev.brightness = led->ldev.max_brightness; led 125 drivers/leds/leds-spi-byte.c spi_byte_brightness_set_blocking(&led->ldev, led 126 drivers/leds/leds-spi-byte.c led->ldev.brightness); led 128 drivers/leds/leds-spi-byte.c ret = devm_led_classdev_register(&spi->dev, &led->ldev); led 130 drivers/leds/leds-spi-byte.c mutex_destroy(&led->mutex); led 133 drivers/leds/leds-spi-byte.c spi_set_drvdata(spi, led); led 140 drivers/leds/leds-spi-byte.c struct spi_byte_led *led = spi_get_drvdata(spi); led 142 drivers/leds/leds-spi-byte.c mutex_destroy(&led->mutex); led 181 drivers/leds/leds-ss4200.c struct nasgpio_led *led = led_classdev_to_nasgpio_led(led_cdev); led 186 drivers/leds/leds-ss4200.c gpio_out |= (1<<led->gpio_bit); led 188 drivers/leds/leds-ss4200.c gpio_out &= ~(1<<led->gpio_bit); led 203 drivers/leds/leds-ss4200.c struct nasgpio_led *led = led_classdev_to_nasgpio_led(led_cdev); led 209 drivers/leds/leds-ss4200.c if (gpio_in & (1<<led->gpio_bit)) led 423 drivers/leds/leds-ss4200.c struct led_classdev *led = &nas_led->led_cdev; led 424 drivers/leds/leds-ss4200.c return led; led 447 drivers/leds/leds-ss4200.c struct led_classdev *led = dev_get_drvdata(dev); led 449 drivers/leds/leds-ss4200.c if (nasgpio_led_get_attr(led, GPO_BLINK)) led 459 drivers/leds/leds-ss4200.c struct led_classdev *led = dev_get_drvdata(dev); led 466 drivers/leds/leds-ss4200.c nasgpio_led_set_attr(led, GPO_BLINK, blink_state); led 483 drivers/leds/leds-ss4200.c struct led_classdev *led = get_classdev_for_led_nr(led_nr); led 485 drivers/leds/leds-ss4200.c led->name = nas_led->name; led 486 drivers/leds/leds-ss4200.c led->brightness = LED_OFF; led 487 drivers/leds/leds-ss4200.c if (nasgpio_led_get_attr(led, GP_LVL)) led 488 drivers/leds/leds-ss4200.c led->brightness = LED_FULL; led 489 drivers/leds/leds-ss4200.c led->brightness_set = nasgpio_led_set_brightness; led 490 drivers/leds/leds-ss4200.c led->blink_set = nasgpio_led_set_blink; led 491 drivers/leds/leds-ss4200.c led->groups = nasgpio_led_groups; led 492 drivers/leds/leds-ss4200.c ret = led_classdev_register(&nas_gpio_pci_dev->dev, led); led 501 drivers/leds/leds-ss4200.c struct led_classdev *led = get_classdev_for_led_nr(led_nr); led 502 drivers/leds/leds-ss4200.c led_classdev_unregister(led); led 273 drivers/leds/leds-tca6507.c static void set_select(struct tca6507_chip *tca, int led, int val) led 275 drivers/leds/leds-tca6507.c int mask = (1 << led); led 376 drivers/leds/leds-tca6507.c static void led_release(struct tca6507_led *led) led 379 drivers/leds/leds-tca6507.c struct tca6507_chip *tca = led->chip; led 380 drivers/leds/leds-tca6507.c if (led->bank >= 0) { led 381 drivers/leds/leds-tca6507.c struct bank *b = tca->bank + led->bank; led 382 drivers/leds/leds-tca6507.c if (led->blink) led 386 drivers/leds/leds-tca6507.c led->blink = 0; led 387 drivers/leds/leds-tca6507.c led->bank = -1; led 390 drivers/leds/leds-tca6507.c static int led_prepare(struct tca6507_led *led) led 394 drivers/leds/leds-tca6507.c int level = TO_LEVEL(led->led_cdev.brightness); led 395 drivers/leds/leds-tca6507.c struct tca6507_chip *tca = led->chip; led 401 drivers/leds/leds-tca6507.c led->led_cdev.brightness = TO_BRIGHT(level); led 403 drivers/leds/leds-tca6507.c set_select(tca, led->num, TCA6507_LS_LED_OFF); led 407 drivers/leds/leds-tca6507.c if (led->ontime == 0 || led->offtime == 0) { led 418 drivers/leds/leds-tca6507.c set_select(tca, led->num, TCA6507_LS_LED_ON); led 437 drivers/leds/leds-tca6507.c set_select(tca, led->num, TCA6507_LS_LED_ON); led 438 drivers/leds/leds-tca6507.c led->led_cdev.brightness = LED_FULL; led 446 drivers/leds/leds-tca6507.c led->bank = best; led 447 drivers/leds/leds-tca6507.c set_select(tca, led->num, bank_source[best]); led 448 drivers/leds/leds-tca6507.c led->led_cdev.brightness = TO_BRIGHT(tca->bank[best].level); led 457 drivers/leds/leds-tca6507.c if (choose_times(led->ontime, &c1, &c2) < 0) led 459 drivers/leds/leds-tca6507.c if (choose_times(led->offtime, &c1, &c2) < 0) led 478 drivers/leds/leds-tca6507.c led->on_dflt || led 479 drivers/leds/leds-tca6507.c tca->bank[i].ontime == led->ontime)) led 484 drivers/leds/leds-tca6507.c led->off_dflt || led 485 drivers/leds/leds-tca6507.c tca->bank[i].offtime == led->offtime)) led 501 drivers/leds/leds-tca6507.c led->bank = i; led 504 drivers/leds/leds-tca6507.c !led->on_dflt || led 506 drivers/leds/leds-tca6507.c b->ontime = led->ontime; led 507 drivers/leds/leds-tca6507.c b->on_dflt = led->on_dflt; led 512 drivers/leds/leds-tca6507.c !led->off_dflt || led 514 drivers/leds/leds-tca6507.c b->offtime = led->offtime; led 515 drivers/leds/leds-tca6507.c b->off_dflt = led->off_dflt; led 522 drivers/leds/leds-tca6507.c led->ontime = b->ontime; led 523 drivers/leds/leds-tca6507.c led->offtime = b->offtime; led 526 drivers/leds/leds-tca6507.c led->blink = 1; led 527 drivers/leds/leds-tca6507.c led->led_cdev.brightness = TO_BRIGHT(b->level); led 528 drivers/leds/leds-tca6507.c set_select(tca, led->num, blink_source[i]); led 532 drivers/leds/leds-tca6507.c static int led_assign(struct tca6507_led *led) led 534 drivers/leds/leds-tca6507.c struct tca6507_chip *tca = led->chip; led 539 drivers/leds/leds-tca6507.c led_release(led); led 540 drivers/leds/leds-tca6507.c err = led_prepare(led); led 546 drivers/leds/leds-tca6507.c led->ontime = 0; led 547 drivers/leds/leds-tca6507.c led->offtime = 0; led 548 drivers/leds/leds-tca6507.c led_prepare(led); led 560 drivers/leds/leds-tca6507.c struct tca6507_led *led = container_of(led_cdev, struct tca6507_led, led 562 drivers/leds/leds-tca6507.c led->led_cdev.brightness = brightness; led 563 drivers/leds/leds-tca6507.c led->ontime = 0; led 564 drivers/leds/leds-tca6507.c led->offtime = 0; led 565 drivers/leds/leds-tca6507.c led_assign(led); led 572 drivers/leds/leds-tca6507.c struct tca6507_led *led = container_of(led_cdev, struct tca6507_led, led 576 drivers/leds/leds-tca6507.c led->on_dflt = 1; led 578 drivers/leds/leds-tca6507.c led->on_dflt = 0; led 579 drivers/leds/leds-tca6507.c led->ontime = *delay_on; led 582 drivers/leds/leds-tca6507.c led->off_dflt = 1; led 584 drivers/leds/leds-tca6507.c led->off_dflt = 0; led 585 drivers/leds/leds-tca6507.c led->offtime = *delay_off; led 587 drivers/leds/leds-tca6507.c if (led->ontime == 0) led 588 drivers/leds/leds-tca6507.c led->ontime = 512; led 589 drivers/leds/leds-tca6507.c if (led->offtime == 0) led 590 drivers/leds/leds-tca6507.c led->offtime = 512; led 592 drivers/leds/leds-tca6507.c if (led->led_cdev.brightness == LED_OFF) led 593 drivers/leds/leds-tca6507.c led->led_cdev.brightness = LED_FULL; led 594 drivers/leds/leds-tca6507.c if (led_assign(led) < 0) { led 595 drivers/leds/leds-tca6507.c led->ontime = 0; led 596 drivers/leds/leds-tca6507.c led->offtime = 0; led 597 drivers/leds/leds-tca6507.c led->led_cdev.brightness = LED_OFF; led 600 drivers/leds/leds-tca6507.c *delay_on = led->ontime; led 601 drivers/leds/leds-tca6507.c *delay_off = led->offtime; led 707 drivers/leds/leds-tca6507.c struct led_info led; led 711 drivers/leds/leds-tca6507.c led.name = led 713 drivers/leds/leds-tca6507.c led.default_trigger = led 715 drivers/leds/leds-tca6507.c led.flags = 0; led 717 drivers/leds/leds-tca6507.c led.flags |= TCA6507_MAKE_GPIO; led 722 drivers/leds/leds-tca6507.c tca_leds[reg] = led; led 87 drivers/leds/leds-tlc591xx.c tlc591xx_set_ledout(struct tlc591xx_priv *priv, struct tlc591xx_led *led, led 90 drivers/leds/leds-tlc591xx.c unsigned int i = (led->led_no % 4) * 2; led 92 drivers/leds/leds-tlc591xx.c unsigned int addr = priv->reg_ledout_offset + (led->led_no >> 2); led 100 drivers/leds/leds-tlc591xx.c tlc591xx_set_pwm(struct tlc591xx_priv *priv, struct tlc591xx_led *led, led 103 drivers/leds/leds-tlc591xx.c u8 pwm = TLC591XX_REG_PWM(led->led_no); led 112 drivers/leds/leds-tlc591xx.c struct tlc591xx_led *led = ldev_to_led(led_cdev); led 113 drivers/leds/leds-tlc591xx.c struct tlc591xx_priv *priv = led->priv; led 118 drivers/leds/leds-tlc591xx.c err = tlc591xx_set_ledout(priv, led, LEDOUT_OFF); led 121 drivers/leds/leds-tlc591xx.c err = tlc591xx_set_ledout(priv, led, LEDOUT_ON); led 124 drivers/leds/leds-tlc591xx.c err = tlc591xx_set_ledout(priv, led, LEDOUT_DIM); led 126 drivers/leds/leds-tlc591xx.c err = tlc591xx_set_pwm(priv, led, brightness); led 153 drivers/leds/leds-tlc591xx.c struct tlc591xx_led *led = &priv->leds[i]; led 155 drivers/leds/leds-tlc591xx.c if (!led->active) led 158 drivers/leds/leds-tlc591xx.c led->priv = priv; led 159 drivers/leds/leds-tlc591xx.c led->led_no = i; led 160 drivers/leds/leds-tlc591xx.c led->ldev.brightness_set_blocking = tlc591xx_brightness_set; led 161 drivers/leds/leds-tlc591xx.c led->ldev.max_brightness = TLC591XX_MAX_BRIGHTNESS; led 162 drivers/leds/leds-tlc591xx.c err = led_classdev_register(dev, &led->ldev); led 165 drivers/leds/leds-tlc591xx.c led->ldev.name); led 38 drivers/leds/leds-wm831x-status.c static void wm831x_status_set(struct wm831x_status *led) led 42 drivers/leds/leds-wm831x-status.c mutex_lock(&led->mutex); led 44 drivers/leds/leds-wm831x-status.c led->reg_val &= ~(WM831X_LED_SRC_MASK | WM831X_LED_MODE_MASK | led 47 drivers/leds/leds-wm831x-status.c spin_lock_irqsave(&led->value_lock, flags); led 49 drivers/leds/leds-wm831x-status.c led->reg_val |= led->src << WM831X_LED_SRC_SHIFT; led 50 drivers/leds/leds-wm831x-status.c if (led->blink) { led 51 drivers/leds/leds-wm831x-status.c led->reg_val |= 2 << WM831X_LED_MODE_SHIFT; led 52 drivers/leds/leds-wm831x-status.c led->reg_val |= led->blink_time << WM831X_LED_DUR_SHIFT; led 53 drivers/leds/leds-wm831x-status.c led->reg_val |= led->blink_cyc; led 55 drivers/leds/leds-wm831x-status.c if (led->brightness != LED_OFF) led 56 drivers/leds/leds-wm831x-status.c led->reg_val |= 1 << WM831X_LED_MODE_SHIFT; led 59 drivers/leds/leds-wm831x-status.c spin_unlock_irqrestore(&led->value_lock, flags); led 61 drivers/leds/leds-wm831x-status.c wm831x_reg_write(led->wm831x, led->reg, led->reg_val); led 63 drivers/leds/leds-wm831x-status.c mutex_unlock(&led->mutex); led 69 drivers/leds/leds-wm831x-status.c struct wm831x_status *led = to_wm831x_status(led_cdev); led 72 drivers/leds/leds-wm831x-status.c spin_lock_irqsave(&led->value_lock, flags); led 73 drivers/leds/leds-wm831x-status.c led->brightness = value; led 75 drivers/leds/leds-wm831x-status.c led->blink = 0; led 76 drivers/leds/leds-wm831x-status.c spin_unlock_irqrestore(&led->value_lock, flags); led 77 drivers/leds/leds-wm831x-status.c wm831x_status_set(led); led 86 drivers/leds/leds-wm831x-status.c struct wm831x_status *led = to_wm831x_status(led_cdev); led 96 drivers/leds/leds-wm831x-status.c spin_lock_irqsave(&led->value_lock, flags); led 102 drivers/leds/leds-wm831x-status.c led->blink_time = 0; led 105 drivers/leds/leds-wm831x-status.c led->blink_time = 1; led 108 drivers/leds/leds-wm831x-status.c led->blink_time = 2; led 113 drivers/leds/leds-wm831x-status.c led->blink_time = 3; led 123 drivers/leds/leds-wm831x-status.c led->blink_cyc = 0; led 126 drivers/leds/leds-wm831x-status.c led->blink_cyc = 1; led 129 drivers/leds/leds-wm831x-status.c led->blink_cyc = 2; led 132 drivers/leds/leds-wm831x-status.c led->blink_cyc = 3; led 141 drivers/leds/leds-wm831x-status.c led->blink = 1; led 143 drivers/leds/leds-wm831x-status.c led->blink = 0; led 145 drivers/leds/leds-wm831x-status.c spin_unlock_irqrestore(&led->value_lock, flags); led 146 drivers/leds/leds-wm831x-status.c wm831x_status_set(led); led 162 drivers/leds/leds-wm831x-status.c struct wm831x_status *led = to_wm831x_status(led_cdev); led 166 drivers/leds/leds-wm831x-status.c mutex_lock(&led->mutex); led 169 drivers/leds/leds-wm831x-status.c if (i == led->src) led 174 drivers/leds/leds-wm831x-status.c mutex_unlock(&led->mutex); led 186 drivers/leds/leds-wm831x-status.c struct wm831x_status *led = to_wm831x_status(led_cdev); led 191 drivers/leds/leds-wm831x-status.c mutex_lock(&led->mutex); led 192 drivers/leds/leds-wm831x-status.c led->src = i; led 193 drivers/leds/leds-wm831x-status.c mutex_unlock(&led->mutex); led 194 drivers/leds/leds-wm831x-status.c wm831x_status_set(led); led 88 drivers/leds/leds-wm8350.c static int wm8350_led_enable(struct wm8350_led *led) led 92 drivers/leds/leds-wm8350.c if (led->enabled) led 95 drivers/leds/leds-wm8350.c ret = regulator_enable(led->isink); led 97 drivers/leds/leds-wm8350.c dev_err(led->cdev.dev, "Failed to enable ISINK: %d\n", ret); led 101 drivers/leds/leds-wm8350.c ret = regulator_enable(led->dcdc); led 103 drivers/leds/leds-wm8350.c dev_err(led->cdev.dev, "Failed to enable DCDC: %d\n", ret); led 104 drivers/leds/leds-wm8350.c regulator_disable(led->isink); led 108 drivers/leds/leds-wm8350.c led->enabled = 1; led 113 drivers/leds/leds-wm8350.c static int wm8350_led_disable(struct wm8350_led *led) led 117 drivers/leds/leds-wm8350.c if (!led->enabled) led 120 drivers/leds/leds-wm8350.c ret = regulator_disable(led->dcdc); led 122 drivers/leds/leds-wm8350.c dev_err(led->cdev.dev, "Failed to disable DCDC: %d\n", ret); led 126 drivers/leds/leds-wm8350.c ret = regulator_disable(led->isink); led 128 drivers/leds/leds-wm8350.c dev_err(led->cdev.dev, "Failed to disable ISINK: %d\n", ret); led 129 drivers/leds/leds-wm8350.c ret = regulator_enable(led->dcdc); led 131 drivers/leds/leds-wm8350.c dev_err(led->cdev.dev, "Failed to reenable DCDC: %d\n", led 136 drivers/leds/leds-wm8350.c led->enabled = 0; led 144 drivers/leds/leds-wm8350.c struct wm8350_led *led = to_wm8350_led(led_cdev); led 149 drivers/leds/leds-wm8350.c led->value = value; led 151 drivers/leds/leds-wm8350.c spin_lock_irqsave(&led->value_lock, flags); led 153 drivers/leds/leds-wm8350.c if (led->value == LED_OFF) { led 154 drivers/leds/leds-wm8350.c spin_unlock_irqrestore(&led->value_lock, flags); led 155 drivers/leds/leds-wm8350.c return wm8350_led_disable(led); led 163 drivers/leds/leds-wm8350.c uA = (led->max_uA_index * led->value) / LED_FULL; led 164 drivers/leds/leds-wm8350.c spin_unlock_irqrestore(&led->value_lock, flags); led 167 drivers/leds/leds-wm8350.c ret = regulator_set_current_limit(led->isink, isink_cur[uA], led 170 drivers/leds/leds-wm8350.c dev_err(led->cdev.dev, "Failed to set %duA: %d\n", led 175 drivers/leds/leds-wm8350.c return wm8350_led_enable(led); led 180 drivers/leds/leds-wm8350.c struct wm8350_led *led = platform_get_drvdata(pdev); led 182 drivers/leds/leds-wm8350.c led->value = LED_OFF; led 183 drivers/leds/leds-wm8350.c wm8350_led_disable(led); led 189 drivers/leds/leds-wm8350.c struct wm8350_led *led; led 216 drivers/leds/leds-wm8350.c led = devm_kzalloc(&pdev->dev, sizeof(*led), GFP_KERNEL); led 217 drivers/leds/leds-wm8350.c if (led == NULL) led 220 drivers/leds/leds-wm8350.c led->cdev.brightness_set_blocking = wm8350_led_set; led 221 drivers/leds/leds-wm8350.c led->cdev.default_trigger = pdata->default_trigger; led 222 drivers/leds/leds-wm8350.c led->cdev.name = pdata->name; led 223 drivers/leds/leds-wm8350.c led->cdev.flags |= LED_CORE_SUSPENDRESUME; led 224 drivers/leds/leds-wm8350.c led->enabled = regulator_is_enabled(isink); led 225 drivers/leds/leds-wm8350.c led->isink = isink; led 226 drivers/leds/leds-wm8350.c led->dcdc = dcdc; led 231 drivers/leds/leds-wm8350.c led->max_uA_index = i; led 238 drivers/leds/leds-wm8350.c spin_lock_init(&led->value_lock); led 239 drivers/leds/leds-wm8350.c led->value = LED_OFF; led 240 drivers/leds/leds-wm8350.c platform_set_drvdata(pdev, led); led 242 drivers/leds/leds-wm8350.c return led_classdev_register(&pdev->dev, &led->cdev); led 247 drivers/leds/leds-wm8350.c struct wm8350_led *led = platform_get_drvdata(pdev); led 249 drivers/leds/leds-wm8350.c led_classdev_unregister(&led->cdev); led 250 drivers/leds/leds-wm8350.c wm8350_led_disable(led); led 21 drivers/leds/trigger/ledtrig-backlight.c struct led_classdev *led; led 33 drivers/leds/trigger/ledtrig-backlight.c struct led_classdev *led = n->led; led 49 drivers/leds/trigger/ledtrig-backlight.c n->brightness = led->brightness; led 50 drivers/leds/trigger/ledtrig-backlight.c led_set_brightness_nosleep(led, LED_OFF); led 52 drivers/leds/trigger/ledtrig-backlight.c led_set_brightness_nosleep(led, n->brightness); led 71 drivers/leds/trigger/ledtrig-backlight.c struct led_classdev *led = led_trigger_get_led(dev); led 87 drivers/leds/trigger/ledtrig-backlight.c led_set_brightness_nosleep(led, LED_OFF); led 89 drivers/leds/trigger/ledtrig-backlight.c led_set_brightness_nosleep(led, n->brightness); led 101 drivers/leds/trigger/ledtrig-backlight.c static int bl_trig_activate(struct led_classdev *led) led 110 drivers/leds/trigger/ledtrig-backlight.c led_set_trigger_data(led, n); led 112 drivers/leds/trigger/ledtrig-backlight.c n->led = led; led 113 drivers/leds/trigger/ledtrig-backlight.c n->brightness = led->brightness; led 119 drivers/leds/trigger/ledtrig-backlight.c dev_err(led->dev, "unable to register backlight trigger\n"); led 124 drivers/leds/trigger/ledtrig-backlight.c static void bl_trig_deactivate(struct led_classdev *led) led 126 drivers/leds/trigger/ledtrig-backlight.c struct bl_trig_notifier *n = led_get_trigger_data(led); led 18 drivers/leds/trigger/ledtrig-gpio.c struct led_classdev *led; led 27 drivers/leds/trigger/ledtrig-gpio.c struct led_classdev *led = _led; led 28 drivers/leds/trigger/ledtrig-gpio.c struct gpio_trig_data *gpio_data = led_get_trigger_data(led); led 37 drivers/leds/trigger/ledtrig-gpio.c led_set_brightness_nosleep(gpio_data->led, led 40 drivers/leds/trigger/ledtrig-gpio.c led_set_brightness_nosleep(gpio_data->led, LED_FULL); led 42 drivers/leds/trigger/ledtrig-gpio.c led_set_brightness_nosleep(gpio_data->led, LED_OFF); led 87 drivers/leds/trigger/ledtrig-gpio.c struct led_classdev *led = led_trigger_get_led(dev); led 102 drivers/leds/trigger/ledtrig-gpio.c gpio_trig_irq(0, led); led 120 drivers/leds/trigger/ledtrig-gpio.c struct led_classdev *led = led_trigger_get_led(dev); led 136 drivers/leds/trigger/ledtrig-gpio.c free_irq(gpio_to_irq(gpio_data->gpio), led); led 143 drivers/leds/trigger/ledtrig-gpio.c | IRQF_TRIGGER_FALLING, "ledtrig-gpio", led); led 148 drivers/leds/trigger/ledtrig-gpio.c free_irq(gpio_to_irq(gpio_data->gpio), led); led 151 drivers/leds/trigger/ledtrig-gpio.c gpio_trig_irq(0, led); led 166 drivers/leds/trigger/ledtrig-gpio.c static int gpio_trig_activate(struct led_classdev *led) led 174 drivers/leds/trigger/ledtrig-gpio.c gpio_data->led = led; led 177 drivers/leds/trigger/ledtrig-gpio.c led_set_trigger_data(led, gpio_data); led 182 drivers/leds/trigger/ledtrig-gpio.c static void gpio_trig_deactivate(struct led_classdev *led) led 184 drivers/leds/trigger/ledtrig-gpio.c struct gpio_trig_data *gpio_data = led_get_trigger_data(led); led 187 drivers/leds/trigger/ledtrig-gpio.c free_irq(gpio_to_irq(gpio_data->gpio), led); led 691 drivers/macintosh/adbhid.c leds = (test_bit(LED_SCROLLL, dev->led) ? 4 : 0) | led 692 drivers/macintosh/adbhid.c (test_bit(LED_NUML, dev->led) ? 1 : 0) | led 693 drivers/macintosh/adbhid.c (test_bit(LED_CAPSL, dev->led) ? 2 : 0); led 313 drivers/macintosh/rack-meter.c int led; led 316 drivers/macintosh/rack-meter.c for (led = 0; led < 16; led++) { led 318 drivers/macintosh/rack-meter.c sample |= ((rm->ubuf[led] >= 0x80) << 15); led 301 drivers/media/common/siano/sms-cards.c int sms_board_led_feedback(struct smscore_device_t *coredev, int led) led 307 drivers/media/common/siano/sms-cards.c if (smscore_led_state(coredev, -1) == led) led 313 drivers/media/common/siano/sms-cards.c board->led_lo, (led & SMS_LED_LO) ? 1 : 0); led 315 drivers/media/common/siano/sms-cards.c board->led_hi, (led & SMS_LED_HI) ? 1 : 0); led 317 drivers/media/common/siano/sms-cards.c smscore_led_state(coredev, led); led 121 drivers/media/common/siano/sms-cards.h int sms_board_led_feedback(struct smscore_device_t *coredev, int led); led 394 drivers/media/common/siano/smscoreapi.c int smscore_led_state(struct smscore_device_t *core, int led) led 396 drivers/media/common/siano/smscoreapi.c if (led >= 0) led 397 drivers/media/common/siano/smscoreapi.c core->led_state = led; led 1168 drivers/media/common/siano/smscoreapi.h int smscore_led_state(struct smscore_device_t *core, int led); led 159 drivers/media/dvb-frontends/au8522_common.c int au8522_led_ctrl(struct au8522_state *state, int led) led 169 drivers/media/dvb-frontends/au8522_common.c if (led < 0) { led 174 drivers/media/dvb-frontends/au8522_common.c led *= -1; led 178 drivers/media/dvb-frontends/au8522_common.c if (state->led_state != led) { led 181 drivers/media/dvb-frontends/au8522_common.c dprintk("%s: %d\n", __func__, led); led 193 drivers/media/dvb-frontends/au8522_common.c if (led < led_config->num_led_states) led 194 drivers/media/dvb-frontends/au8522_common.c val |= led_config->led_states[led]; led 204 drivers/media/dvb-frontends/au8522_common.c state->led_state = led; led 206 drivers/media/dvb-frontends/au8522_common.c if (led == 0) led 695 drivers/media/dvb-frontends/au8522_dig.c int led; led 712 drivers/media/dvb-frontends/au8522_dig.c led = 2; led 714 drivers/media/dvb-frontends/au8522_dig.c led = 1; led 722 drivers/media/dvb-frontends/au8522_dig.c return au8522_led_ctrl(state, led); led 85 drivers/media/dvb-frontends/au8522_priv.h int au8522_led_ctrl(struct au8522_state *state, int led); led 194 drivers/media/rc/redrat3.c struct led_classdev led; led 857 drivers/media/rc/redrat3.c led); led 923 drivers/media/rc/redrat3.c rr3->led.brightness = LED_OFF; led 1101 drivers/media/rc/redrat3.c rr3->led.name = "redrat3:red:feedback"; led 1102 drivers/media/rc/redrat3.c rr3->led.default_trigger = "rc-feedback"; led 1103 drivers/media/rc/redrat3.c rr3->led.brightness_set = redrat3_brightness_set; led 1104 drivers/media/rc/redrat3.c retval = led_classdev_register(&intf->dev, &rr3->led); led 1125 drivers/media/rc/redrat3.c led_classdev_unregister(&rr3->led); led 1140 drivers/media/rc/redrat3.c led_classdev_unregister(&rr3->led); led 1148 drivers/media/rc/redrat3.c led_classdev_suspend(&rr3->led); led 1163 drivers/media/rc/redrat3.c led_classdev_resume(&rr3->led); led 33 drivers/media/rc/ttusbir.c struct led_classdev led; led 45 drivers/media/rc/ttusbir.c struct ttusbir *tt = container_of(led_dev, struct ttusbir, led); led 71 drivers/media/rc/ttusbir.c struct ttusbir *tt = container_of(led_dev, struct ttusbir, led); led 289 drivers/media/rc/ttusbir.c tt->led.name = "ttusbir:green:power"; led 290 drivers/media/rc/ttusbir.c tt->led.default_trigger = "rc-feedback"; led 291 drivers/media/rc/ttusbir.c tt->led.brightness_set = ttusbir_brightness_set; led 292 drivers/media/rc/ttusbir.c tt->led.brightness_get = ttusbir_brightness_get; led 295 drivers/media/rc/ttusbir.c ret = led_classdev_register(&intf->dev, &tt->led); led 340 drivers/media/rc/ttusbir.c led_classdev_unregister(&tt->led); led 369 drivers/media/rc/ttusbir.c led_classdev_unregister(&tt->led); led 390 drivers/media/rc/ttusbir.c led_classdev_suspend(&tt->led); led 402 drivers/media/rc/ttusbir.c led_classdev_resume(&tt->led); led 192 drivers/media/rc/winbond-cir.c struct led_classdev led; led 263 drivers/media/rc/winbond-cir.c led); led 277 drivers/media/rc/winbond-cir.c led); led 880 drivers/media/rc/winbond-cir.c led_classdev_suspend(&data->led); led 1004 drivers/media/rc/winbond-cir.c led_classdev_resume(&data->led); led 1047 drivers/media/rc/winbond-cir.c data->led.name = "cir::activity"; led 1048 drivers/media/rc/winbond-cir.c data->led.default_trigger = "rc-feedback"; led 1049 drivers/media/rc/winbond-cir.c data->led.brightness_set = wbcir_led_brightness_set; led 1050 drivers/media/rc/winbond-cir.c data->led.brightness_get = wbcir_led_brightness_get; led 1051 drivers/media/rc/winbond-cir.c err = led_classdev_register(&device->dev, &data->led); led 1142 drivers/media/rc/winbond-cir.c led_classdev_unregister(&data->led); led 1170 drivers/media/rc/winbond-cir.c led_classdev_unregister(&data->led); led 1173 drivers/media/rc/winbond-cir.c wbcir_led_brightness_set(&data->led, LED_OFF); led 21 drivers/media/usb/dvb-usb/af9005.c module_param_named(led, dvb_usb_af9005_led, bool, 0644); led 22 drivers/media/usb/dvb-usb/af9005.c MODULE_PARM_DESC(led, "enable led (default: 1)."); led 230 drivers/media/usb/dvb-usb/technisat-usb2.c u8 *led = state->buf; led 233 drivers/media/usb/dvb-usb/technisat-usb2.c led[0] = red ? SET_RED_LED_VENDOR_REQUEST : SET_GREEN_LED_VENDOR_REQUEST; led 240 drivers/media/usb/dvb-usb/technisat-usb2.c led[1] = 0x82; led 243 drivers/media/usb/dvb-usb/technisat-usb2.c led[1] = 0x82; led 245 drivers/media/usb/dvb-usb/technisat-usb2.c led[2] = 0x02; led 246 drivers/media/usb/dvb-usb/technisat-usb2.c led[3] = 10; led 247 drivers/media/usb/dvb-usb/technisat-usb2.c led[4] = 10; led 249 drivers/media/usb/dvb-usb/technisat-usb2.c led[2] = 0xff; led 250 drivers/media/usb/dvb-usb/technisat-usb2.c led[3] = 50; led 251 drivers/media/usb/dvb-usb/technisat-usb2.c led[4] = 50; led 253 drivers/media/usb/dvb-usb/technisat-usb2.c led[5] = 1; led 258 drivers/media/usb/dvb-usb/technisat-usb2.c led[1] = 0x80; led 269 drivers/media/usb/dvb-usb/technisat-usb2.c led, 8, 500); led 634 drivers/media/usb/em28xx/em28xx-core.c const struct em28xx_led *led = NULL; led 700 drivers/media/usb/em28xx/em28xx-core.c led = em28xx_find_led(dev, EM28XX_LED_ANALOG_CAPTURING); led 702 drivers/media/usb/em28xx/em28xx-core.c led = em28xx_find_led(dev, EM28XX_LED_DIGITAL_CAPTURING); led 704 drivers/media/usb/em28xx/em28xx-core.c if (led) led 705 drivers/media/usb/em28xx/em28xx-core.c em28xx_write_reg_bits(dev, led->gpio_reg, led 706 drivers/media/usb/em28xx/em28xx-core.c (!start ^ led->inverted) ? led 707 drivers/media/usb/em28xx/em28xx-core.c ~led->gpio_mask : led->gpio_mask, led 708 drivers/media/usb/em28xx/em28xx-core.c led->gpio_mask); led 514 drivers/media/usb/em28xx/em28xx-input.c const struct em28xx_led *led; led 563 drivers/media/usb/em28xx/em28xx-input.c led = em28xx_find_led(dev, led 566 drivers/media/usb/em28xx/em28xx-input.c if (led) led 568 drivers/media/usb/em28xx/em28xx-input.c led->gpio_reg, led 569 drivers/media/usb/em28xx/em28xx-input.c led->gpio_mask); led 774 drivers/mfd/88pm860x-core.c if (pdata && pdata->led) { led 778 drivers/mfd/88pm860x-core.c led_devs[i].platform_data = &pdata->led[i]; led 194 drivers/mfd/lm3533-core.c static int lm3533_set_lvled_config(struct lm3533 *lm3533, u8 lvled, u8 led) led 205 drivers/mfd/lm3533-core.c if (led > LM3533_LED_ID_MAX) led 217 drivers/mfd/lm3533-core.c val = led << shift; led 764 drivers/mfd/tps65010.c int tps65010_set_led(unsigned led, unsigned mode) led 772 drivers/mfd/tps65010.c if (led == LED1) led 776 drivers/mfd/tps65010.c led = LED2; led 781 drivers/mfd/tps65010.c pr_debug("%s: led%i_on 0x%02x\n", DRIVER_NAME, led, led 785 drivers/mfd/tps65010.c pr_debug("%s: led%i_per 0x%02x\n", DRIVER_NAME, led, led 814 drivers/mfd/tps65010.c DRIVER_NAME, led); led 819 drivers/mfd/tps65010.c pr_debug("%s: led%i_on 0x%02x\n", DRIVER_NAME, led, led 827 drivers/mfd/tps65010.c DRIVER_NAME, led); led 832 drivers/mfd/tps65010.c pr_debug("%s: led%i_per 0x%02x\n", DRIVER_NAME, led, led 74 drivers/misc/habanalabs/debugfs.c static void hl_debugfs_led_set(struct hl_device *hdev, u8 led, u8 state) led 86 drivers/misc/habanalabs/debugfs.c pkt.led_index = cpu_to_le32(led); led 93 drivers/misc/habanalabs/debugfs.c dev_err(hdev->dev, "Failed to set LED %d, error %d\n", led, rc); led 192 drivers/misc/habanalabs/goya/goyaP.h void goya_debugfs_led_set(struct hl_device *hdev, u8 led, u8 state); led 177 drivers/mmc/core/core.c led_trigger_event(host->led, LED_OFF); led 354 drivers/mmc/core/core.c led_trigger_event(host->led, LED_FULL); led 473 drivers/mmc/core/host.c led_trigger_register_simple(dev_name(&host->class_dev), &host->led); led 506 drivers/mmc/core/host.c led_trigger_unregister_simple(host->led); led 1072 drivers/mmc/host/au1xmmc.c if (host->platdata && host->platdata->led) { led 1073 drivers/mmc/host/au1xmmc.c struct led_classdev *led = host->platdata->led; led 1074 drivers/mmc/host/au1xmmc.c led->name = mmc_hostname(mmc); led 1075 drivers/mmc/host/au1xmmc.c led->brightness = LED_OFF; led 1076 drivers/mmc/host/au1xmmc.c led->default_trigger = mmc_hostname(mmc); led 1077 drivers/mmc/host/au1xmmc.c ret = led_classdev_register(mmc_dev(mmc), led); led 1101 drivers/mmc/host/au1xmmc.c if (host->platdata && host->platdata->led) led 1102 drivers/mmc/host/au1xmmc.c led_classdev_unregister(host->platdata->led); led 1143 drivers/mmc/host/au1xmmc.c if (host->platdata && host->platdata->led) led 1144 drivers/mmc/host/au1xmmc.c led_classdev_unregister(host->platdata->led); led 53 drivers/mmc/host/rtsx_usb_sdmmc.c struct led_classdev led; led 1271 drivers/mmc/host/rtsx_usb_sdmmc.c static void rtsx_usb_led_control(struct led_classdev *led, led 1274 drivers/mmc/host/rtsx_usb_sdmmc.c struct rtsx_usb_sdmmc *host = container_of(led, led 1275 drivers/mmc/host/rtsx_usb_sdmmc.c struct rtsx_usb_sdmmc, led); led 1280 drivers/mmc/host/rtsx_usb_sdmmc.c host->led.brightness = brightness; led 1296 drivers/mmc/host/rtsx_usb_sdmmc.c if (host->led.brightness == LED_OFF) led 1365 drivers/mmc/host/rtsx_usb_sdmmc.c host->led.name = host->led_name; led 1366 drivers/mmc/host/rtsx_usb_sdmmc.c host->led.brightness = LED_OFF; led 1367 drivers/mmc/host/rtsx_usb_sdmmc.c host->led.default_trigger = mmc_hostname(mmc); led 1368 drivers/mmc/host/rtsx_usb_sdmmc.c host->led.brightness_set = rtsx_usb_led_control; led 1370 drivers/mmc/host/rtsx_usb_sdmmc.c err = led_classdev_register(mmc_dev(mmc), &host->led); led 1409 drivers/mmc/host/rtsx_usb_sdmmc.c led_classdev_unregister(&host->led); led 369 drivers/mmc/host/sdhci.c static void sdhci_led_control(struct led_classdev *led, led 372 drivers/mmc/host/sdhci.c struct sdhci_host *host = container_of(led, struct sdhci_host, led); led 398 drivers/mmc/host/sdhci.c host->led.name = host->led_name; led 399 drivers/mmc/host/sdhci.c host->led.brightness = LED_OFF; led 400 drivers/mmc/host/sdhci.c host->led.default_trigger = mmc_hostname(mmc); led 401 drivers/mmc/host/sdhci.c host->led.brightness_set = sdhci_led_control; led 403 drivers/mmc/host/sdhci.c return led_classdev_register(mmc_dev(mmc), &host->led); led 411 drivers/mmc/host/sdhci.c led_classdev_unregister(&host->led); led 502 drivers/mmc/host/sdhci.h struct led_classdev led; /* LED control */ led 8836 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_led_info *led = &bp->leds[i]; led 8837 drivers/net/ethernet/broadcom/bnxt/bnxt.c __le16 caps = led->led_state_caps; led 8839 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!led->led_group_id || led 61 drivers/net/ethernet/chelsio/cxgb/mv88x201x.c u32 led = 0; led 64 drivers/net/ethernet/chelsio/cxgb/mv88x201x.c cphy_mdio_read(cphy, MDIO_MMD_PMAPMD, MDIO_CTRL2, &led); led 67 drivers/net/ethernet/chelsio/cxgb/mv88x201x.c led |= LINK_ENABLE_BIT; led 68 drivers/net/ethernet/chelsio/cxgb/mv88x201x.c cphy_mdio_write(cphy, MDIO_MMD_PMAPMD, MDIO_CTRL2, led); led 70 drivers/net/ethernet/chelsio/cxgb/mv88x201x.c led &= ~LINK_ENABLE_BIT; led 71 drivers/net/ethernet/chelsio/cxgb/mv88x201x.c cphy_mdio_write(cphy, MDIO_MMD_PMAPMD, MDIO_CTRL2, led); led 5548 drivers/net/ethernet/intel/e1000e/ich8lan.c u32 i, led; led 5555 drivers/net/ethernet/intel/e1000e/ich8lan.c led = (data >> (i * 5)) & E1000_PHY_LED0_MASK; led 5556 drivers/net/ethernet/intel/e1000e/ich8lan.c if ((led & E1000_PHY_LED0_MODE_MASK) != led 5559 drivers/net/ethernet/intel/e1000e/ich8lan.c if (led & E1000_PHY_LED0_IVRT) led 5578 drivers/net/ethernet/intel/e1000e/ich8lan.c u32 i, led; led 5585 drivers/net/ethernet/intel/e1000e/ich8lan.c led = (data >> (i * 5)) & E1000_PHY_LED0_MASK; led 5586 drivers/net/ethernet/intel/e1000e/ich8lan.c if ((led & E1000_PHY_LED0_MODE_MASK) != led 5589 drivers/net/ethernet/intel/e1000e/ich8lan.c if (led & E1000_PHY_LED0_IVRT) led 1444 drivers/net/ethernet/intel/i40e/i40e_common.c if (!hw->func_caps.led[idx]) led 3334 drivers/net/ethernet/intel/i40e/i40e_common.c p->led[phys_id] = true; led 319 drivers/net/ethernet/intel/i40e/i40e_type.h bool led[I40E_HW_CAP_MAX_GPIO]; led 34 drivers/net/ethernet/sfc/falcon/phy.h void falcon_qt202x_set_led(struct ef4_nic *p, int led, int state); led 50 drivers/net/ethernet/sfc/falcon/qt202x_phy.c void falcon_qt202x_set_led(struct ef4_nic *p, int led, int mode) led 52 drivers/net/ethernet/sfc/falcon/qt202x_phy.c int addr = MDIO_QUAKE_LED0_REG + led; led 738 drivers/net/phy/mscc.c char *led, led 751 drivers/net/phy/mscc.c err = of_property_read_u32(of_node, led, &led_mode); led 753 drivers/net/phy/mscc.c phydev_err(phydev, "DT %s invalid\n", led); led 767 drivers/net/phy/mscc.c char *led, led 1036 drivers/net/usb/ax88179_178a.c u16 led; led 1039 drivers/net/usb/ax88179_178a.c if (ax88179_read_cmd(dev, AX_ACCESS_EEPROM, 0x3C, 1, 2, &led) < 0) led 1042 drivers/net/usb/ax88179_178a.c led >>= 8; led 1043 drivers/net/usb/ax88179_178a.c switch (led) { led 1045 drivers/net/usb/ax88179_178a.c led = LED0_ACTIVE | LED1_LINK_10 | LED1_LINK_100 | led 1050 drivers/net/usb/ax88179_178a.c led = LED0_ACTIVE | LED1_LINK_1000 | LED2_LINK_100 | LED_VALID; led 1053 drivers/net/usb/ax88179_178a.c led = LED0_ACTIVE | LED1_LINK_1000 | LED2_LINK_100 | led 1057 drivers/net/usb/ax88179_178a.c led = LED0_ACTIVE | LED1_ACTIVE | LED1_LINK_1000 | LED2_ACTIVE | led 1061 drivers/net/usb/ax88179_178a.c led = LED0_ACTIVE | LED1_LINK_10 | LED1_LINK_100 | led 1067 drivers/net/usb/ax88179_178a.c *ledvalue = led; led 1894 drivers/net/wan/lmc/lmc_main.c void lmc_led_on(lmc_softc_t * const sc, u32 led) /*fold00*/ led 1897 drivers/net/wan/lmc/lmc_main.c if((~sc->lmc_miireg16) & led){ /* Already on! */ led 1902 drivers/net/wan/lmc/lmc_main.c sc->lmc_miireg16 &= ~led; led 1907 drivers/net/wan/lmc/lmc_main.c void lmc_led_off(lmc_softc_t * const sc, u32 led) /*fold00*/ led 1910 drivers/net/wan/lmc/lmc_main.c if(sc->lmc_miireg16 & led){ /* Already set don't do anything */ led 1915 drivers/net/wan/lmc/lmc_main.c sc->lmc_miireg16 |= led; led 418 drivers/net/wireless/ath/ar5523/ar5523.c struct ar5523_cmd_ledsteady led; led 420 drivers/net/wireless/ath/ar5523/ar5523.c led.lednum = cpu_to_be32(lednum); led 421 drivers/net/wireless/ath/ar5523/ar5523.c led.ledmode = cpu_to_be32(ledmode); led 426 drivers/net/wireless/ath/ar5523/ar5523.c return ar5523_cmd_write(ar, WDCMSG_SET_LED_STEADY, &led, sizeof(led), led 55 drivers/net/wireless/ath/ath5k/gpio.c u32 led; led 72 drivers/net/wireless/ath/ath5k/gpio.c led = AR5K_PCICFG_LEDMODE_PROP | AR5K_PCICFG_LED_PEND; led 77 drivers/net/wireless/ath/ath5k/gpio.c led = AR5K_PCICFG_LEDMODE_PROP | AR5K_PCICFG_LED_NONE; led 83 drivers/net/wireless/ath/ath5k/gpio.c led = AR5K_PCICFG_LEDMODE_PROP | AR5K_PCICFG_LED_ASSOC; led 88 drivers/net/wireless/ath/ath5k/gpio.c led = AR5K_PCICFG_LEDMODE_PROM | AR5K_PCICFG_LED_NONE; led 95 drivers/net/wireless/ath/ath5k/gpio.c AR5K_REG_ENABLE_BITS(ah, AR5K_PCICFG, led); led 116 drivers/net/wireless/ath/ath5k/led.c struct ath5k_led *led = container_of(led_dev, struct ath5k_led, led 120 drivers/net/wireless/ath/ath5k/led.c ath5k_led_off(led->ah); led 122 drivers/net/wireless/ath/ath5k/led.c ath5k_led_on(led->ah); led 126 drivers/net/wireless/ath/ath5k/led.c ath5k_register_led(struct ath5k_hw *ah, struct ath5k_led *led, led 131 drivers/net/wireless/ath/ath5k/led.c led->ah = ah; led 132 drivers/net/wireless/ath/ath5k/led.c strncpy(led->name, name, sizeof(led->name)); led 133 drivers/net/wireless/ath/ath5k/led.c led->name[sizeof(led->name)-1] = 0; led 134 drivers/net/wireless/ath/ath5k/led.c led->led_dev.name = led->name; led 135 drivers/net/wireless/ath/ath5k/led.c led->led_dev.default_trigger = trigger; led 136 drivers/net/wireless/ath/ath5k/led.c led->led_dev.brightness_set = ath5k_led_brightness_set; led 138 drivers/net/wireless/ath/ath5k/led.c err = led_classdev_register(ah->dev, &led->led_dev); led 141 drivers/net/wireless/ath/ath5k/led.c led->ah = NULL; led 147 drivers/net/wireless/ath/ath5k/led.c ath5k_unregister_led(struct ath5k_led *led) led 149 drivers/net/wireless/ath/ath5k/led.c if (!led->ah) led 151 drivers/net/wireless/ath/ath5k/led.c led_classdev_unregister(&led->led_dev); led 152 drivers/net/wireless/ath/ath5k/led.c ath5k_led_off(led->ah); led 153 drivers/net/wireless/ath/ath5k/led.c led->ah = NULL; led 213 drivers/net/wireless/ath/carl9170/eeprom.h __le16 led; led 106 drivers/net/wireless/ath/carl9170/led.c static void carl9170_led_set_brightness(struct led_classdev *led, led 109 drivers/net/wireless/ath/carl9170/led.c struct carl9170_led *arl = container_of(led, struct carl9170_led, l); led 48 drivers/net/wireless/broadcom/b43/leds.c struct b43_led *led) led 53 drivers/net/wireless/broadcom/b43/leds.c if (!led->wl) led 62 drivers/net/wireless/broadcom/b43/leds.c turn_on = atomic_read(&led->state) != LED_OFF; led 65 drivers/net/wireless/broadcom/b43/leds.c if (turn_on == led->hw_state) led 67 drivers/net/wireless/broadcom/b43/leds.c led->hw_state = turn_on; led 70 drivers/net/wireless/broadcom/b43/leds.c b43_led_turn_on(dev, led->index, led->activelow); led 72 drivers/net/wireless/broadcom/b43/leds.c b43_led_turn_off(dev, led->index, led->activelow); led 99 drivers/net/wireless/broadcom/b43/leds.c struct b43_led *led = container_of(led_dev, struct b43_led, led_dev); led 100 drivers/net/wireless/broadcom/b43/leds.c struct b43_wl *wl = led->wl; led 103 drivers/net/wireless/broadcom/b43/leds.c atomic_set(&led->state, brightness); led 108 drivers/net/wireless/broadcom/b43/leds.c static int b43_register_led(struct b43_wldev *dev, struct b43_led *led, led 114 drivers/net/wireless/broadcom/b43/leds.c if (led->wl) led 118 drivers/net/wireless/broadcom/b43/leds.c led->wl = dev->wl; led 119 drivers/net/wireless/broadcom/b43/leds.c led->index = led_index; led 120 drivers/net/wireless/broadcom/b43/leds.c led->activelow = activelow; led 121 drivers/net/wireless/broadcom/b43/leds.c strlcpy(led->name, name, sizeof(led->name)); led 122 drivers/net/wireless/broadcom/b43/leds.c atomic_set(&led->state, 0); led 124 drivers/net/wireless/broadcom/b43/leds.c led->led_dev.name = led->name; led 125 drivers/net/wireless/broadcom/b43/leds.c led->led_dev.default_trigger = default_trigger; led 126 drivers/net/wireless/broadcom/b43/leds.c led->led_dev.brightness_set = b43_led_brightness_set; led 128 drivers/net/wireless/broadcom/b43/leds.c err = led_classdev_register(dev->dev->dev, &led->led_dev); led 131 drivers/net/wireless/broadcom/b43/leds.c led->wl = NULL; led 138 drivers/net/wireless/broadcom/b43/leds.c static void b43_unregister_led(struct b43_led *led) led 140 drivers/net/wireless/broadcom/b43/leds.c if (!led->wl) led 142 drivers/net/wireless/broadcom/b43/leds.c led_classdev_unregister(&led->led_dev); led 143 drivers/net/wireless/broadcom/b43/leds.c led->wl = NULL; led 251 drivers/net/wireless/broadcom/b43/leds.c struct b43_led *led; led 257 drivers/net/wireless/broadcom/b43/leds.c led = &dev->wl->leds.led_radio; led 258 drivers/net/wireless/broadcom/b43/leds.c if (led->wl) { led 260 drivers/net/wireless/broadcom/b43/leds.c b43_led_turn_on(dev, led->index, led->activelow); led 261 drivers/net/wireless/broadcom/b43/leds.c led->hw_state = true; led 262 drivers/net/wireless/broadcom/b43/leds.c atomic_set(&led->state, 1); led 264 drivers/net/wireless/broadcom/b43/leds.c b43_led_turn_off(dev, led->index, led->activelow); led 265 drivers/net/wireless/broadcom/b43/leds.c led->hw_state = false; led 266 drivers/net/wireless/broadcom/b43/leds.c atomic_set(&led->state, 0); led 271 drivers/net/wireless/broadcom/b43/leds.c led = &dev->wl->leds.led_tx; led 272 drivers/net/wireless/broadcom/b43/leds.c if (led->wl) { led 273 drivers/net/wireless/broadcom/b43/leds.c b43_led_turn_off(dev, led->index, led->activelow); led 274 drivers/net/wireless/broadcom/b43/leds.c led->hw_state = false; led 275 drivers/net/wireless/broadcom/b43/leds.c atomic_set(&led->state, 0); led 277 drivers/net/wireless/broadcom/b43/leds.c led = &dev->wl->leds.led_rx; led 278 drivers/net/wireless/broadcom/b43/leds.c if (led->wl) { led 279 drivers/net/wireless/broadcom/b43/leds.c b43_led_turn_off(dev, led->index, led->activelow); led 280 drivers/net/wireless/broadcom/b43/leds.c led->hw_state = false; led 281 drivers/net/wireless/broadcom/b43/leds.c atomic_set(&led->state, 0); led 283 drivers/net/wireless/broadcom/b43/leds.c led = &dev->wl->leds.led_assoc; led 284 drivers/net/wireless/broadcom/b43/leds.c if (led->wl) { led 285 drivers/net/wireless/broadcom/b43/leds.c b43_led_turn_off(dev, led->index, led->activelow); led 286 drivers/net/wireless/broadcom/b43/leds.c led->hw_state = false; led 287 drivers/net/wireless/broadcom/b43/leds.c atomic_set(&led->state, 0); led 59 drivers/net/wireless/broadcom/b43legacy/leds.c struct b43legacy_led *led = container_of(led_dev, struct b43legacy_led, led 61 drivers/net/wireless/broadcom/b43legacy/leds.c struct b43legacy_wldev *dev = led->dev; led 70 drivers/net/wireless/broadcom/b43legacy/leds.c b43legacy_led_turn_off(dev, led->index, led->activelow); led 72 drivers/net/wireless/broadcom/b43legacy/leds.c b43legacy_led_turn_on(dev, led->index, led->activelow); led 76 drivers/net/wireless/broadcom/b43legacy/leds.c struct b43legacy_led *led, led 84 drivers/net/wireless/broadcom/b43legacy/leds.c if (led->dev) led 88 drivers/net/wireless/broadcom/b43legacy/leds.c led->dev = dev; led 89 drivers/net/wireless/broadcom/b43legacy/leds.c led->index = led_index; led 90 drivers/net/wireless/broadcom/b43legacy/leds.c led->activelow = activelow; led 91 drivers/net/wireless/broadcom/b43legacy/leds.c strlcpy(led->name, name, sizeof(led->name)); led 93 drivers/net/wireless/broadcom/b43legacy/leds.c led->led_dev.name = led->name; led 94 drivers/net/wireless/broadcom/b43legacy/leds.c led->led_dev.default_trigger = default_trigger; led 95 drivers/net/wireless/broadcom/b43legacy/leds.c led->led_dev.brightness_set = b43legacy_led_brightness_set; led 97 drivers/net/wireless/broadcom/b43legacy/leds.c err = led_classdev_register(dev->dev->dev, &led->led_dev); led 100 drivers/net/wireless/broadcom/b43legacy/leds.c led->dev = NULL; led 106 drivers/net/wireless/broadcom/b43legacy/leds.c static void b43legacy_unregister_led(struct b43legacy_led *led) led 108 drivers/net/wireless/broadcom/b43legacy/leds.c if (!led->dev) led 110 drivers/net/wireless/broadcom/b43legacy/leds.c led_classdev_unregister(&led->led_dev); led 111 drivers/net/wireless/broadcom/b43legacy/leds.c b43legacy_led_turn_off(led->dev, led->index, led->activelow); led 112 drivers/net/wireless/broadcom/b43legacy/leds.c led->dev = NULL; led 76 drivers/net/wireless/broadcom/brcm80211/brcmsmac/led.c u8 led = *leds[i]; led 77 drivers/net/wireless/broadcom/brcm80211/brcmsmac/led.c if ((led & BRCMS_LED_BEH_MASK) == BRCMS_LED_RADIO) { led 79 drivers/net/wireless/broadcom/brcm80211/brcmsmac/led.c if (led & BRCMS_LED_AL_MASK) led 869 drivers/net/wireless/intel/ipw2x00/ipw2200.c u32 led; led 881 drivers/net/wireless/intel/ipw2x00/ipw2200.c led = ipw_read_reg32(priv, IPW_EVENT_REG); led 882 drivers/net/wireless/intel/ipw2x00/ipw2200.c led |= priv->led_association_on; led 884 drivers/net/wireless/intel/ipw2x00/ipw2200.c led = ipw_register_toggle(led); led 886 drivers/net/wireless/intel/ipw2x00/ipw2200.c IPW_DEBUG_LED("Reg: 0x%08X\n", led); led 887 drivers/net/wireless/intel/ipw2x00/ipw2200.c ipw_write_reg32(priv, IPW_EVENT_REG, led); led 912 drivers/net/wireless/intel/ipw2x00/ipw2200.c u32 led; led 922 drivers/net/wireless/intel/ipw2x00/ipw2200.c led = ipw_read_reg32(priv, IPW_EVENT_REG); led 923 drivers/net/wireless/intel/ipw2x00/ipw2200.c led &= priv->led_association_off; led 924 drivers/net/wireless/intel/ipw2x00/ipw2200.c led = ipw_register_toggle(led); led 926 drivers/net/wireless/intel/ipw2x00/ipw2200.c IPW_DEBUG_LED("Reg: 0x%08X\n", led); led 927 drivers/net/wireless/intel/ipw2x00/ipw2200.c ipw_write_reg32(priv, IPW_EVENT_REG, led); led 956 drivers/net/wireless/intel/ipw2x00/ipw2200.c u32 led; led 965 drivers/net/wireless/intel/ipw2x00/ipw2200.c led = ipw_read_reg32(priv, IPW_EVENT_REG); led 966 drivers/net/wireless/intel/ipw2x00/ipw2200.c led |= priv->led_activity_on; led 968 drivers/net/wireless/intel/ipw2x00/ipw2200.c led = ipw_register_toggle(led); led 970 drivers/net/wireless/intel/ipw2x00/ipw2200.c IPW_DEBUG_LED("Reg: 0x%08X\n", led); led 971 drivers/net/wireless/intel/ipw2x00/ipw2200.c ipw_write_reg32(priv, IPW_EVENT_REG, led); led 999 drivers/net/wireless/intel/ipw2x00/ipw2200.c u32 led; led 1007 drivers/net/wireless/intel/ipw2x00/ipw2200.c led = ipw_read_reg32(priv, IPW_EVENT_REG); led 1008 drivers/net/wireless/intel/ipw2x00/ipw2200.c led &= priv->led_activity_off; led 1010 drivers/net/wireless/intel/ipw2x00/ipw2200.c led = ipw_register_toggle(led); led 1012 drivers/net/wireless/intel/ipw2x00/ipw2200.c IPW_DEBUG_LED("Reg: 0x%08X\n", led); led 1013 drivers/net/wireless/intel/ipw2x00/ipw2200.c ipw_write_reg32(priv, IPW_EVENT_REG, led); led 1035 drivers/net/wireless/intel/ipw2x00/ipw2200.c u32 led; led 1044 drivers/net/wireless/intel/ipw2x00/ipw2200.c led = ipw_read_reg32(priv, IPW_EVENT_REG); led 1046 drivers/net/wireless/intel/ipw2x00/ipw2200.c led |= priv->led_ofdm_on; led 1047 drivers/net/wireless/intel/ipw2x00/ipw2200.c led &= priv->led_association_off; led 1050 drivers/net/wireless/intel/ipw2x00/ipw2200.c led |= priv->led_ofdm_on; led 1051 drivers/net/wireless/intel/ipw2x00/ipw2200.c led |= priv->led_association_on; led 1054 drivers/net/wireless/intel/ipw2x00/ipw2200.c led &= priv->led_ofdm_off; led 1055 drivers/net/wireless/intel/ipw2x00/ipw2200.c led |= priv->led_association_on; led 1059 drivers/net/wireless/intel/ipw2x00/ipw2200.c led = ipw_register_toggle(led); led 1061 drivers/net/wireless/intel/ipw2x00/ipw2200.c IPW_DEBUG_LED("Reg: 0x%08X\n", led); led 1062 drivers/net/wireless/intel/ipw2x00/ipw2200.c ipw_write_reg32(priv, IPW_EVENT_REG, led); led 1070 drivers/net/wireless/intel/ipw2x00/ipw2200.c u32 led; led 1078 drivers/net/wireless/intel/ipw2x00/ipw2200.c led = ipw_read_reg32(priv, IPW_EVENT_REG); led 1079 drivers/net/wireless/intel/ipw2x00/ipw2200.c led &= priv->led_ofdm_off; led 1080 drivers/net/wireless/intel/ipw2x00/ipw2200.c led &= priv->led_association_off; led 1082 drivers/net/wireless/intel/ipw2x00/ipw2200.c led = ipw_register_toggle(led); led 1084 drivers/net/wireless/intel/ipw2x00/ipw2200.c IPW_DEBUG_LED("Reg: 0x%08X\n", led); led 1085 drivers/net/wireless/intel/ipw2x00/ipw2200.c ipw_write_reg32(priv, IPW_EVENT_REG, led); led 1540 drivers/net/wireless/intel/ipw2x00/ipw2200.c static DEVICE_ATTR(led, 0644, show_led, store_led); led 11982 drivers/net/wireless/intel/ipw2x00/ipw2200.c module_param_named(led, led_support, int, 0444); led 11983 drivers/net/wireless/intel/ipw2x00/ipw2200.c MODULE_PARM_DESC(led, "enable led control on some systems (default 1 on)"); led 515 drivers/net/wireless/intel/iwlegacy/common.c struct il_priv *il = container_of(led_cdev, struct il_priv, led); led 528 drivers/net/wireless/intel/iwlegacy/common.c struct il_priv *il = container_of(led_cdev, struct il_priv, led); led 542 drivers/net/wireless/intel/iwlegacy/common.c il->led.name = led 544 drivers/net/wireless/intel/iwlegacy/common.c il->led.brightness_set = il_led_brightness_set; led 545 drivers/net/wireless/intel/iwlegacy/common.c il->led.blink_set = il_led_blink_set; led 546 drivers/net/wireless/intel/iwlegacy/common.c il->led.max_brightness = 1; led 553 drivers/net/wireless/intel/iwlegacy/common.c il->led.default_trigger = led 560 drivers/net/wireless/intel/iwlegacy/common.c il->led.default_trigger = ieee80211_get_radio_led_name(il->hw); led 564 drivers/net/wireless/intel/iwlegacy/common.c ret = led_classdev_register(&il->pci_dev->dev, &il->led); led 566 drivers/net/wireless/intel/iwlegacy/common.c kfree(il->led.name); led 580 drivers/net/wireless/intel/iwlegacy/common.c led_classdev_unregister(&il->led); led 581 drivers/net/wireless/intel/iwlegacy/common.c kfree(il->led.name); led 1422 drivers/net/wireless/intel/iwlegacy/common.h struct led_classdev led; led 877 drivers/net/wireless/intel/iwlwifi/dvm/dev.h struct led_classdev led; led 139 drivers/net/wireless/intel/iwlwifi/dvm/led.c struct iwl_priv *priv = container_of(led_cdev, struct iwl_priv, led); led 155 drivers/net/wireless/intel/iwlwifi/dvm/led.c struct iwl_priv *priv = container_of(led_cdev, struct iwl_priv, led); led 172 drivers/net/wireless/intel/iwlwifi/dvm/led.c priv->led.name = kasprintf(GFP_KERNEL, "%s-led", led 174 drivers/net/wireless/intel/iwlwifi/dvm/led.c if (!priv->led.name) led 177 drivers/net/wireless/intel/iwlwifi/dvm/led.c priv->led.brightness_set = iwl_led_brightness_set; led 178 drivers/net/wireless/intel/iwlwifi/dvm/led.c priv->led.blink_set = iwl_led_blink_set; led 179 drivers/net/wireless/intel/iwlwifi/dvm/led.c priv->led.max_brightness = 1; led 186 drivers/net/wireless/intel/iwlwifi/dvm/led.c priv->led.default_trigger = led 192 drivers/net/wireless/intel/iwlwifi/dvm/led.c priv->led.default_trigger = led 197 drivers/net/wireless/intel/iwlwifi/dvm/led.c ret = led_classdev_register(priv->trans->dev, &priv->led); led 199 drivers/net/wireless/intel/iwlwifi/dvm/led.c kfree(priv->led.name); led 211 drivers/net/wireless/intel/iwlwifi/dvm/led.c led_classdev_unregister(&priv->led); led 212 drivers/net/wireless/intel/iwlwifi/dvm/led.c kfree(priv->led.name); led 105 drivers/net/wireless/intel/iwlwifi/mvm/led.c struct iwl_mvm *mvm = container_of(led_cdev, struct iwl_mvm, led); led 130 drivers/net/wireless/intel/iwlwifi/mvm/led.c mvm->led.name = kasprintf(GFP_KERNEL, "%s-led", led 132 drivers/net/wireless/intel/iwlwifi/mvm/led.c if (!mvm->led.name) led 135 drivers/net/wireless/intel/iwlwifi/mvm/led.c mvm->led.brightness_set = iwl_led_brightness_set; led 136 drivers/net/wireless/intel/iwlwifi/mvm/led.c mvm->led.max_brightness = 1; led 139 drivers/net/wireless/intel/iwlwifi/mvm/led.c mvm->led.default_trigger = led 142 drivers/net/wireless/intel/iwlwifi/mvm/led.c ret = led_classdev_register(mvm->trans->dev, &mvm->led); led 144 drivers/net/wireless/intel/iwlwifi/mvm/led.c kfree(mvm->led.name); led 165 drivers/net/wireless/intel/iwlwifi/mvm/led.c iwl_mvm_led_set(mvm, mvm->led.brightness > 0); led 173 drivers/net/wireless/intel/iwlwifi/mvm/led.c led_classdev_unregister(&mvm->led); led 174 drivers/net/wireless/intel/iwlwifi/mvm/led.c kfree(mvm->led.name); led 997 drivers/net/wireless/intel/iwlwifi/mvm/mvm.h struct led_classdev led; led 542 drivers/net/wireless/intersil/p54/fwio.c struct p54_led *led; led 544 drivers/net/wireless/intersil/p54/fwio.c skb = p54_alloc_skb(priv, P54_HDR_FLAG_CONTROL_OPSET, sizeof(*led), led 549 drivers/net/wireless/intersil/p54/fwio.c led = skb_put(skb, sizeof(*led)); led 550 drivers/net/wireless/intersil/p54/fwio.c led->flags = cpu_to_le16(0x0003); led 551 drivers/net/wireless/intersil/p54/fwio.c led->mask[0] = led->mask[1] = cpu_to_le16(priv->softled_state); led 552 drivers/net/wireless/intersil/p54/fwio.c led->delay[0] = cpu_to_le16(1); led 553 drivers/net/wireless/intersil/p54/fwio.c led->delay[1] = cpu_to_le16(0); led 67 drivers/net/wireless/intersil/p54/led.c struct p54_led_dev *led = container_of(led_dev, struct p54_led_dev, led 69 drivers/net/wireless/intersil/p54/led.c struct ieee80211_hw *dev = led->hw_dev; led 75 drivers/net/wireless/intersil/p54/led.c if ((brightness) && (led->registered)) { led 76 drivers/net/wireless/intersil/p54/led.c led->toggled++; led 85 drivers/net/wireless/intersil/p54/led.c struct p54_led_dev *led = &priv->leds[led_index]; led 88 drivers/net/wireless/intersil/p54/led.c if (led->registered) led 91 drivers/net/wireless/intersil/p54/led.c snprintf(led->name, sizeof(led->name), "p54-%s::%s", led 93 drivers/net/wireless/intersil/p54/led.c led->hw_dev = priv->hw; led 94 drivers/net/wireless/intersil/p54/led.c led->index = led_index; led 95 drivers/net/wireless/intersil/p54/led.c led->led_dev.name = led->name; led 96 drivers/net/wireless/intersil/p54/led.c led->led_dev.default_trigger = trigger; led 97 drivers/net/wireless/intersil/p54/led.c led->led_dev.brightness_set = p54_led_brightness_set; led 99 drivers/net/wireless/intersil/p54/led.c err = led_classdev_register(wiphy_dev(priv->hw->wiphy), &led->led_dev); led 104 drivers/net/wireless/intersil/p54/led.c led->registered = 1; led 217 drivers/net/wireless/marvell/libertas/types.h u8 led; led 228 drivers/net/wireless/marvell/libertas/types.h uint8_t led; led 205 drivers/net/wireless/ralink/rt2x00/rt2400pci.c struct rt2x00_led *led = led 210 drivers/net/wireless/ralink/rt2x00/rt2400pci.c reg = rt2x00mmio_register_read(led->rt2x00dev, LEDCSR); led 212 drivers/net/wireless/ralink/rt2x00/rt2400pci.c if (led->type == LED_TYPE_RADIO || led->type == LED_TYPE_ASSOC) led 214 drivers/net/wireless/ralink/rt2x00/rt2400pci.c else if (led->type == LED_TYPE_ACTIVITY) led 217 drivers/net/wireless/ralink/rt2x00/rt2400pci.c rt2x00mmio_register_write(led->rt2x00dev, LEDCSR, reg); led 224 drivers/net/wireless/ralink/rt2x00/rt2400pci.c struct rt2x00_led *led = led 228 drivers/net/wireless/ralink/rt2x00/rt2400pci.c reg = rt2x00mmio_register_read(led->rt2x00dev, LEDCSR); led 231 drivers/net/wireless/ralink/rt2x00/rt2400pci.c rt2x00mmio_register_write(led->rt2x00dev, LEDCSR, reg); led 237 drivers/net/wireless/ralink/rt2x00/rt2400pci.c struct rt2x00_led *led, led 240 drivers/net/wireless/ralink/rt2x00/rt2400pci.c led->rt2x00dev = rt2x00dev; led 241 drivers/net/wireless/ralink/rt2x00/rt2400pci.c led->type = type; led 242 drivers/net/wireless/ralink/rt2x00/rt2400pci.c led->led_dev.brightness_set = rt2400pci_brightness_set; led 243 drivers/net/wireless/ralink/rt2x00/rt2400pci.c led->led_dev.blink_set = rt2400pci_blink_set; led 244 drivers/net/wireless/ralink/rt2x00/rt2400pci.c led->flags = LED_INITIALIZED; led 205 drivers/net/wireless/ralink/rt2x00/rt2500pci.c struct rt2x00_led *led = led 210 drivers/net/wireless/ralink/rt2x00/rt2500pci.c reg = rt2x00mmio_register_read(led->rt2x00dev, LEDCSR); led 212 drivers/net/wireless/ralink/rt2x00/rt2500pci.c if (led->type == LED_TYPE_RADIO || led->type == LED_TYPE_ASSOC) led 214 drivers/net/wireless/ralink/rt2x00/rt2500pci.c else if (led->type == LED_TYPE_ACTIVITY) led 217 drivers/net/wireless/ralink/rt2x00/rt2500pci.c rt2x00mmio_register_write(led->rt2x00dev, LEDCSR, reg); led 224 drivers/net/wireless/ralink/rt2x00/rt2500pci.c struct rt2x00_led *led = led 228 drivers/net/wireless/ralink/rt2x00/rt2500pci.c reg = rt2x00mmio_register_read(led->rt2x00dev, LEDCSR); led 231 drivers/net/wireless/ralink/rt2x00/rt2500pci.c rt2x00mmio_register_write(led->rt2x00dev, LEDCSR, reg); led 237 drivers/net/wireless/ralink/rt2x00/rt2500pci.c struct rt2x00_led *led, led 240 drivers/net/wireless/ralink/rt2x00/rt2500pci.c led->rt2x00dev = rt2x00dev; led 241 drivers/net/wireless/ralink/rt2x00/rt2500pci.c led->type = type; led 242 drivers/net/wireless/ralink/rt2x00/rt2500pci.c led->led_dev.brightness_set = rt2500pci_brightness_set; led 243 drivers/net/wireless/ralink/rt2x00/rt2500pci.c led->led_dev.blink_set = rt2500pci_blink_set; led 244 drivers/net/wireless/ralink/rt2x00/rt2500pci.c led->flags = LED_INITIALIZED; led 268 drivers/net/wireless/ralink/rt2x00/rt2500usb.c struct rt2x00_led *led = led 273 drivers/net/wireless/ralink/rt2x00/rt2500usb.c reg = rt2500usb_register_read(led->rt2x00dev, MAC_CSR20); led 275 drivers/net/wireless/ralink/rt2x00/rt2500usb.c if (led->type == LED_TYPE_RADIO || led->type == LED_TYPE_ASSOC) led 277 drivers/net/wireless/ralink/rt2x00/rt2500usb.c else if (led->type == LED_TYPE_ACTIVITY) led 280 drivers/net/wireless/ralink/rt2x00/rt2500usb.c rt2500usb_register_write(led->rt2x00dev, MAC_CSR20, reg); led 287 drivers/net/wireless/ralink/rt2x00/rt2500usb.c struct rt2x00_led *led = led 291 drivers/net/wireless/ralink/rt2x00/rt2500usb.c reg = rt2500usb_register_read(led->rt2x00dev, MAC_CSR21); led 294 drivers/net/wireless/ralink/rt2x00/rt2500usb.c rt2500usb_register_write(led->rt2x00dev, MAC_CSR21, reg); led 300 drivers/net/wireless/ralink/rt2x00/rt2500usb.c struct rt2x00_led *led, led 303 drivers/net/wireless/ralink/rt2x00/rt2500usb.c led->rt2x00dev = rt2x00dev; led 304 drivers/net/wireless/ralink/rt2x00/rt2500usb.c led->type = type; led 305 drivers/net/wireless/ralink/rt2x00/rt2500usb.c led->led_dev.brightness_set = rt2500usb_brightness_set; led 306 drivers/net/wireless/ralink/rt2x00/rt2500usb.c led->led_dev.blink_set = rt2500usb_blink_set; led 307 drivers/net/wireless/ralink/rt2x00/rt2500usb.c led->flags = LED_INITIALIZED; led 1509 drivers/net/wireless/ralink/rt2x00/rt2800lib.c struct rt2x00_led *led = led 1513 drivers/net/wireless/ralink/rt2x00/rt2800lib.c (enabled && led->rt2x00dev->curr_band == NL80211_BAND_2GHZ); led 1515 drivers/net/wireless/ralink/rt2x00/rt2800lib.c rt2x00_get_field16(led->rt2x00dev->led_mcu_reg, led 1518 drivers/net/wireless/ralink/rt2x00/rt2800lib.c rt2x00_get_field16(led->rt2x00dev->led_mcu_reg, led 1523 drivers/net/wireless/ralink/rt2x00/rt2800lib.c if (rt2x00_is_soc(led->rt2x00dev)) { led 1524 drivers/net/wireless/ralink/rt2x00/rt2800lib.c reg = rt2800_register_read(led->rt2x00dev, LED_CFG); led 1530 drivers/net/wireless/ralink/rt2x00/rt2800lib.c if (led->type == LED_TYPE_RADIO) { led 1533 drivers/net/wireless/ralink/rt2x00/rt2800lib.c } else if (led->type == LED_TYPE_ASSOC) { led 1536 drivers/net/wireless/ralink/rt2x00/rt2800lib.c } else if (led->type == LED_TYPE_QUALITY) { led 1541 drivers/net/wireless/ralink/rt2x00/rt2800lib.c rt2800_register_write(led->rt2x00dev, LED_CFG, reg); led 1544 drivers/net/wireless/ralink/rt2x00/rt2800lib.c if (led->type == LED_TYPE_RADIO) { led 1545 drivers/net/wireless/ralink/rt2x00/rt2800lib.c rt2800_mcu_request(led->rt2x00dev, MCU_LED, 0xff, ledmode, led 1547 drivers/net/wireless/ralink/rt2x00/rt2800lib.c } else if (led->type == LED_TYPE_ASSOC) { led 1548 drivers/net/wireless/ralink/rt2x00/rt2800lib.c rt2800_mcu_request(led->rt2x00dev, MCU_LED, 0xff, ledmode, led 1550 drivers/net/wireless/ralink/rt2x00/rt2800lib.c } else if (led->type == LED_TYPE_QUALITY) { led 1559 drivers/net/wireless/ralink/rt2x00/rt2800lib.c rt2800_mcu_request(led->rt2x00dev, MCU_LED_STRENGTH, 0xff, led 1567 drivers/net/wireless/ralink/rt2x00/rt2800lib.c struct rt2x00_led *led, enum led_type type) led 1569 drivers/net/wireless/ralink/rt2x00/rt2800lib.c led->rt2x00dev = rt2x00dev; led 1570 drivers/net/wireless/ralink/rt2x00/rt2800lib.c led->type = type; led 1571 drivers/net/wireless/ralink/rt2x00/rt2800lib.c led->led_dev.brightness_set = rt2800_brightness_set; led 1572 drivers/net/wireless/ralink/rt2x00/rt2800lib.c led->flags = LED_INITIALIZED; led 21 drivers/net/wireless/ralink/rt2x00/rt2x00leds.c struct rt2x00_led *led = &rt2x00dev->led_qual; led 24 drivers/net/wireless/ralink/rt2x00/rt2x00leds.c if ((led->type != LED_TYPE_QUALITY) || !(led->flags & LED_REGISTERED)) led 56 drivers/net/wireless/ralink/rt2x00/rt2x00leds.c if (brightness != led->led_dev.brightness) { led 57 drivers/net/wireless/ralink/rt2x00/rt2x00leds.c led->led_dev.brightness_set(&led->led_dev, brightness); led 58 drivers/net/wireless/ralink/rt2x00/rt2x00leds.c led->led_dev.brightness = brightness; led 62 drivers/net/wireless/ralink/rt2x00/rt2x00leds.c static void rt2x00led_led_simple(struct rt2x00_led *led, bool enabled) led 66 drivers/net/wireless/ralink/rt2x00/rt2x00leds.c if (!(led->flags & LED_REGISTERED)) led 69 drivers/net/wireless/ralink/rt2x00/rt2x00leds.c led->led_dev.brightness_set(&led->led_dev, brightness); led 70 drivers/net/wireless/ralink/rt2x00/rt2x00leds.c led->led_dev.brightness = brightness; led 92 drivers/net/wireless/ralink/rt2x00/rt2x00leds.c struct rt2x00_led *led, led 98 drivers/net/wireless/ralink/rt2x00/rt2x00leds.c led->led_dev.name = name; led 99 drivers/net/wireless/ralink/rt2x00/rt2x00leds.c led->led_dev.brightness = LED_OFF; led 101 drivers/net/wireless/ralink/rt2x00/rt2x00leds.c retval = led_classdev_register(device, &led->led_dev); led 107 drivers/net/wireless/ralink/rt2x00/rt2x00leds.c led->flags |= LED_REGISTERED; led 171 drivers/net/wireless/ralink/rt2x00/rt2x00leds.c static void rt2x00leds_unregister_led(struct rt2x00_led *led) led 173 drivers/net/wireless/ralink/rt2x00/rt2x00leds.c led_classdev_unregister(&led->led_dev); led 181 drivers/net/wireless/ralink/rt2x00/rt2x00leds.c if (!(led->led_dev.flags & LED_SUSPENDED)) led 182 drivers/net/wireless/ralink/rt2x00/rt2x00leds.c led->led_dev.brightness_set(&led->led_dev, LED_OFF); led 184 drivers/net/wireless/ralink/rt2x00/rt2x00leds.c led->flags &= ~LED_REGISTERED; led 197 drivers/net/wireless/ralink/rt2x00/rt2x00leds.c static inline void rt2x00leds_suspend_led(struct rt2x00_led *led) led 199 drivers/net/wireless/ralink/rt2x00/rt2x00leds.c led_classdev_suspend(&led->led_dev); led 202 drivers/net/wireless/ralink/rt2x00/rt2x00leds.c led->led_dev.brightness_set(&led->led_dev, LED_OFF); led 203 drivers/net/wireless/ralink/rt2x00/rt2x00leds.c led->led_dev.brightness = LED_OFF; led 216 drivers/net/wireless/ralink/rt2x00/rt2x00leds.c static inline void rt2x00leds_resume_led(struct rt2x00_led *led) led 218 drivers/net/wireless/ralink/rt2x00/rt2x00leds.c led_classdev_resume(&led->led_dev); led 221 drivers/net/wireless/ralink/rt2x00/rt2x00leds.c led->led_dev.brightness_set(&led->led_dev, LED_OFF); led 222 drivers/net/wireless/ralink/rt2x00/rt2x00leds.c led->led_dev.brightness = LED_OFF; led 243 drivers/net/wireless/ralink/rt2x00/rt61pci.c struct rt2x00_led *led = led 247 drivers/net/wireless/ralink/rt2x00/rt61pci.c (enabled && led->rt2x00dev->curr_band == NL80211_BAND_5GHZ); led 249 drivers/net/wireless/ralink/rt2x00/rt61pci.c (enabled && led->rt2x00dev->curr_band == NL80211_BAND_2GHZ); led 251 drivers/net/wireless/ralink/rt2x00/rt61pci.c if (led->type == LED_TYPE_RADIO) { led 252 drivers/net/wireless/ralink/rt2x00/rt61pci.c rt2x00_set_field16(&led->rt2x00dev->led_mcu_reg, led 255 drivers/net/wireless/ralink/rt2x00/rt61pci.c rt61pci_mcu_request(led->rt2x00dev, MCU_LED, 0xff, led 256 drivers/net/wireless/ralink/rt2x00/rt61pci.c (led->rt2x00dev->led_mcu_reg & 0xff), led 257 drivers/net/wireless/ralink/rt2x00/rt61pci.c ((led->rt2x00dev->led_mcu_reg >> 8))); led 258 drivers/net/wireless/ralink/rt2x00/rt61pci.c } else if (led->type == LED_TYPE_ASSOC) { led 259 drivers/net/wireless/ralink/rt2x00/rt61pci.c rt2x00_set_field16(&led->rt2x00dev->led_mcu_reg, led 261 drivers/net/wireless/ralink/rt2x00/rt61pci.c rt2x00_set_field16(&led->rt2x00dev->led_mcu_reg, led 264 drivers/net/wireless/ralink/rt2x00/rt61pci.c rt61pci_mcu_request(led->rt2x00dev, MCU_LED, 0xff, led 265 drivers/net/wireless/ralink/rt2x00/rt61pci.c (led->rt2x00dev->led_mcu_reg & 0xff), led 266 drivers/net/wireless/ralink/rt2x00/rt61pci.c ((led->rt2x00dev->led_mcu_reg >> 8))); led 267 drivers/net/wireless/ralink/rt2x00/rt61pci.c } else if (led->type == LED_TYPE_QUALITY) { led 273 drivers/net/wireless/ralink/rt2x00/rt61pci.c rt61pci_mcu_request(led->rt2x00dev, MCU_LED_STRENGTH, 0xff, led 282 drivers/net/wireless/ralink/rt2x00/rt61pci.c struct rt2x00_led *led = led 286 drivers/net/wireless/ralink/rt2x00/rt61pci.c reg = rt2x00mmio_register_read(led->rt2x00dev, MAC_CSR14); led 289 drivers/net/wireless/ralink/rt2x00/rt61pci.c rt2x00mmio_register_write(led->rt2x00dev, MAC_CSR14, reg); led 295 drivers/net/wireless/ralink/rt2x00/rt61pci.c struct rt2x00_led *led, led 298 drivers/net/wireless/ralink/rt2x00/rt61pci.c led->rt2x00dev = rt2x00dev; led 299 drivers/net/wireless/ralink/rt2x00/rt61pci.c led->type = type; led 300 drivers/net/wireless/ralink/rt2x00/rt61pci.c led->led_dev.brightness_set = rt61pci_brightness_set; led 301 drivers/net/wireless/ralink/rt2x00/rt61pci.c led->led_dev.blink_set = rt61pci_blink_set; led 302 drivers/net/wireless/ralink/rt2x00/rt61pci.c led->flags = LED_INITIALIZED; led 188 drivers/net/wireless/ralink/rt2x00/rt73usb.c struct rt2x00_led *led = led 192 drivers/net/wireless/ralink/rt2x00/rt73usb.c (enabled && led->rt2x00dev->curr_band == NL80211_BAND_5GHZ); led 194 drivers/net/wireless/ralink/rt2x00/rt73usb.c (enabled && led->rt2x00dev->curr_band == NL80211_BAND_2GHZ); led 196 drivers/net/wireless/ralink/rt2x00/rt73usb.c if (led->type == LED_TYPE_RADIO) { led 197 drivers/net/wireless/ralink/rt2x00/rt73usb.c rt2x00_set_field16(&led->rt2x00dev->led_mcu_reg, led 200 drivers/net/wireless/ralink/rt2x00/rt73usb.c rt2x00usb_vendor_request_sw(led->rt2x00dev, USB_LED_CONTROL, led 201 drivers/net/wireless/ralink/rt2x00/rt73usb.c 0, led->rt2x00dev->led_mcu_reg, led 203 drivers/net/wireless/ralink/rt2x00/rt73usb.c } else if (led->type == LED_TYPE_ASSOC) { led 204 drivers/net/wireless/ralink/rt2x00/rt73usb.c rt2x00_set_field16(&led->rt2x00dev->led_mcu_reg, led 206 drivers/net/wireless/ralink/rt2x00/rt73usb.c rt2x00_set_field16(&led->rt2x00dev->led_mcu_reg, led 209 drivers/net/wireless/ralink/rt2x00/rt73usb.c rt2x00usb_vendor_request_sw(led->rt2x00dev, USB_LED_CONTROL, led 210 drivers/net/wireless/ralink/rt2x00/rt73usb.c 0, led->rt2x00dev->led_mcu_reg, led 212 drivers/net/wireless/ralink/rt2x00/rt73usb.c } else if (led->type == LED_TYPE_QUALITY) { led 218 drivers/net/wireless/ralink/rt2x00/rt73usb.c rt2x00usb_vendor_request_sw(led->rt2x00dev, USB_LED_CONTROL, led 220 drivers/net/wireless/ralink/rt2x00/rt73usb.c led->rt2x00dev->led_mcu_reg, led 229 drivers/net/wireless/ralink/rt2x00/rt73usb.c struct rt2x00_led *led = led 233 drivers/net/wireless/ralink/rt2x00/rt73usb.c reg = rt2x00usb_register_read(led->rt2x00dev, MAC_CSR14); led 236 drivers/net/wireless/ralink/rt2x00/rt73usb.c rt2x00usb_register_write(led->rt2x00dev, MAC_CSR14, reg); led 242 drivers/net/wireless/ralink/rt2x00/rt73usb.c struct rt2x00_led *led, led 245 drivers/net/wireless/ralink/rt2x00/rt73usb.c led->rt2x00dev = rt2x00dev; led 246 drivers/net/wireless/ralink/rt2x00/rt73usb.c led->type = type; led 247 drivers/net/wireless/ralink/rt2x00/rt73usb.c led->led_dev.brightness_set = rt73usb_brightness_set; led 248 drivers/net/wireless/ralink/rt2x00/rt73usb.c led->led_dev.blink_set = rt73usb_blink_set; led 249 drivers/net/wireless/ralink/rt2x00/rt73usb.c led->flags = LED_INITIALIZED; led 30 drivers/net/wireless/realtek/rtl818x/rtl8187/leds.c struct rtl8187_led *led = &priv->led_tx; led 37 drivers/net/wireless/realtek/rtl818x/rtl8187/leds.c if (!led->dev) led 40 drivers/net/wireless/realtek/rtl818x/rtl8187/leds.c switch (led->ledpin) { led 68 drivers/net/wireless/realtek/rtl818x/rtl8187/leds.c struct rtl8187_led *led = &priv->led_tx; led 75 drivers/net/wireless/realtek/rtl818x/rtl8187/leds.c if (!led->dev) led 78 drivers/net/wireless/realtek/rtl818x/rtl8187/leds.c switch (led->ledpin) { led 102 drivers/net/wireless/realtek/rtl818x/rtl8187/leds.c struct rtl8187_led *led = container_of(led_dev, struct rtl8187_led, led 104 drivers/net/wireless/realtek/rtl818x/rtl8187/leds.c struct ieee80211_hw *hw = led->dev; led 111 drivers/net/wireless/realtek/rtl818x/rtl8187/leds.c if (led->is_radio) { led 132 drivers/net/wireless/realtek/rtl818x/rtl8187/leds.c struct rtl8187_led *led, const char *name, led 139 drivers/net/wireless/realtek/rtl818x/rtl8187/leds.c if (led->dev) led 143 drivers/net/wireless/realtek/rtl818x/rtl8187/leds.c led->dev = dev; led 144 drivers/net/wireless/realtek/rtl818x/rtl8187/leds.c led->ledpin = ledpin; led 145 drivers/net/wireless/realtek/rtl818x/rtl8187/leds.c led->is_radio = is_radio; led 146 drivers/net/wireless/realtek/rtl818x/rtl8187/leds.c strlcpy(led->name, name, sizeof(led->name)); led 148 drivers/net/wireless/realtek/rtl818x/rtl8187/leds.c led->led_dev.name = led->name; led 149 drivers/net/wireless/realtek/rtl818x/rtl8187/leds.c led->led_dev.default_trigger = default_trigger; led 150 drivers/net/wireless/realtek/rtl818x/rtl8187/leds.c led->led_dev.brightness_set = rtl8187_led_brightness_set; led 152 drivers/net/wireless/realtek/rtl818x/rtl8187/leds.c err = led_classdev_register(&priv->udev->dev, &led->led_dev); led 155 drivers/net/wireless/realtek/rtl818x/rtl8187/leds.c led->dev = NULL; led 161 drivers/net/wireless/realtek/rtl818x/rtl8187/leds.c static void rtl8187_unregister_led(struct rtl8187_led *led) led 163 drivers/net/wireless/realtek/rtl818x/rtl8187/leds.c struct ieee80211_hw *hw = led->dev; led 166 drivers/net/wireless/realtek/rtl818x/rtl8187/leds.c led_classdev_unregister(&led->led_dev); led 168 drivers/net/wireless/realtek/rtl818x/rtl8187/leds.c led->dev = NULL; led 312 drivers/pinctrl/pinctrl-palmas.c FUNCTION_GROUP(led, LED), \ led 248 drivers/platform/chrome/cros_ec_lightbar.c param->set_rgb.led = val[0]; led 218 drivers/platform/x86/asus-laptop.c struct led_classdev led; led 557 drivers/platform/x86/asus-laptop.c struct asus_led *led = container_of(led_cdev, struct asus_led, led); led 558 drivers/platform/x86/asus-laptop.c struct asus_laptop *asus = led->asus; led 560 drivers/platform/x86/asus-laptop.c led->wk = !!value; led 561 drivers/platform/x86/asus-laptop.c queue_work(asus->led_workqueue, &led->work); led 566 drivers/platform/x86/asus-laptop.c struct asus_led *led = container_of(work, struct asus_led, work); led 567 drivers/platform/x86/asus-laptop.c struct asus_laptop *asus = led->asus; led 569 drivers/platform/x86/asus-laptop.c asus_led_set(asus, led->method, led->wk); led 618 drivers/platform/x86/asus-laptop.c struct asus_led *led = container_of(led_cdev, struct asus_led, led); led 619 drivers/platform/x86/asus-laptop.c struct asus_laptop *asus = led->asus; led 621 drivers/platform/x86/asus-laptop.c led->wk = value; led 622 drivers/platform/x86/asus-laptop.c queue_work(asus->led_workqueue, &led->work); led 627 drivers/platform/x86/asus-laptop.c struct asus_led *led = container_of(work, struct asus_led, work); led 628 drivers/platform/x86/asus-laptop.c struct asus_laptop *asus = led->asus; led 630 drivers/platform/x86/asus-laptop.c asus_kled_set(asus, led->wk); led 635 drivers/platform/x86/asus-laptop.c struct asus_led *led = container_of(led_cdev, struct asus_led, led); led 636 drivers/platform/x86/asus-laptop.c struct asus_laptop *asus = led->asus; led 643 drivers/platform/x86/asus-laptop.c if (!IS_ERR_OR_NULL(asus->wled.led.dev)) led 644 drivers/platform/x86/asus-laptop.c led_classdev_unregister(&asus->wled.led); led 645 drivers/platform/x86/asus-laptop.c if (!IS_ERR_OR_NULL(asus->bled.led.dev)) led 646 drivers/platform/x86/asus-laptop.c led_classdev_unregister(&asus->bled.led); led 647 drivers/platform/x86/asus-laptop.c if (!IS_ERR_OR_NULL(asus->mled.led.dev)) led 648 drivers/platform/x86/asus-laptop.c led_classdev_unregister(&asus->mled.led); led 649 drivers/platform/x86/asus-laptop.c if (!IS_ERR_OR_NULL(asus->tled.led.dev)) led 650 drivers/platform/x86/asus-laptop.c led_classdev_unregister(&asus->tled.led); led 651 drivers/platform/x86/asus-laptop.c if (!IS_ERR_OR_NULL(asus->pled.led.dev)) led 652 drivers/platform/x86/asus-laptop.c led_classdev_unregister(&asus->pled.led); led 653 drivers/platform/x86/asus-laptop.c if (!IS_ERR_OR_NULL(asus->rled.led.dev)) led 654 drivers/platform/x86/asus-laptop.c led_classdev_unregister(&asus->rled.led); led 655 drivers/platform/x86/asus-laptop.c if (!IS_ERR_OR_NULL(asus->gled.led.dev)) led 656 drivers/platform/x86/asus-laptop.c led_classdev_unregister(&asus->gled.led); led 657 drivers/platform/x86/asus-laptop.c if (!IS_ERR_OR_NULL(asus->kled.led.dev)) led 658 drivers/platform/x86/asus-laptop.c led_classdev_unregister(&asus->kled.led); led 667 drivers/platform/x86/asus-laptop.c struct asus_led *led, led 670 drivers/platform/x86/asus-laptop.c struct led_classdev *led_cdev = &led->led; led 675 drivers/platform/x86/asus-laptop.c led->asus = asus; led 676 drivers/platform/x86/asus-laptop.c led->method = method; led 678 drivers/platform/x86/asus-laptop.c INIT_WORK(&led->work, asus_led_cdev_update); led 734 drivers/platform/x86/asus-laptop.c struct asus_led *led = &asus->kled; led 735 drivers/platform/x86/asus-laptop.c struct led_classdev *cdev = &led->led; led 737 drivers/platform/x86/asus-laptop.c led->asus = asus; led 739 drivers/platform/x86/asus-laptop.c INIT_WORK(&led->work, asus_kled_cdev_update); led 29 drivers/platform/x86/asus-wireless.c struct led_classdev led; led 77 drivers/platform/x86/asus-wireless.c static enum led_brightness led_state_get(struct led_classdev *led) led 83 drivers/platform/x86/asus-wireless.c data = container_of(led, struct asus_wireless_data, led); led 101 drivers/platform/x86/asus-wireless.c static void led_state_set(struct led_classdev *led, enum led_brightness value) led 105 drivers/platform/x86/asus-wireless.c data = container_of(led, struct asus_wireless_data, led); led 165 drivers/platform/x86/asus-wireless.c data->led.name = "asus-wireless::airplane"; led 166 drivers/platform/x86/asus-wireless.c data->led.brightness_set = led_state_set; led 167 drivers/platform/x86/asus-wireless.c data->led.brightness_get = led_state_get; led 168 drivers/platform/x86/asus-wireless.c data->led.flags = LED_CORE_SUSPENDRESUME; led 169 drivers/platform/x86/asus-wireless.c data->led.max_brightness = 1; led 170 drivers/platform/x86/asus-wireless.c data->led.default_trigger = "rfkill-none"; led 171 drivers/platform/x86/asus-wireless.c err = devm_led_classdev_register(&adev->dev, &data->led); led 183 drivers/platform/x86/asus-wireless.c devm_led_classdev_unregister(&adev->dev, &data->led); led 694 drivers/platform/x86/fujitsu-laptop.c struct led_classdev *led; led 699 drivers/platform/x86/fujitsu-laptop.c led = devm_kzalloc(&device->dev, sizeof(*led), GFP_KERNEL); led 700 drivers/platform/x86/fujitsu-laptop.c if (!led) led 703 drivers/platform/x86/fujitsu-laptop.c led->name = "fujitsu::logolamp"; led 704 drivers/platform/x86/fujitsu-laptop.c led->brightness_set_blocking = logolamp_set; led 705 drivers/platform/x86/fujitsu-laptop.c led->brightness_get = logolamp_get; led 706 drivers/platform/x86/fujitsu-laptop.c ret = devm_led_classdev_register(&device->dev, led); led 714 drivers/platform/x86/fujitsu-laptop.c led = devm_kzalloc(&device->dev, sizeof(*led), GFP_KERNEL); led 715 drivers/platform/x86/fujitsu-laptop.c if (!led) led 718 drivers/platform/x86/fujitsu-laptop.c led->name = "fujitsu::kblamps"; led 719 drivers/platform/x86/fujitsu-laptop.c led->brightness_set_blocking = kblamps_set; led 720 drivers/platform/x86/fujitsu-laptop.c led->brightness_get = kblamps_get; led 721 drivers/platform/x86/fujitsu-laptop.c ret = devm_led_classdev_register(&device->dev, led); led 736 drivers/platform/x86/fujitsu-laptop.c led = devm_kzalloc(&device->dev, sizeof(*led), GFP_KERNEL); led 737 drivers/platform/x86/fujitsu-laptop.c if (!led) led 740 drivers/platform/x86/fujitsu-laptop.c led->name = "fujitsu::radio_led"; led 741 drivers/platform/x86/fujitsu-laptop.c led->brightness_set_blocking = radio_led_set; led 742 drivers/platform/x86/fujitsu-laptop.c led->brightness_get = radio_led_get; led 743 drivers/platform/x86/fujitsu-laptop.c led->default_trigger = "rfkill-any"; led 744 drivers/platform/x86/fujitsu-laptop.c ret = devm_led_classdev_register(&device->dev, led); led 757 drivers/platform/x86/fujitsu-laptop.c led = devm_kzalloc(&device->dev, sizeof(*led), GFP_KERNEL); led 758 drivers/platform/x86/fujitsu-laptop.c if (!led) led 761 drivers/platform/x86/fujitsu-laptop.c led->name = "fujitsu::eco_led"; led 762 drivers/platform/x86/fujitsu-laptop.c led->brightness_set_blocking = eco_led_set; led 763 drivers/platform/x86/fujitsu-laptop.c led->brightness_get = eco_led_get; led 764 drivers/platform/x86/fujitsu-laptop.c ret = devm_led_classdev_register(&device->dev, led); led 42 drivers/platform/x86/hp_accel.c unsigned int led; /* For driver */ led 376 drivers/platform/x86/thinkpad_acpi.c int led; led 5810 drivers/platform/x86/thinkpad_acpi.c static inline bool tpacpi_is_led_restricted(const unsigned int led) led 5815 drivers/platform/x86/thinkpad_acpi.c return (1U & (TPACPI_SAFE_LEDS >> led)) == 0; led 5819 drivers/platform/x86/thinkpad_acpi.c static int led_get_status(const unsigned int led) led 5827 drivers/platform/x86/thinkpad_acpi.c &status, "GLED", "dd", 1 << led)) led 5834 drivers/platform/x86/thinkpad_acpi.c tpacpi_led_state_cache[led] = led_s; led 5843 drivers/platform/x86/thinkpad_acpi.c static int led_set_status(const unsigned int led, led 5855 drivers/platform/x86/thinkpad_acpi.c if (unlikely(led > 7)) led 5857 drivers/platform/x86/thinkpad_acpi.c if (unlikely(tpacpi_is_led_restricted(led))) led 5860 drivers/platform/x86/thinkpad_acpi.c (1 << led), led_sled_arg1[ledstatus])) led 5865 drivers/platform/x86/thinkpad_acpi.c if (unlikely(led > 7)) led 5867 drivers/platform/x86/thinkpad_acpi.c if (unlikely(tpacpi_is_led_restricted(led))) led 5869 drivers/platform/x86/thinkpad_acpi.c rc = ec_write(TPACPI_LED_EC_HLMS, (1 << led)); led 5872 drivers/platform/x86/thinkpad_acpi.c (ledstatus == TPACPI_LED_BLINK) << led); led 5875 drivers/platform/x86/thinkpad_acpi.c (ledstatus != TPACPI_LED_OFF) << led); led 5879 drivers/platform/x86/thinkpad_acpi.c if (unlikely(led >= TPACPI_LED_NUMLEDS)) led 5881 drivers/platform/x86/thinkpad_acpi.c if (unlikely(tpacpi_is_led_restricted(led))) led 5884 drivers/platform/x86/thinkpad_acpi.c led, led_led_arg1[ledstatus])) led 5892 drivers/platform/x86/thinkpad_acpi.c tpacpi_led_state_cache[led] = ledstatus; led 5906 drivers/platform/x86/thinkpad_acpi.c else if (tpacpi_led_state_cache[data->led] != TPACPI_LED_BLINK) led 5911 drivers/platform/x86/thinkpad_acpi.c return led_set_status(data->led, new_state); led 5928 drivers/platform/x86/thinkpad_acpi.c return led_set_status(data->led, TPACPI_LED_BLINK); led 5938 drivers/platform/x86/thinkpad_acpi.c rc = led_get_status(data->led); led 5960 drivers/platform/x86/thinkpad_acpi.c static int __init tpacpi_init_led(unsigned int led) led 5964 drivers/platform/x86/thinkpad_acpi.c tpacpi_leds[led].led = led; led 5967 drivers/platform/x86/thinkpad_acpi.c if (!tpacpi_led_names[led]) led 5970 drivers/platform/x86/thinkpad_acpi.c tpacpi_leds[led].led_classdev.brightness_set_blocking = &led_sysfs_set; led 5971 drivers/platform/x86/thinkpad_acpi.c tpacpi_leds[led].led_classdev.blink_set = &led_sysfs_blink_set; led 5973 drivers/platform/x86/thinkpad_acpi.c tpacpi_leds[led].led_classdev.brightness_get = led 5976 drivers/platform/x86/thinkpad_acpi.c tpacpi_leds[led].led_classdev.name = tpacpi_led_names[led]; led 5979 drivers/platform/x86/thinkpad_acpi.c &tpacpi_leds[led].led_classdev); led 5981 drivers/platform/x86/thinkpad_acpi.c tpacpi_leds[led].led_classdev.name = NULL; led 6091 drivers/platform/x86/thinkpad_acpi.c tpacpi_leds[i].led = -1; led 6141 drivers/platform/x86/thinkpad_acpi.c int led, rc; led 6148 drivers/platform/x86/thinkpad_acpi.c if (sscanf(cmd, "%d", &led) != 1) led 6151 drivers/platform/x86/thinkpad_acpi.c if (led < 0 || led > (TPACPI_LED_NUMLEDS - 1) || led 6152 drivers/platform/x86/thinkpad_acpi.c tpacpi_leds[led].led < 0) led 6165 drivers/platform/x86/thinkpad_acpi.c rc = led_set_status(led, s); led 10388 drivers/platform/x86/thinkpad_acpi.c TPACPI_PARAM(led); led 31 drivers/platform/x86/topstar-laptop.c struct led_classdev led; led 38 drivers/platform/x86/topstar-laptop.c static enum led_brightness topstar_led_get(struct led_classdev *led) led 40 drivers/platform/x86/topstar-laptop.c return led->brightness; led 43 drivers/platform/x86/topstar-laptop.c static int topstar_led_set(struct led_classdev *led, led 46 drivers/platform/x86/topstar-laptop.c struct topstar_laptop *topstar = container_of(led, led 47 drivers/platform/x86/topstar-laptop.c struct topstar_laptop, led); led 87 drivers/platform/x86/topstar-laptop.c topstar->led = (struct led_classdev) { led 94 drivers/platform/x86/topstar-laptop.c return led_classdev_register(&topstar->platform->dev, &topstar->led); led 99 drivers/platform/x86/topstar-laptop.c led_classdev_unregister(&topstar->led); led 37 drivers/pwm/pwm-twl-led.c #define TWL4030_LED_TOGGLE(led, x) ((x) << (led)) led 1235 drivers/regulator/wm8350-regulator.c struct wm8350_led *led; led 1239 drivers/regulator/wm8350-regulator.c if (lednum >= ARRAY_SIZE(wm8350->pmic.led) || lednum < 0) { led 1244 drivers/regulator/wm8350-regulator.c led = &wm8350->pmic.led[lednum]; led 1246 drivers/regulator/wm8350-regulator.c if (led->pdev) { led 1257 drivers/regulator/wm8350-regulator.c led->isink_consumer.dev_name = dev_name(&pdev->dev); led 1258 drivers/regulator/wm8350-regulator.c led->isink_consumer.supply = "led_isink"; led 1259 drivers/regulator/wm8350-regulator.c led->isink_init.num_consumer_supplies = 1; led 1260 drivers/regulator/wm8350-regulator.c led->isink_init.consumer_supplies = &led->isink_consumer; led 1261 drivers/regulator/wm8350-regulator.c led->isink_init.constraints.min_uA = 0; led 1262 drivers/regulator/wm8350-regulator.c led->isink_init.constraints.max_uA = pdata->max_uA; led 1263 drivers/regulator/wm8350-regulator.c led->isink_init.constraints.valid_ops_mask led 1265 drivers/regulator/wm8350-regulator.c led->isink_init.constraints.valid_modes_mask = REGULATOR_MODE_NORMAL; led 1266 drivers/regulator/wm8350-regulator.c ret = wm8350_register_regulator(wm8350, isink, &led->isink_init); led 1272 drivers/regulator/wm8350-regulator.c led->dcdc_consumer.dev_name = dev_name(&pdev->dev); led 1273 drivers/regulator/wm8350-regulator.c led->dcdc_consumer.supply = "led_vcc"; led 1274 drivers/regulator/wm8350-regulator.c led->dcdc_init.num_consumer_supplies = 1; led 1275 drivers/regulator/wm8350-regulator.c led->dcdc_init.consumer_supplies = &led->dcdc_consumer; led 1276 drivers/regulator/wm8350-regulator.c led->dcdc_init.constraints.valid_modes_mask = REGULATOR_MODE_NORMAL; led 1277 drivers/regulator/wm8350-regulator.c led->dcdc_init.constraints.valid_ops_mask = REGULATOR_CHANGE_STATUS; led 1278 drivers/regulator/wm8350-regulator.c ret = wm8350_register_regulator(wm8350, dcdc, &led->dcdc_init); led 1303 drivers/regulator/wm8350-regulator.c led->pdev = pdev; led 1230 drivers/scsi/bfa/bfa_defs.h u8 led; /* bitmap of LEDs to be tested */ led 4984 drivers/scsi/bfa/bfa_ioc.c msg->led = ledtest->led; led 1070 drivers/scsi/bfa/bfi.h u8 led; /* bitmap of LEDs to be tested */ led 50 drivers/scsi/sym53c8xx_2/sym_glue.c module_param_named(led, sym_driver_setup.scsi_led, byte, 0); led 64 drivers/scsi/sym53c8xx_2/sym_glue.c MODULE_PARM_DESC(led, "Set to 1 to enable LED support"); led 127 drivers/staging/fbtft/fbtft-core.c &par->gpio.led[i]); led 152 drivers/staging/fbtft/fbtft-core.c gpiod_set_value(par->gpio.led[0], polarity); led 154 drivers/staging/fbtft/fbtft-core.c gpiod_set_value(par->gpio.led[0], !polarity); led 184 drivers/staging/fbtft/fbtft-core.c if (!par->gpio.led[0]) { led 193 drivers/staging/fbtft/fbtft-core.c if (!gpiod_get_value(par->gpio.led[0])) led 216 drivers/staging/fbtft/fbtft.h struct gpio_desc *led[16]; led 31 drivers/staging/greybus/light.c struct led_classdev *led; led 152 drivers/staging/greybus/light.c (channel->intensity_uA.step * channel->led->brightness); led 386 drivers/staging/greybus/light.c req.brightness = (u8)channel->led->brightness; led 393 drivers/staging/greybus/light.c if (channel->led->brightness) led 437 drivers/staging/greybus/light.c channel->led->brightness = value; led 447 drivers/staging/greybus/light.c return channel->led->brightness; led 752 drivers/staging/greybus/light.c channel->led->max_brightness = channel_torch->led->max_brightness; led 755 drivers/staging/greybus/light.c name = kasprintf(GFP_KERNEL, "%s_%s", channel->led->name, led 759 drivers/staging/greybus/light.c kfree(channel->led->name); led 760 drivers/staging/greybus/light.c channel->led->name = name; led 762 drivers/staging/greybus/light.c channel_torch->led = channel->led; led 813 drivers/staging/greybus/light.c channel->led = NULL; led 855 drivers/staging/greybus/light.c channel->led->max_brightness = (fset->max - fset->min) / fset->step; led 895 drivers/staging/greybus/light.c channel->led = NULL; led 927 drivers/staging/greybus/light.c channel->led = NULL; led 973 drivers/staging/greybus/light.c channel->led = cdev; led 32 drivers/staging/nvec/nvec_paz00.c struct nvec_led *led = to_nvec_led(led_cdev); led 37 drivers/staging/nvec/nvec_paz00.c nvec_write_async(led->nvec, buf, sizeof(buf)); led 39 drivers/staging/nvec/nvec_paz00.c led->cdev.brightness = value; led 45 drivers/staging/nvec/nvec_paz00.c struct nvec_led *led; led 48 drivers/staging/nvec/nvec_paz00.c led = devm_kzalloc(&pdev->dev, sizeof(*led), GFP_KERNEL); led 49 drivers/staging/nvec/nvec_paz00.c if (!led) led 52 drivers/staging/nvec/nvec_paz00.c led->cdev.max_brightness = NVEC_LED_MAX; led 54 drivers/staging/nvec/nvec_paz00.c led->cdev.brightness_set = nvec_led_brightness_set; led 55 drivers/staging/nvec/nvec_paz00.c led->cdev.name = "paz00-led"; led 56 drivers/staging/nvec/nvec_paz00.c led->cdev.flags |= LED_CORE_SUSPENDRESUME; led 57 drivers/staging/nvec/nvec_paz00.c led->nvec = nvec; led 59 drivers/staging/nvec/nvec_paz00.c platform_set_drvdata(pdev, led); led 61 drivers/staging/nvec/nvec_paz00.c ret = devm_led_classdev_register(&pdev->dev, &led->cdev); led 66 drivers/staging/nvec/nvec_paz00.c led->cdev.brightness = 0; led 546 drivers/staging/unisys/visorinput/visorinput.c int led; led 550 drivers/staging/unisys/visorinput/visorinput.c led = LED_CAPSL; led 553 drivers/staging/unisys/visorinput/visorinput.c led = LED_SCROLLL; led 556 drivers/staging/unisys/visorinput/visorinput.c led = LED_NUML; led 559 drivers/staging/unisys/visorinput/visorinput.c led = -1; led 562 drivers/staging/unisys/visorinput/visorinput.c if (test_bit(led, visorinput_dev->led) != desired_state) { led 567 drivers/staging/unisys/visorinput/visorinput.c __change_bit(led, visorinput_dev->led); led 226 drivers/staging/vt6656/mac.c int vnt_mac_set_led(struct vnt_private *priv, u8 state, u8 led) led 230 drivers/staging/vt6656/mac.c data[0] = led; led 372 drivers/staging/vt6656/mac.h int vnt_mac_set_led(struct vnt_private *privpriv, u8 state, u8 led); led 1118 drivers/tty/vt/keyboard.c void setledstate(struct kbd_struct *kb, unsigned int led) led 1122 drivers/tty/vt/keyboard.c if (!(led & ~7)) { led 1123 drivers/tty/vt/keyboard.c ledioctl = led; led 108 drivers/video/backlight/adp8860_bl.c struct adp8860_led *led; led 182 drivers/video/backlight/adp8860_bl.c struct adp8860_led *led = container_of(work, struct adp8860_led, work); led 184 drivers/video/backlight/adp8860_bl.c adp8860_write(led->client, ADP8860_ISC1 - led->id + 1, led 185 drivers/video/backlight/adp8860_bl.c led->new_brightness >> 1); led 191 drivers/video/backlight/adp8860_bl.c struct adp8860_led *led; led 193 drivers/video/backlight/adp8860_bl.c led = container_of(led_cdev, struct adp8860_led, cdev); led 194 drivers/video/backlight/adp8860_bl.c led->new_brightness = value; led 195 drivers/video/backlight/adp8860_bl.c schedule_work(&led->work); led 198 drivers/video/backlight/adp8860_bl.c static int adp8860_led_setup(struct adp8860_led *led) led 200 drivers/video/backlight/adp8860_bl.c struct i2c_client *client = led->client; led 203 drivers/video/backlight/adp8860_bl.c ret = adp8860_write(client, ADP8860_ISC1 - led->id + 1, 0); led 204 drivers/video/backlight/adp8860_bl.c ret |= adp8860_set_bits(client, ADP8860_ISCC, 1 << (led->id - 1)); led 206 drivers/video/backlight/adp8860_bl.c if (led->id > 4) led 208 drivers/video/backlight/adp8860_bl.c (led->flags & 0x3) << ((led->id - 5) * 2)); led 211 drivers/video/backlight/adp8860_bl.c (led->flags & 0x3) << ((led->id - 1) * 2)); led 221 drivers/video/backlight/adp8860_bl.c struct adp8860_led *led, *led_dat; led 225 drivers/video/backlight/adp8860_bl.c led = devm_kcalloc(&client->dev, pdata->num_leds, sizeof(*led), led 227 drivers/video/backlight/adp8860_bl.c if (led == NULL) led 243 drivers/video/backlight/adp8860_bl.c led_dat = &led[i]; led 285 drivers/video/backlight/adp8860_bl.c data->led = led; led 291 drivers/video/backlight/adp8860_bl.c led_classdev_unregister(&led[i].cdev); led 292 drivers/video/backlight/adp8860_bl.c cancel_work_sync(&led[i].work); led 306 drivers/video/backlight/adp8860_bl.c led_classdev_unregister(&data->led[i].cdev); led 307 drivers/video/backlight/adp8860_bl.c cancel_work_sync(&data->led[i].work); led 770 drivers/video/backlight/adp8860_bl.c if (data->led) led 110 drivers/video/backlight/adp8870_bl.c struct adp8870_led *led; led 197 drivers/video/backlight/adp8870_bl.c struct adp8870_led *led = container_of(work, struct adp8870_led, work); led 199 drivers/video/backlight/adp8870_bl.c adp8870_write(led->client, ADP8870_ISC1 + led->id - 1, led 200 drivers/video/backlight/adp8870_bl.c led->new_brightness >> 1); led 206 drivers/video/backlight/adp8870_bl.c struct adp8870_led *led; led 208 drivers/video/backlight/adp8870_bl.c led = container_of(led_cdev, struct adp8870_led, cdev); led 209 drivers/video/backlight/adp8870_bl.c led->new_brightness = value; led 213 drivers/video/backlight/adp8870_bl.c schedule_work(&led->work); led 216 drivers/video/backlight/adp8870_bl.c static int adp8870_led_setup(struct adp8870_led *led) led 218 drivers/video/backlight/adp8870_bl.c struct i2c_client *client = led->client; led 221 drivers/video/backlight/adp8870_bl.c ret = adp8870_write(client, ADP8870_ISC1 + led->id - 1, 0); led 225 drivers/video/backlight/adp8870_bl.c ret = adp8870_set_bits(client, ADP8870_ISCC, 1 << (led->id - 1)); led 229 drivers/video/backlight/adp8870_bl.c if (led->id > 4) led 231 drivers/video/backlight/adp8870_bl.c (led->flags & 0x3) << ((led->id - 5) * 2)); led 234 drivers/video/backlight/adp8870_bl.c (led->flags & 0x3) << ((led->id - 1) * 2)); led 244 drivers/video/backlight/adp8870_bl.c struct adp8870_led *led, *led_dat; led 248 drivers/video/backlight/adp8870_bl.c led = devm_kcalloc(&client->dev, pdata->num_leds, sizeof(*led), led 250 drivers/video/backlight/adp8870_bl.c if (led == NULL) led 269 drivers/video/backlight/adp8870_bl.c led_dat = &led[i]; led 311 drivers/video/backlight/adp8870_bl.c data->led = led; led 317 drivers/video/backlight/adp8870_bl.c led_classdev_unregister(&led[i].cdev); led 318 drivers/video/backlight/adp8870_bl.c cancel_work_sync(&led[i].work); led 332 drivers/video/backlight/adp8870_bl.c led_classdev_unregister(&data->led[i].cdev); led 333 drivers/video/backlight/adp8870_bl.c cancel_work_sync(&data->led[i].work); led 942 drivers/video/backlight/adp8870_bl.c if (data->led) led 175 include/linux/input.h unsigned long led[BITS_TO_LONGS(LED_CNT)]; led 68 include/linux/kbd_kern.h extern void setledstate(struct kbd_struct *kbd, unsigned int led); led 72 include/linux/kbd_kern.h extern void (*kbd_ledfunc)(unsigned int led); led 436 include/linux/mfd/88pm860x.h struct pm860x_led_pdata *led; led 36 include/linux/mfd/htc-pasic3.h struct led_classdev led; led 176 include/linux/mfd/mc13xxx.h struct mc13xxx_led_platform_data *led; led 147 include/linux/mfd/tps65010.h extern int tps65010_set_led(unsigned led, unsigned mode); led 747 include/linux/mfd/wm8350/pmic.h struct wm8350_led led[2]; led 436 include/linux/mmc/host.h struct led_trigger *led; /* activity led */ led 1968 include/linux/platform_data/cros_ec_commands.h uint8_t led, red, green, blue; led 1972 include/linux/platform_data/cros_ec_commands.h uint8_t led; led 160 net/bluetooth/hidp/core.c newleds = (!!test_bit(LED_KANA, dev->led) << 3) | led 161 net/bluetooth/hidp/core.c (!!test_bit(LED_COMPOSE, dev->led) << 3) | led 162 net/bluetooth/hidp/core.c (!!test_bit(LED_SCROLLL, dev->led) << 2) | led 163 net/bluetooth/hidp/core.c (!!test_bit(LED_CAPSL, dev->led) << 1) | led 164 net/bluetooth/hidp/core.c (!!test_bit(LED_NUML, dev->led) << 0); led 132 net/rfkill/core.c static int rfkill_led_trigger_activate(struct led_classdev *led) led 136 net/rfkill/core.c rfkill = container_of(led->trigger, struct rfkill, led_trigger); led 309 sound/usb/line6/toneport.c struct toneport_led *led = &toneport->leds[i]; led 310 sound/usb/line6/toneport.c struct led_classdev *leddev = &led->dev; led 312 sound/usb/line6/toneport.c led->toneport = toneport; led 313 sound/usb/line6/toneport.c snprintf(led->name, sizeof(led->name), "%s::%s", led 315 sound/usb/line6/toneport.c leddev->name = led->name; led 322 sound/usb/line6/toneport.c led->registered = true; led 330 sound/usb/line6/toneport.c struct toneport_led *led; led 334 sound/usb/line6/toneport.c led = &toneport->leds[i]; led 335 sound/usb/line6/toneport.c if (!led->registered) led 337 sound/usb/line6/toneport.c led_classdev_unregister(&led->dev); led 338 sound/usb/line6/toneport.c led->registered = false;