Lines Matching refs:leds
41 struct omnia_led leds[]; member
48 struct omnia_leds *leds = dev_get_drvdata(cdev->dev->parent); in omnia_led_brightness_set_blocking() local
53 mutex_lock(&leds->lock); in omnia_led_brightness_set_blocking()
67 ret = i2c_smbus_write_byte_data(leds->client, CMD_LED_STATE, state); in omnia_led_brightness_set_blocking()
69 ret = i2c_master_send(leds->client, buf, 5); in omnia_led_brightness_set_blocking()
71 mutex_unlock(&leds->lock); in omnia_led_brightness_set_blocking()
159 struct omnia_leds *leds = i2c_get_clientdata(client); in brightness_show() local
162 mutex_lock(&leds->lock); in brightness_show()
164 mutex_unlock(&leds->lock); in brightness_show()
176 struct omnia_leds *leds = i2c_get_clientdata(client); in brightness_store() local
186 mutex_lock(&leds->lock); in brightness_store()
189 mutex_unlock(&leds->lock); in brightness_store()
208 struct omnia_leds *leds; in omnia_leds_probe() local
221 leds = devm_kzalloc(dev, struct_size(leds, leds, count), GFP_KERNEL); in omnia_leds_probe()
222 if (!leds) in omnia_leds_probe()
225 leds->client = client; in omnia_leds_probe()
226 i2c_set_clientdata(client, leds); in omnia_leds_probe()
228 mutex_init(&leds->lock); in omnia_leds_probe()
230 led = &leds->leds[0]; in omnia_leds_probe()