Lines Matching refs:led
238 struct cap11xx_led *led = container_of(work, struct cap11xx_led, work); in cap11xx_led_work() local
239 struct cap11xx_priv *priv = led->priv; in cap11xx_led_work()
240 int value = led->new_brightness; in cap11xx_led_work()
247 BIT(led->reg), value ? BIT(led->reg) : 0); in cap11xx_led_work()
253 struct cap11xx_led *led = container_of(cdev, struct cap11xx_led, cdev); in cap11xx_led_set() local
255 if (led->new_brightness == value) in cap11xx_led_set()
258 led->new_brightness = value; in cap11xx_led_set()
259 schedule_work(&led->work); in cap11xx_led_set()
266 struct cap11xx_led *led; in cap11xx_init_leds() local
276 led = devm_kcalloc(dev, cnt, sizeof(struct cap11xx_led), GFP_KERNEL); in cap11xx_init_leds()
277 if (!led) in cap11xx_init_leds()
280 priv->leds = led; in cap11xx_init_leds()
297 led->cdev.name = in cap11xx_init_leds()
299 led->cdev.default_trigger = in cap11xx_init_leds()
301 led->cdev.flags = 0; in cap11xx_init_leds()
302 led->cdev.brightness_set = cap11xx_led_set; in cap11xx_init_leds()
303 led->cdev.max_brightness = 1; in cap11xx_init_leds()
304 led->cdev.brightness = LED_OFF; in cap11xx_init_leds()
310 led->reg = reg; in cap11xx_init_leds()
311 led->priv = priv; in cap11xx_init_leds()
313 INIT_WORK(&led->work, cap11xx_led_work); in cap11xx_init_leds()
315 error = devm_led_classdev_register(dev, &led->cdev); in cap11xx_init_leds()
320 led++; in cap11xx_init_leds()