Lines Matching refs:leds
111 struct mt6323_leds *leds = led->parent; in mt6323_led_hw_brightness() local
112 struct regmap *regmap = leds->hw->regmap; in mt6323_led_hw_brightness()
135 struct mt6323_leds *leds = led->parent; in mt6323_led_hw_off() local
136 struct regmap *regmap = leds->hw->regmap; in mt6323_led_hw_off()
160 struct mt6323_leds *leds = led->parent; in mt6323_get_led_hw_brightness() local
161 struct regmap *regmap = leds->hw->regmap; in mt6323_get_led_hw_brightness()
191 struct mt6323_leds *leds = led->parent; in mt6323_led_hw_on() local
192 struct regmap *regmap = leds->hw->regmap; in mt6323_led_hw_on()
245 struct mt6323_leds *leds = led->parent; in mt6323_led_set_blink() local
246 struct regmap *regmap = leds->hw->regmap; in mt6323_led_set_blink()
281 mutex_lock(&leds->lock); in mt6323_led_set_blink()
303 mutex_unlock(&leds->lock); in mt6323_led_set_blink()
312 struct mt6323_leds *leds = led->parent; in mt6323_led_set_brightness() local
315 mutex_lock(&leds->lock); in mt6323_led_set_brightness()
333 mutex_unlock(&leds->lock); in mt6323_led_set_brightness()
370 struct mt6323_leds *leds; in mt6323_led_probe() local
376 leds = devm_kzalloc(dev, sizeof(*leds), GFP_KERNEL); in mt6323_led_probe()
377 if (!leds) in mt6323_led_probe()
380 platform_set_drvdata(pdev, leds); in mt6323_led_probe()
381 leds->dev = dev; in mt6323_led_probe()
387 leds->hw = hw; in mt6323_led_probe()
388 mutex_init(&leds->lock); in mt6323_led_probe()
391 ret = regmap_update_bits(leds->hw->regmap, MT6323_TOP_CKPDN0, in mt6323_led_probe()
394 dev_err(leds->dev, in mt6323_led_probe()
408 if (reg >= MT6323_MAX_LEDS || leds->led[reg]) { in mt6323_led_probe()
420 leds->led[reg] = led; in mt6323_led_probe()
421 leds->led[reg]->id = reg; in mt6323_led_probe()
422 leds->led[reg]->cdev.max_brightness = MT6323_MAX_BRIGHTNESS; in mt6323_led_probe()
423 leds->led[reg]->cdev.brightness_set_blocking = in mt6323_led_probe()
425 leds->led[reg]->cdev.blink_set = mt6323_led_set_blink; in mt6323_led_probe()
426 leds->led[reg]->cdev.brightness_get = in mt6323_led_probe()
428 leds->led[reg]->parent = leds; in mt6323_led_probe()
430 ret = mt6323_led_set_dt_default(&leds->led[reg]->cdev, child); in mt6323_led_probe()
432 dev_err(leds->dev, in mt6323_led_probe()
439 ret = devm_led_classdev_register_ext(dev, &leds->led[reg]->cdev, in mt6323_led_probe()
456 struct mt6323_leds *leds = platform_get_drvdata(pdev); in mt6323_led_remove() local
460 for (i = 0 ; leds->led[i] ; i++) in mt6323_led_remove()
461 mt6323_led_hw_off(&leds->led[i]->cdev); in mt6323_led_remove()
463 regmap_update_bits(leds->hw->regmap, MT6323_TOP_CKPDN0, in mt6323_led_remove()
467 mutex_destroy(&leds->lock); in mt6323_led_remove()