Home
last modified time | relevance | path

Searched refs:led_cdev (Results 1 – 25 of 103) sorted by relevance

12345

/drivers/leds/
Dled-core.c30 struct led_classdev *led_cdev = (void *)data; in led_timer_function() local
34 if (!led_cdev->blink_delay_on || !led_cdev->blink_delay_off) { in led_timer_function()
35 led_set_brightness_async(led_cdev, LED_OFF); in led_timer_function()
39 if (led_cdev->flags & LED_BLINK_ONESHOT_STOP) { in led_timer_function()
40 led_cdev->flags &= ~LED_BLINK_ONESHOT_STOP; in led_timer_function()
44 brightness = led_get_brightness(led_cdev); in led_timer_function()
47 if (led_cdev->delayed_set_value) { in led_timer_function()
48 led_cdev->blink_brightness = in led_timer_function()
49 led_cdev->delayed_set_value; in led_timer_function()
50 led_cdev->delayed_set_value = 0; in led_timer_function()
[all …]
Dled-class.c30 struct led_classdev *led_cdev = dev_get_drvdata(dev); in brightness_show() local
33 led_update_brightness(led_cdev); in brightness_show()
35 return sprintf(buf, "%u\n", led_cdev->brightness); in brightness_show()
41 struct led_classdev *led_cdev = dev_get_drvdata(dev); in brightness_store() local
45 mutex_lock(&led_cdev->led_access); in brightness_store()
47 if (led_sysfs_is_disabled(led_cdev)) { in brightness_store()
57 led_trigger_remove(led_cdev); in brightness_store()
58 led_set_brightness(led_cdev, state); in brightness_store()
62 mutex_unlock(&led_cdev->led_access); in brightness_store()
70 struct led_classdev *led_cdev = dev_get_drvdata(dev); in max_brightness_show() local
[all …]
Dled-triggers.c36 struct led_classdev *led_cdev = dev_get_drvdata(dev); in led_trigger_store() local
42 mutex_lock(&led_cdev->led_access); in led_trigger_store()
44 if (led_sysfs_is_disabled(led_cdev)) { in led_trigger_store()
57 led_trigger_remove(led_cdev); in led_trigger_store()
64 down_write(&led_cdev->trigger_lock); in led_trigger_store()
65 led_trigger_set(led_cdev, trig); in led_trigger_store()
66 up_write(&led_cdev->trigger_lock); in led_trigger_store()
75 mutex_unlock(&led_cdev->led_access); in led_trigger_store()
83 struct led_classdev *led_cdev = dev_get_drvdata(dev); in led_trigger_show() local
88 down_read(&led_cdev->trigger_lock); in led_trigger_show()
[all …]
Dled-class-flash.c43 struct led_classdev *led_cdev = dev_get_drvdata(dev); in flash_brightness_store() local
44 struct led_classdev_flash *fled_cdev = lcdev_to_flcdev(led_cdev); in flash_brightness_store()
48 mutex_lock(&led_cdev->led_access); in flash_brightness_store()
50 if (led_sysfs_is_disabled(led_cdev)) { in flash_brightness_store()
65 mutex_unlock(&led_cdev->led_access); in flash_brightness_store()
72 struct led_classdev *led_cdev = dev_get_drvdata(dev); in flash_brightness_show() local
73 struct led_classdev_flash *fled_cdev = lcdev_to_flcdev(led_cdev); in flash_brightness_show()
85 struct led_classdev *led_cdev = dev_get_drvdata(dev); in max_flash_brightness_show() local
86 struct led_classdev_flash *fled_cdev = lcdev_to_flcdev(led_cdev); in max_flash_brightness_show()
95 struct led_classdev *led_cdev = dev_get_drvdata(dev); in flash_strobe_store() local
[all …]
Dleds.h19 static inline void led_set_brightness_async(struct led_classdev *led_cdev, in led_set_brightness_async() argument
22 value = min(value, led_cdev->max_brightness); in led_set_brightness_async()
23 led_cdev->brightness = value; in led_set_brightness_async()
25 if (!(led_cdev->flags & LED_SUSPENDED)) in led_set_brightness_async()
26 led_cdev->brightness_set(led_cdev, value); in led_set_brightness_async()
29 static inline int led_set_brightness_sync(struct led_classdev *led_cdev, in led_set_brightness_sync() argument
34 led_cdev->brightness = min(value, led_cdev->max_brightness); in led_set_brightness_sync()
36 if (!(led_cdev->flags & LED_SUSPENDED)) in led_set_brightness_sync()
37 ret = led_cdev->brightness_set_sync(led_cdev, in led_set_brightness_sync()
38 led_cdev->brightness); in led_set_brightness_sync()
[all …]
Dleds-sunfire.c24 struct led_classdev led_cdev; member
27 #define to_sunfire_led(d) container_of(d, struct sunfire_led, led_cdev)
29 static void __clockboard_set(struct led_classdev *led_cdev, in __clockboard_set() argument
32 struct sunfire_led *p = to_sunfire_led(led_cdev); in __clockboard_set()
53 static void clockboard_left_set(struct led_classdev *led_cdev, in clockboard_left_set() argument
56 __clockboard_set(led_cdev, led_val, CLOCK_CTRL_LLED); in clockboard_left_set()
59 static void clockboard_middle_set(struct led_classdev *led_cdev, in clockboard_middle_set() argument
62 __clockboard_set(led_cdev, led_val, CLOCK_CTRL_MLED); in clockboard_middle_set()
65 static void clockboard_right_set(struct led_classdev *led_cdev, in clockboard_right_set() argument
68 __clockboard_set(led_cdev, led_val, CLOCK_CTRL_RLED); in clockboard_right_set()
[all …]
Dleds-aat1290.c173 static void aat1290_led_brightness_set(struct led_classdev *led_cdev, in aat1290_led_brightness_set() argument
176 struct led_classdev_flash *fled_cdev = lcdev_to_flcdev(led_cdev); in aat1290_led_brightness_set()
183 static int aat1290_led_brightness_set_sync(struct led_classdev *led_cdev, in aat1290_led_brightness_set_sync() argument
186 struct led_classdev_flash *fled_cdev = lcdev_to_flcdev(led_cdev); in aat1290_led_brightness_set_sync()
199 struct led_classdev *led_cdev = &fled_cdev->led_cdev; in aat1290_led_flash_strobe_set() local
218 led_cdev->brightness = 0; in aat1290_led_flash_strobe_set()
242 struct led_classdev *led_cdev = &led->fled_cdev.led_cdev; in aat1290_led_parse_dt() local
281 led_cdev->name = of_get_property(child_node, "label", NULL) ? : in aat1290_led_parse_dt()
426 struct led_classdev *led_cdev = &fled_cdev->led_cdev; in aat1290_led_external_strobe_set() local
433 led_cdev->brightness = 0; in aat1290_led_external_strobe_set()
[all …]
Dleds-ss4200.c127 struct led_classdev led_cdev; member
149 led_classdev_to_nasgpio_led(struct led_classdev *led_cdev) in led_classdev_to_nasgpio_led() argument
151 return container_of(led_cdev, struct nasgpio_led, led_cdev); in led_classdev_to_nasgpio_led()
177 static void __nasgpio_led_set_attr(struct led_classdev *led_cdev, in __nasgpio_led_set_attr() argument
180 struct nasgpio_led *led = led_classdev_to_nasgpio_led(led_cdev); in __nasgpio_led_set_attr()
192 static void nasgpio_led_set_attr(struct led_classdev *led_cdev, in nasgpio_led_set_attr() argument
196 __nasgpio_led_set_attr(led_cdev, port, value); in nasgpio_led_set_attr()
200 static u32 nasgpio_led_get_attr(struct led_classdev *led_cdev, u32 port) in nasgpio_led_get_attr() argument
202 struct nasgpio_led *led = led_classdev_to_nasgpio_led(led_cdev); in nasgpio_led_get_attr()
218 static void nasgpio_led_set_brightness(struct led_classdev *led_cdev, in nasgpio_led_set_brightness() argument
[all …]
Dleds-blinkm.c40 struct led_classdev led_cdev; member
50 #define cdev_to_blmled(c) container_of(c, struct blinkm_led, led_cdev)
461 static int blinkm_led_common_set(struct led_classdev *led_cdev, in blinkm_led_common_set() argument
465 struct blinkm_led *led = cdev_to_blmled(led_cdev); in blinkm_led_common_set()
529 static void blinkm_led_red_set(struct led_classdev *led_cdev, in blinkm_led_red_set() argument
532 blinkm_led_common_set(led_cdev, value, RED); in blinkm_led_red_set()
535 static void blinkm_led_green_set(struct led_classdev *led_cdev, in blinkm_led_green_set() argument
538 blinkm_led_common_set(led_cdev, value, GREEN); in blinkm_led_green_set()
541 static void blinkm_led_blue_set(struct led_classdev *led_cdev, in blinkm_led_blue_set() argument
544 blinkm_led_common_set(led_cdev, value, BLUE); in blinkm_led_blue_set()
[all …]
Dleds-tca6507.c182 struct led_classdev led_cdev; member
391 int level = TO_LEVEL(led->led_cdev.brightness); in led_prepare()
398 led->led_cdev.brightness = TO_BRIGHT(level); in led_prepare()
435 led->led_cdev.brightness = LED_FULL; in led_prepare()
445 led->led_cdev.brightness = TO_BRIGHT(tca->bank[best].level); in led_prepare()
524 led->led_cdev.brightness = TO_BRIGHT(b->level); in led_prepare()
554 static void tca6507_brightness_set(struct led_classdev *led_cdev, in tca6507_brightness_set() argument
557 struct tca6507_led *led = container_of(led_cdev, struct tca6507_led, in tca6507_brightness_set()
558 led_cdev); in tca6507_brightness_set()
559 led->led_cdev.brightness = brightness; in tca6507_brightness_set()
[all …]
Dleds-lm3533.c332 struct led_classdev *led_cdev = dev_get_drvdata(dev); in show_id() local
333 struct lm3533_led *led = to_lm3533_led(led_cdev); in show_id()
354 struct led_classdev *led_cdev = dev_get_drvdata(dev); in show_risefalltime() local
355 struct lm3533_led *led = to_lm3533_led(led_cdev); in show_risefalltime()
386 struct led_classdev *led_cdev = dev_get_drvdata(dev); in store_risefalltime() local
387 struct lm3533_led *led = to_lm3533_led(led_cdev); in store_risefalltime()
422 struct led_classdev *led_cdev = dev_get_drvdata(dev); in show_als_channel() local
423 struct lm3533_led *led = to_lm3533_led(led_cdev); in show_als_channel()
443 struct led_classdev *led_cdev = dev_get_drvdata(dev); in store_als_channel() local
444 struct lm3533_led *led = to_lm3533_led(led_cdev); in store_als_channel()
[all …]
Dleds-locomo.c20 static void locomoled_brightness_set(struct led_classdev *led_cdev, in locomoled_brightness_set() argument
23 struct locomo_dev *locomo_dev = LOCOMO_DEV(led_cdev->dev->parent); in locomoled_brightness_set()
34 static void locomoled_brightness_set0(struct led_classdev *led_cdev, in locomoled_brightness_set0() argument
37 locomoled_brightness_set(led_cdev, value, LOCOMO_LPT0); in locomoled_brightness_set0()
40 static void locomoled_brightness_set1(struct led_classdev *led_cdev, in locomoled_brightness_set1() argument
43 locomoled_brightness_set(led_cdev, value, LOCOMO_LPT1); in locomoled_brightness_set1()
Dleds-ktd2692.c187 static void ktd2692_led_brightness_set(struct led_classdev *led_cdev, in ktd2692_led_brightness_set() argument
190 struct led_classdev_flash *fled_cdev = lcdev_to_flcdev(led_cdev); in ktd2692_led_brightness_set()
197 static int ktd2692_led_brightness_set_sync(struct led_classdev *led_cdev, in ktd2692_led_brightness_set_sync() argument
200 struct led_classdev_flash *fled_cdev = lcdev_to_flcdev(led_cdev); in ktd2692_led_brightness_set_sync()
231 fled_cdev->led_cdev.brightness = LED_OFF; in ktd2692_led_flash_strobe_set()
328 led->fled_cdev.led_cdev.name = in ktd2692_parse_dt()
362 struct led_classdev *led_cdev; in ktd2692_probe() local
372 led_cdev = &fled_cdev->led_cdev; in ktd2692_probe()
383 led_cdev->max_brightness = led_cfg.max_brightness; in ktd2692_probe()
384 led_cdev->brightness_set = ktd2692_led_brightness_set; in ktd2692_probe()
[all …]
Dleds-pca963x.c117 struct led_classdev led_cdev; member
198 static void pca963x_led_set(struct led_classdev *led_cdev, in pca963x_led_set() argument
203 pca963x = container_of(led_cdev, struct pca963x_led, led_cdev); in pca963x_led_set()
215 static int pca963x_blink_set(struct led_classdev *led_cdev, in pca963x_blink_set() argument
222 pca963x = container_of(led_cdev, struct pca963x_led, led_cdev); in pca963x_blink_set()
402 pca963x[i].led_cdev.default_trigger = in pca963x_probe()
411 pca963x[i].led_cdev.name = pca963x[i].name; in pca963x_probe()
412 pca963x[i].led_cdev.brightness_set = pca963x_led_set; in pca963x_probe()
415 pca963x[i].led_cdev.blink_set = pca963x_blink_set; in pca963x_probe()
419 err = led_classdev_register(&client->dev, &pca963x[i].led_cdev); in pca963x_probe()
[all …]
Dleds-wm831x-status.c40 #define to_wm831x_status(led_cdev) \ argument
41 container_of(led_cdev, struct wm831x_status, cdev)
73 static void wm831x_status_set(struct led_classdev *led_cdev, in wm831x_status_set() argument
76 struct wm831x_status *led = to_wm831x_status(led_cdev); in wm831x_status_set()
87 static int wm831x_status_blink_set(struct led_classdev *led_cdev, in wm831x_status_blink_set() argument
91 struct wm831x_status *led = to_wm831x_status(led_cdev); in wm831x_status_blink_set()
169 struct led_classdev *led_cdev = dev_get_drvdata(dev); in wm831x_status_src_show() local
170 struct wm831x_status *led = to_wm831x_status(led_cdev); in wm831x_status_src_show()
193 struct led_classdev *led_cdev = dev_get_drvdata(dev); in wm831x_status_src_store() local
194 struct wm831x_status *led = to_wm831x_status(led_cdev); in wm831x_status_src_store()
Dleds-pca955x.c115 struct led_classdev led_cdev; member
243 static void pca955x_led_set(struct led_classdev *led_cdev, enum led_brightness value) in pca955x_led_set() argument
247 pca955x = container_of(led_cdev, struct pca955x_led, led_cdev); in pca955x_led_set()
323 pca955x_led->led_cdev.default_trigger = in pca955x_probe()
330 pca955x_led->led_cdev.name = pca955x_led->name; in pca955x_probe()
331 pca955x_led->led_cdev.brightness_set = pca955x_led_set; in pca955x_probe()
336 &pca955x_led->led_cdev); in pca955x_probe()
359 led_classdev_unregister(&pca955x->leds[i].led_cdev); in pca955x_probe()
372 led_classdev_unregister(&pca955x->leds[i].led_cdev); in pca955x_remove()
Dleds-fsg.c36 static void fsg_led_wlan_set(struct led_classdev *led_cdev, in fsg_led_wlan_set() argument
48 static void fsg_led_wan_set(struct led_classdev *led_cdev, in fsg_led_wan_set() argument
60 static void fsg_led_sata_set(struct led_classdev *led_cdev, in fsg_led_sata_set() argument
72 static void fsg_led_usb_set(struct led_classdev *led_cdev, in fsg_led_usb_set() argument
84 static void fsg_led_sync_set(struct led_classdev *led_cdev, in fsg_led_sync_set() argument
96 static void fsg_led_ring_set(struct led_classdev *led_cdev, in fsg_led_ring_set() argument
/drivers/leds/trigger/
Dledtrig-oneshot.c32 struct led_classdev *led_cdev = dev_get_drvdata(dev); in led_shot() local
33 struct oneshot_trig_data *oneshot_data = led_cdev->trigger_data; in led_shot()
35 led_blink_set_oneshot(led_cdev, in led_shot()
36 &led_cdev->blink_delay_on, &led_cdev->blink_delay_off, in led_shot()
45 struct led_classdev *led_cdev = dev_get_drvdata(dev); in led_invert_show() local
46 struct oneshot_trig_data *oneshot_data = led_cdev->trigger_data; in led_invert_show()
54 struct led_classdev *led_cdev = dev_get_drvdata(dev); in led_invert_store() local
55 struct oneshot_trig_data *oneshot_data = led_cdev->trigger_data; in led_invert_store()
66 led_set_brightness_async(led_cdev, LED_FULL); in led_invert_store()
68 led_set_brightness_async(led_cdev, LED_OFF); in led_invert_store()
[all …]
Dledtrig-transient.c40 struct led_classdev *led_cdev = (struct led_classdev *) data; in transient_timer_function() local
41 struct transient_trig_data *transient_data = led_cdev->trigger_data; in transient_timer_function()
44 led_set_brightness_async(led_cdev, transient_data->restore_state); in transient_timer_function()
50 struct led_classdev *led_cdev = dev_get_drvdata(dev); in transient_activate_show() local
51 struct transient_trig_data *transient_data = led_cdev->trigger_data; in transient_activate_show()
59 struct led_classdev *led_cdev = dev_get_drvdata(dev); in transient_activate_store() local
60 struct transient_trig_data *transient_data = led_cdev->trigger_data; in transient_activate_store()
75 led_set_brightness_async(led_cdev, in transient_activate_store()
84 led_set_brightness_async(led_cdev, transient_data->state); in transient_activate_store()
102 struct led_classdev *led_cdev = dev_get_drvdata(dev); in transient_duration_show() local
[all …]
Dledtrig-timer.c24 struct led_classdev *led_cdev = dev_get_drvdata(dev); in led_delay_on_show() local
26 return sprintf(buf, "%lu\n", led_cdev->blink_delay_on); in led_delay_on_show()
32 struct led_classdev *led_cdev = dev_get_drvdata(dev); in led_delay_on_store() local
40 led_blink_set(led_cdev, &state, &led_cdev->blink_delay_off); in led_delay_on_store()
41 led_cdev->blink_delay_on = state; in led_delay_on_store()
49 struct led_classdev *led_cdev = dev_get_drvdata(dev); in led_delay_off_show() local
51 return sprintf(buf, "%lu\n", led_cdev->blink_delay_off); in led_delay_off_show()
57 struct led_classdev *led_cdev = dev_get_drvdata(dev); in led_delay_off_store() local
65 led_blink_set(led_cdev, &led_cdev->blink_delay_on, &state); in led_delay_off_store()
66 led_cdev->blink_delay_off = state; in led_delay_off_store()
[all …]
Dledtrig-heartbeat.c35 struct led_classdev *led_cdev = (struct led_classdev *) data; in led_heartbeat_function() local
36 struct heartbeat_trig_data *heartbeat_data = led_cdev->trigger_data; in led_heartbeat_function()
41 led_set_brightness(led_cdev, LED_OFF); in led_heartbeat_function()
61 brightness = led_cdev->max_brightness; in led_heartbeat_function()
67 brightness = led_cdev->max_brightness; in led_heartbeat_function()
73 brightness = led_cdev->max_brightness; in led_heartbeat_function()
80 brightness = led_cdev->max_brightness; in led_heartbeat_function()
84 led_set_brightness_async(led_cdev, brightness); in led_heartbeat_function()
91 struct led_classdev *led_cdev = dev_get_drvdata(dev); in led_invert_show() local
92 struct heartbeat_trig_data *heartbeat_data = led_cdev->trigger_data; in led_invert_show()
[all …]
/drivers/media/v4l2-core/
Dv4l2-flash-led-class.c110 led_set_brightness(&v4l2_flash->fled_cdev->led_cdev, in v4l2_flash_set_led_brightness()
113 led_set_brightness(&v4l2_flash->iled_cdev->led_cdev, in v4l2_flash_set_led_brightness()
122 struct led_classdev *led_cdev; in v4l2_flash_update_led_brightness() local
134 led_cdev = &v4l2_flash->fled_cdev->led_cdev; in v4l2_flash_update_led_brightness()
136 led_cdev = &v4l2_flash->iled_cdev->led_cdev; in v4l2_flash_update_led_brightness()
139 ret = led_update_brightness(led_cdev); in v4l2_flash_update_led_brightness()
146 led_cdev->brightness); in v4l2_flash_update_led_brightness()
149 led_cdev->brightness); in v4l2_flash_update_led_brightness()
200 struct led_classdev *led_cdev = &fled_cdev->led_cdev; in v4l2_flash_s_ctrl() local
209 led_set_brightness(led_cdev, LED_OFF); in v4l2_flash_s_ctrl()
[all …]
/drivers/hid/
Dhid-steelseries.c140 static void steelseries_srws1_led_all_set_brightness(struct led_classdev *led_cdev, in steelseries_srws1_led_all_set_brightness() argument
143 struct device *dev = led_cdev->dev->parent; in steelseries_srws1_led_all_set_brightness()
160 static enum led_brightness steelseries_srws1_led_all_get_brightness(struct led_classdev *led_cdev) in steelseries_srws1_led_all_get_brightness() argument
162 struct device *dev = led_cdev->dev->parent; in steelseries_srws1_led_all_get_brightness()
176 static void steelseries_srws1_led_set_brightness(struct led_classdev *led_cdev, in steelseries_srws1_led_set_brightness() argument
179 struct device *dev = led_cdev->dev->parent; in steelseries_srws1_led_set_brightness()
190 if (led_cdev != drv_data->led[i]) in steelseries_srws1_led_set_brightness()
205 static enum led_brightness steelseries_srws1_led_get_brightness(struct led_classdev *led_cdev) in steelseries_srws1_led_get_brightness() argument
207 struct device *dev = led_cdev->dev->parent; in steelseries_srws1_led_get_brightness()
220 if (led_cdev == drv_data->led[i]) { in steelseries_srws1_led_get_brightness()
Dhid-picolcd_leds.c60 static void picolcd_led_set_brightness(struct led_classdev *led_cdev, in picolcd_led_set_brightness() argument
68 dev = led_cdev->dev->parent; in picolcd_led_set_brightness()
74 if (led_cdev != data->led[i]) in picolcd_led_set_brightness()
88 static enum led_brightness picolcd_led_get_brightness(struct led_classdev *led_cdev) in picolcd_led_get_brightness() argument
95 dev = led_cdev->dev->parent; in picolcd_led_get_brightness()
99 if (led_cdev == data->led[i]) { in picolcd_led_get_brightness()
/drivers/net/wireless/ath/ath9k/
Dhtc_drv_gpio.c236 static void ath9k_led_brightness(struct led_classdev *led_cdev, in ath9k_led_brightness() argument
239 struct ath9k_htc_priv *priv = container_of(led_cdev, in ath9k_led_brightness()
241 led_cdev); in ath9k_led_brightness()
253 ath9k_led_brightness(&priv->led_cdev, LED_OFF); in ath9k_deinit_leds()
254 led_classdev_unregister(&priv->led_cdev); in ath9k_deinit_leds()
283 priv->led_cdev.default_trigger = in ath9k_init_leds()
290 priv->led_cdev.name = priv->led_name; in ath9k_init_leds()
291 priv->led_cdev.brightness_set = ath9k_led_brightness; in ath9k_init_leds()
293 ret = led_classdev_register(wiphy_dev(priv->hw->wiphy), &priv->led_cdev); in ath9k_init_leds()

12345