Lines Matching full:leds
3 * CZ.NIC's Turris Omnia LEDs driver
13 #include "leds.h"
41 struct omnia_led leds[]; member
79 struct omnia_leds *leds = dev_get_drvdata(cdev->dev->parent); in omnia_led_brightness_set_blocking() local
84 mutex_lock(&leds->lock); in omnia_led_brightness_set_blocking()
98 ret = omnia_cmd_write_u8(leds->client, CMD_LED_STATE, state); in omnia_led_brightness_set_blocking()
100 ret = i2c_master_send(leds->client, buf, 5); in omnia_led_brightness_set_blocking()
102 mutex_unlock(&leds->lock); in omnia_led_brightness_set_blocking()
177 * can be used to control the intensity of all the LEDs at once, so that if they
229 struct omnia_leds *leds; in omnia_leds_probe() local
235 dev_err(dev, "LEDs are not defined in device tree!\n"); in omnia_leds_probe()
238 dev_err(dev, "Too many LEDs defined in device tree!\n"); in omnia_leds_probe()
242 leds = devm_kzalloc(dev, struct_size(leds, leds, count), GFP_KERNEL); in omnia_leds_probe()
243 if (!leds) in omnia_leds_probe()
246 leds->client = client; in omnia_leds_probe()
247 i2c_set_clientdata(client, leds); in omnia_leds_probe()
249 mutex_init(&leds->lock); in omnia_leds_probe()
251 led = &leds->leds[0]; in omnia_leds_probe()
269 /* put all LEDs into default (HW triggered) mode */ in omnia_leds_remove()
273 /* set all LEDs color to [255, 255, 255] */ in omnia_leds_remove()
284 { .compatible = "cznic,turris-omnia-leds", },
299 .name = "leds-turris-omnia",
308 MODULE_DESCRIPTION("CZ.NIC's Turris Omnia LEDs");