Lines Matching full:leds
10 #include <linux/leds.h>
17 struct led_classdev **leds; member
36 led_set_brightness(priv->leds[i], bkl_brightness); in led_bl_set_brightness()
49 led_set_brightness(priv->leds[i], LED_OFF); in led_bl_power_off()
76 struct led_classdev **leds; in led_bl_get_leds() local
80 ret = of_count_phandle_with_args(node, "leds", NULL); in led_bl_get_leds()
92 leds = devm_kzalloc(dev, sizeof(struct led_classdev *) * nb_leds, in led_bl_get_leds()
94 if (!leds) in led_bl_get_leds()
98 leds[i] = devm_of_led_get(dev, i); in led_bl_get_leds()
99 if (IS_ERR(leds[i])) in led_bl_get_leds()
100 return PTR_ERR(leds[i]); in led_bl_get_leds()
103 /* check that the LEDs all have the same brightness range */ in led_bl_get_leds()
104 max_brightness = leds[0]->max_brightness; in led_bl_get_leds()
106 if (max_brightness != leds[i]->max_brightness) { in led_bl_get_leds()
107 dev_err(dev, "LEDs must have identical ranges\n"); in led_bl_get_leds()
113 default_brightness = leds[0]->brightness; in led_bl_get_leds()
116 priv->leds = leds; in led_bl_get_leds()
213 mutex_lock(&priv->leds[i]->led_access); in led_bl_probe()
214 led_sysfs_disable(priv->leds[i]); in led_bl_probe()
215 mutex_unlock(&priv->leds[i]->led_access); in led_bl_probe()
233 led_sysfs_enable(priv->leds[i]); in led_bl_remove()