• Home
  • Raw
  • Download

Lines Matching refs:led

113 	struct mt6323_led	*led[MT6323_MAX_LEDS];  member
119 struct mt6323_led *led = container_of(cdev, struct mt6323_led, cdev); in mt6323_led_hw_brightness() local
120 struct mt6323_leds *leds = led->parent; in mt6323_led_hw_brightness()
136 ret = regmap_update_bits(regmap, MT6323_ISINK_CON2(led->id), in mt6323_led_hw_brightness()
143 struct mt6323_led *led = container_of(cdev, struct mt6323_led, cdev); in mt6323_led_hw_off() local
144 struct mt6323_leds *leds = led->parent; in mt6323_led_hw_off()
149 status = MT6323_ISINK_CH_EN(led->id); in mt6323_led_hw_off()
151 MT6323_ISINK_CH_EN_MASK(led->id), ~status); in mt6323_led_hw_off()
157 MT6323_RG_ISINK_CK_PDN_MASK(led->id), in mt6323_led_hw_off()
158 MT6323_RG_ISINK_CK_PDN(led->id)); in mt6323_led_hw_off()
168 struct mt6323_led *led = container_of(cdev, struct mt6323_led, cdev); in mt6323_get_led_hw_brightness() local
169 struct mt6323_leds *leds = led->parent; in mt6323_get_led_hw_brightness()
178 if (status & MT6323_RG_ISINK_CK_PDN_MASK(led->id)) in mt6323_get_led_hw_brightness()
185 if (!(status & MT6323_ISINK_CH_EN(led->id))) in mt6323_get_led_hw_brightness()
188 ret = regmap_read(regmap, MT6323_ISINK_CON2(led->id), &status); in mt6323_get_led_hw_brightness()
199 struct mt6323_led *led = container_of(cdev, struct mt6323_led, cdev); in mt6323_led_hw_on() local
200 struct mt6323_leds *leds = led->parent; in mt6323_led_hw_on()
211 MT6323_RG_ISINK_CK_SEL_MASK(led->id), 0); in mt6323_led_hw_on()
215 status = MT6323_RG_ISINK_CK_PDN(led->id); in mt6323_led_hw_on()
217 MT6323_RG_ISINK_CK_PDN_MASK(led->id), in mt6323_led_hw_on()
225 MT6323_ISINK_CH_EN_MASK(led->id), in mt6323_led_hw_on()
226 MT6323_ISINK_CH_EN(led->id)); in mt6323_led_hw_on()
234 ret = regmap_update_bits(regmap, MT6323_ISINK_CON0(led->id), in mt6323_led_hw_on()
240 ret = regmap_update_bits(regmap, MT6323_ISINK_CON1(led->id), in mt6323_led_hw_on()
253 struct mt6323_led *led = container_of(cdev, struct mt6323_led, cdev); in mt6323_led_set_blink() local
254 struct mt6323_leds *leds = led->parent; in mt6323_led_set_blink()
295 if (!led->current_brightness) { in mt6323_led_set_blink()
299 led->current_brightness = cdev->max_brightness; in mt6323_led_set_blink()
302 ret = regmap_update_bits(regmap, MT6323_ISINK_CON0(led->id), in mt6323_led_set_blink()
308 ret = regmap_update_bits(regmap, MT6323_ISINK_CON1(led->id), in mt6323_led_set_blink()
320 struct mt6323_led *led = container_of(cdev, struct mt6323_led, cdev); in mt6323_led_set_brightness() local
321 struct mt6323_leds *leds = led->parent; in mt6323_led_set_brightness()
326 if (!led->current_brightness && brightness) { in mt6323_led_set_brightness()
340 led->current_brightness = brightness; in mt6323_led_set_brightness()
350 struct mt6323_led *led = container_of(cdev, struct mt6323_led, cdev); in mt6323_led_set_dt_default() local
354 led->cdev.name = of_get_property(np, "label", NULL) ? : np->name; in mt6323_led_set_dt_default()
355 led->cdev.default_trigger = of_get_property(np, in mt6323_led_set_dt_default()
365 led->current_brightness = ret; in mt6323_led_set_dt_default()
385 struct mt6323_led *led; in mt6323_led_probe() local
420 if (reg >= MT6323_MAX_LEDS || leds->led[reg]) { in mt6323_led_probe()
426 led = devm_kzalloc(dev, sizeof(*led), GFP_KERNEL); in mt6323_led_probe()
427 if (!led) { in mt6323_led_probe()
432 leds->led[reg] = led; in mt6323_led_probe()
433 leds->led[reg]->id = reg; in mt6323_led_probe()
434 leds->led[reg]->cdev.max_brightness = MT6323_MAX_BRIGHTNESS; in mt6323_led_probe()
435 leds->led[reg]->cdev.brightness_set_blocking = in mt6323_led_probe()
437 leds->led[reg]->cdev.blink_set = mt6323_led_set_blink; in mt6323_led_probe()
438 leds->led[reg]->cdev.brightness_get = in mt6323_led_probe()
440 leds->led[reg]->parent = leds; in mt6323_led_probe()
442 ret = mt6323_led_set_dt_default(&leds->led[reg]->cdev, child); in mt6323_led_probe()
449 ret = devm_led_classdev_register(dev, &leds->led[reg]->cdev); in mt6323_led_probe()
455 leds->led[reg]->cdev.dev->of_node = child; in mt6323_led_probe()
471 for (i = 0 ; leds->led[i] ; i++) in mt6323_led_remove()
472 mt6323_led_hw_off(&leds->led[i]->cdev); in mt6323_led_remove()