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()
375 struct mt6323_leds *leds; in mt6323_led_probe() local
381 leds = devm_kzalloc(dev, sizeof(*leds), GFP_KERNEL); in mt6323_led_probe()
382 if (!leds) in mt6323_led_probe()
385 platform_set_drvdata(pdev, leds); in mt6323_led_probe()
386 leds->dev = dev; in mt6323_led_probe()
392 leds->hw = hw; in mt6323_led_probe()
393 mutex_init(&leds->lock); in mt6323_led_probe()
396 ret = regmap_update_bits(leds->hw->regmap, MT6323_TOP_CKPDN0, in mt6323_led_probe()
399 dev_err(leds->dev, in mt6323_led_probe()
411 if (reg >= MT6323_MAX_LEDS || leds->led[reg]) { in mt6323_led_probe()
423 leds->led[reg] = led; in mt6323_led_probe()
424 leds->led[reg]->id = reg; in mt6323_led_probe()
425 leds->led[reg]->cdev.max_brightness = MT6323_MAX_BRIGHTNESS; in mt6323_led_probe()
426 leds->led[reg]->cdev.brightness_set_blocking = in mt6323_led_probe()
428 leds->led[reg]->cdev.blink_set = mt6323_led_set_blink; in mt6323_led_probe()
429 leds->led[reg]->cdev.brightness_get = in mt6323_led_probe()
431 leds->led[reg]->parent = leds; in mt6323_led_probe()
433 ret = mt6323_led_set_dt_default(&leds->led[reg]->cdev, child); in mt6323_led_probe()
435 dev_err(leds->dev, in mt6323_led_probe()
440 ret = devm_led_classdev_register(dev, &leds->led[reg]->cdev); in mt6323_led_probe()
446 leds->led[reg]->cdev.dev->of_node = child; in mt6323_led_probe()
458 struct mt6323_leds *leds = platform_get_drvdata(pdev); in mt6323_led_remove() local
462 for (i = 0 ; leds->led[i] ; i++) in mt6323_led_remove()
463 mt6323_led_hw_off(&leds->led[i]->cdev); in mt6323_led_remove()
465 regmap_update_bits(leds->hw->regmap, MT6323_TOP_CKPDN0, in mt6323_led_remove()
469 mutex_destroy(&leds->lock); in mt6323_led_remove()