Lines Matching refs:leds
49 struct omnia_led leds[]; member
56 struct omnia_leds *leds = dev_get_drvdata(cdev->dev->parent); in omnia_led_brightness_set_blocking() local
61 mutex_lock(&leds->lock); in omnia_led_brightness_set_blocking()
75 ret = i2c_smbus_write_byte_data(leds->client, CMD_LED_STATE, state); in omnia_led_brightness_set_blocking()
77 ret = i2c_master_send(leds->client, buf, 5); in omnia_led_brightness_set_blocking()
79 mutex_unlock(&leds->lock); in omnia_led_brightness_set_blocking()
163 struct omnia_leds *leds = i2c_get_clientdata(client); in brightness_show() local
166 mutex_lock(&leds->lock); in brightness_show()
168 mutex_unlock(&leds->lock); in brightness_show()
180 struct omnia_leds *leds = i2c_get_clientdata(client); in brightness_store() local
190 mutex_lock(&leds->lock); in brightness_store()
192 mutex_unlock(&leds->lock); in brightness_store()
212 struct omnia_leds *leds; in omnia_leds_probe() local
225 leds = devm_kzalloc(dev, struct_size(leds, leds, count), GFP_KERNEL); in omnia_leds_probe()
226 if (!leds) in omnia_leds_probe()
229 leds->client = client; in omnia_leds_probe()
230 i2c_set_clientdata(client, leds); in omnia_leds_probe()
232 mutex_init(&leds->lock); in omnia_leds_probe()
234 led = &leds->leds[0]; in omnia_leds_probe()