Lines Matching refs:led
88 struct lp55xx_led *led = dev_to_lp55xx_led(dev); in lp55xx_show_current() local
90 return scnprintf(buf, PAGE_SIZE, "%d\n", led->led_current); in lp55xx_show_current()
97 struct lp55xx_led *led = dev_to_lp55xx_led(dev); in lp55xx_store_current() local
98 struct lp55xx_chip *chip = led->chip; in lp55xx_store_current()
104 if (curr > led->max_current) in lp55xx_store_current()
111 chip->cfg->set_led_current(led, (u8)curr); in lp55xx_store_current()
121 struct lp55xx_led *led = dev_to_lp55xx_led(dev); in lp55xx_show_max_current() local
123 return scnprintf(buf, PAGE_SIZE, "%d\n", led->max_current); in lp55xx_show_max_current()
140 struct lp55xx_led *led = cdev_to_lp55xx_led(cdev); in lp55xx_set_brightness() local
142 led->brightness = (u8)brightness; in lp55xx_set_brightness()
143 schedule_work(&led->brightness_work); in lp55xx_set_brightness()
146 static int lp55xx_init_led(struct lp55xx_led *led, in lp55xx_init_led() argument
164 led->led_current = pdata->led_config[chan].led_current; in lp55xx_init_led()
165 led->max_current = pdata->led_config[chan].max_current; in lp55xx_init_led()
166 led->chan_nr = pdata->led_config[chan].chan_nr; in lp55xx_init_led()
167 led->cdev.default_trigger = pdata->led_config[chan].default_trigger; in lp55xx_init_led()
169 if (led->chan_nr >= max_channel) { in lp55xx_init_led()
175 led->cdev.brightness_set = lp55xx_set_brightness; in lp55xx_init_led()
176 led->cdev.groups = lp55xx_led_groups; in lp55xx_init_led()
179 led->cdev.name = pdata->led_config[chan].name; in lp55xx_init_led()
183 led->cdev.name = name; in lp55xx_init_led()
186 ret = led_classdev_register(dev, &led->cdev); in lp55xx_init_led()
234 struct lp55xx_led *led = i2c_get_clientdata(to_i2c_client(dev)); in lp55xx_show_engine_select() local
235 struct lp55xx_chip *chip = led->chip; in lp55xx_show_engine_select()
244 struct lp55xx_led *led = i2c_get_clientdata(to_i2c_client(dev)); in lp55xx_store_engine_select() local
245 struct lp55xx_chip *chip = led->chip; in lp55xx_store_engine_select()
286 struct lp55xx_led *led = i2c_get_clientdata(to_i2c_client(dev)); in lp55xx_store_engine_run() local
287 struct lp55xx_chip *chip = led->chip; in lp55xx_store_engine_run()
457 int lp55xx_register_leds(struct lp55xx_led *led, struct lp55xx_chip *chip) in lp55xx_register_leds() argument
479 each = led + i; in lp55xx_register_leds()
497 lp55xx_unregister_leds(led, chip); in lp55xx_register_leds()
502 void lp55xx_unregister_leds(struct lp55xx_led *led, struct lp55xx_chip *chip) in lp55xx_unregister_leds() argument
508 each = led + i; in lp55xx_unregister_leds()