Lines Matching refs:leds
13 #include "leds.h"
49 struct omnia_led leds[];
56 struct omnia_leds *leds = dev_get_drvdata(cdev->dev->parent);
61 mutex_lock(&leds->lock);
75 ret = i2c_smbus_write_byte_data(leds->client, CMD_LED_STATE, state);
77 ret = i2c_master_send(leds->client, buf, 5);
79 mutex_unlock(&leds->lock);
163 struct omnia_leds *leds = i2c_get_clientdata(client);
166 mutex_lock(&leds->lock);
168 mutex_unlock(&leds->lock);
180 struct omnia_leds *leds = i2c_get_clientdata(client);
190 mutex_lock(&leds->lock);
192 mutex_unlock(&leds->lock);
212 struct omnia_leds *leds;
225 leds = devm_kzalloc(dev, struct_size(leds, leds, count), GFP_KERNEL);
226 if (!leds)
229 leds->client = client;
230 i2c_set_clientdata(client, leds);
232 mutex_init(&leds->lock);
234 led = &leds->leds[0];
272 { .compatible = "cznic,turris-omnia-leds", },
287 .name = "leds-turris-omnia",