Home
last modified time | relevance | path

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

1234

/drivers/leds/
Dled-class.c26 static void led_update_brightness(struct led_classdev *led_cdev) in led_update_brightness() argument
28 if (led_cdev->brightness_get) in led_update_brightness()
29 led_cdev->brightness = led_cdev->brightness_get(led_cdev); in led_update_brightness()
35 struct led_classdev *led_cdev = dev_get_drvdata(dev); in led_brightness_show() local
38 led_update_brightness(led_cdev); in led_brightness_show()
40 return sprintf(buf, "%u\n", led_cdev->brightness); in led_brightness_show()
46 struct led_classdev *led_cdev = dev_get_drvdata(dev); in led_brightness_store() local
55 led_trigger_remove(led_cdev); in led_brightness_store()
56 __led_set_brightness(led_cdev, state); in led_brightness_store()
64 struct led_classdev *led_cdev = dev_get_drvdata(dev); in led_max_brightness_show() local
[all …]
Dled-core.c27 static void led_set_software_blink(struct led_classdev *led_cdev, in led_set_software_blink() argument
33 current_brightness = led_get_brightness(led_cdev); in led_set_software_blink()
35 led_cdev->blink_brightness = current_brightness; in led_set_software_blink()
36 if (!led_cdev->blink_brightness) in led_set_software_blink()
37 led_cdev->blink_brightness = led_cdev->max_brightness; in led_set_software_blink()
39 led_cdev->blink_delay_on = delay_on; in led_set_software_blink()
40 led_cdev->blink_delay_off = delay_off; in led_set_software_blink()
48 __led_set_brightness(led_cdev, led_cdev->blink_brightness); in led_set_software_blink()
52 mod_timer(&led_cdev->blink_timer, jiffies + 1); in led_set_software_blink()
56 static void led_blink_setup(struct led_classdev *led_cdev, in led_blink_setup() argument
[all …]
Dled-triggers.c37 struct led_classdev *led_cdev = dev_get_drvdata(dev); in led_trigger_store() local
50 led_trigger_remove(led_cdev); in led_trigger_store()
57 down_write(&led_cdev->trigger_lock); in led_trigger_store()
58 led_trigger_set(led_cdev, trig); in led_trigger_store()
59 up_write(&led_cdev->trigger_lock); in led_trigger_store()
74 struct led_classdev *led_cdev = dev_get_drvdata(dev); in led_trigger_show() local
79 down_read(&led_cdev->trigger_lock); in led_trigger_show()
81 if (!led_cdev->trigger) in led_trigger_show()
87 if (led_cdev->trigger && !strcmp(led_cdev->trigger->name, in led_trigger_show()
93 up_read(&led_cdev->trigger_lock); in led_trigger_show()
[all …]
Dleds.h20 static inline void __led_set_brightness(struct led_classdev *led_cdev, in __led_set_brightness() argument
23 if (value > led_cdev->max_brightness) in __led_set_brightness()
24 value = led_cdev->max_brightness; in __led_set_brightness()
25 led_cdev->brightness = value; in __led_set_brightness()
26 if (!(led_cdev->flags & LED_SUSPENDED)) in __led_set_brightness()
27 led_cdev->brightness_set(led_cdev, value); in __led_set_brightness()
30 static inline int led_get_brightness(struct led_classdev *led_cdev) in led_get_brightness() argument
32 return led_cdev->brightness; in led_get_brightness()
35 void led_stop_software_blink(struct led_classdev *led_cdev);
41 void led_trigger_set_default(struct led_classdev *led_cdev);
[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-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 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.c41 struct led_classdev led_cdev; member
51 #define cdev_to_blmled(c) container_of(c, struct blinkm_led, led_cdev)
465 static int blinkm_led_common_set(struct led_classdev *led_cdev, in blinkm_led_common_set() argument
469 struct blinkm_led *led = cdev_to_blmled(led_cdev); in blinkm_led_common_set()
533 static void blinkm_led_red_set(struct led_classdev *led_cdev, in blinkm_led_red_set() argument
536 blinkm_led_common_set(led_cdev, value, RED); in blinkm_led_red_set()
539 static void blinkm_led_green_set(struct led_classdev *led_cdev, in blinkm_led_green_set() argument
542 blinkm_led_common_set(led_cdev, value, GREEN); in blinkm_led_green_set()
545 static void blinkm_led_blue_set(struct led_classdev *led_cdev, in blinkm_led_blue_set() argument
548 blinkm_led_common_set(led_cdev, value, BLUE); in blinkm_led_blue_set()
[all …]
Dleds-tca6507.c172 struct led_classdev led_cdev; member
377 int level = TO_LEVEL(led->led_cdev.brightness); in led_prepare()
384 led->led_cdev.brightness = TO_BRIGHT(level); in led_prepare()
421 led->led_cdev.brightness = LED_FULL; in led_prepare()
431 led->led_cdev.brightness = TO_BRIGHT(tca->bank[best].level); in led_prepare()
510 led->led_cdev.brightness = TO_BRIGHT(b->level); in led_prepare()
540 static void tca6507_brightness_set(struct led_classdev *led_cdev, in tca6507_brightness_set() argument
543 struct tca6507_led *led = container_of(led_cdev, struct tca6507_led, in tca6507_brightness_set()
544 led_cdev); in tca6507_brightness_set()
545 led->led_cdev.brightness = brightness; in tca6507_brightness_set()
[all …]
Dleds-pca9633.c48 struct led_classdev led_cdev; member
80 static void pca9633_led_set(struct led_classdev *led_cdev, in pca9633_led_set() argument
85 pca9633 = container_of(led_cdev, struct pca9633_led, led_cdev); in pca9633_led_set()
129 pca9633[i].led_cdev.default_trigger = in pca9633_probe()
136 pca9633[i].led_cdev.name = pca9633[i].name; in pca9633_probe()
137 pca9633[i].led_cdev.brightness_set = pca9633_led_set; in pca9633_probe()
141 err = led_classdev_register(&client->dev, &pca9633[i].led_cdev); in pca9633_probe()
160 led_classdev_unregister(&pca9633[i].led_cdev); in pca9633_probe()
173 led_classdev_unregister(&pca9633[i].led_cdev); in pca9633_remove()
Dleds-lm3533.c333 struct led_classdev *led_cdev = dev_get_drvdata(dev); in show_id() local
334 struct lm3533_led *led = to_lm3533_led(led_cdev); in show_id()
355 struct led_classdev *led_cdev = dev_get_drvdata(dev); in show_risefalltime() local
356 struct lm3533_led *led = to_lm3533_led(led_cdev); in show_risefalltime()
387 struct led_classdev *led_cdev = dev_get_drvdata(dev); in store_risefalltime() local
388 struct lm3533_led *led = to_lm3533_led(led_cdev); in store_risefalltime()
423 struct led_classdev *led_cdev = dev_get_drvdata(dev); in show_als_channel() local
424 struct lm3533_led *led = to_lm3533_led(led_cdev); in show_als_channel()
444 struct led_classdev *led_cdev = dev_get_drvdata(dev); in store_als_channel() local
445 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-wm831x-status.c41 #define to_wm831x_status(led_cdev) \ argument
42 container_of(led_cdev, struct wm831x_status, cdev)
74 static void wm831x_status_set(struct led_classdev *led_cdev, in wm831x_status_set() argument
77 struct wm831x_status *led = to_wm831x_status(led_cdev); in wm831x_status_set()
88 static int wm831x_status_blink_set(struct led_classdev *led_cdev, in wm831x_status_blink_set() argument
92 struct wm831x_status *led = to_wm831x_status(led_cdev); in wm831x_status_blink_set()
170 struct led_classdev *led_cdev = dev_get_drvdata(dev); in wm831x_status_src_show() local
171 struct wm831x_status *led = to_wm831x_status(led_cdev); in wm831x_status_src_show()
194 struct led_classdev *led_cdev = dev_get_drvdata(dev); in wm831x_status_src_store() local
195 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.c37 static void fsg_led_wlan_set(struct led_classdev *led_cdev, in fsg_led_wlan_set() argument
49 static void fsg_led_wan_set(struct led_classdev *led_cdev, in fsg_led_wan_set() argument
61 static void fsg_led_sata_set(struct led_classdev *led_cdev, in fsg_led_sata_set() argument
73 static void fsg_led_usb_set(struct led_classdev *led_cdev, in fsg_led_usb_set() argument
85 static void fsg_led_sync_set(struct led_classdev *led_cdev, in fsg_led_sync_set() argument
97 static void fsg_led_ring_set(struct led_classdev *led_cdev, in fsg_led_ring_set() argument
Dleds-s3c24xx.c38 static inline struct s3c24xx_gpio_led *to_gpio(struct led_classdev *led_cdev) in to_gpio() argument
40 return container_of(led_cdev, struct s3c24xx_gpio_led, cdev); in to_gpio()
43 static void s3c24xx_led_set(struct led_classdev *led_cdev, in s3c24xx_led_set() argument
46 struct s3c24xx_gpio_led *led = to_gpio(led_cdev); in s3c24xx_led_set()
/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(led_cdev, LED_FULL); in led_invert_store()
68 __led_set_brightness(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(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(led_cdev, transient_data->restore_state); in transient_activate_store()
83 __led_set_brightness(led_cdev, transient_data->state); in transient_activate_store()
101 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.c34 struct led_classdev *led_cdev = (struct led_classdev *) data; in led_heartbeat_function() local
35 struct heartbeat_trig_data *heartbeat_data = led_cdev->trigger_data; in led_heartbeat_function()
40 led_set_brightness(led_cdev, LED_OFF); in led_heartbeat_function()
59 brightness = led_cdev->max_brightness; in led_heartbeat_function()
68 brightness = led_cdev->max_brightness; in led_heartbeat_function()
77 __led_set_brightness(led_cdev, brightness); in led_heartbeat_function()
81 static void heartbeat_trig_activate(struct led_classdev *led_cdev) in heartbeat_trig_activate() argument
89 led_cdev->trigger_data = heartbeat_data; in heartbeat_trig_activate()
91 led_heartbeat_function, (unsigned long) led_cdev); in heartbeat_trig_activate()
94 led_cdev->activated = true; in heartbeat_trig_activate()
[all …]
Dledtrig-default-on.c20 static void defon_trig_activate(struct led_classdev *led_cdev) in defon_trig_activate() argument
22 __led_set_brightness(led_cdev, led_cdev->max_brightness); in defon_trig_activate()
/drivers/hid/
Dhid-steelseries.c141 static void steelseries_srws1_led_all_set_brightness(struct led_classdev *led_cdev, in steelseries_srws1_led_all_set_brightness() argument
144 struct device *dev = led_cdev->dev->parent; in steelseries_srws1_led_all_set_brightness()
161 static enum led_brightness steelseries_srws1_led_all_get_brightness(struct led_classdev *led_cdev) in steelseries_srws1_led_all_get_brightness() argument
163 struct device *dev = led_cdev->dev->parent; in steelseries_srws1_led_all_get_brightness()
177 static void steelseries_srws1_led_set_brightness(struct led_classdev *led_cdev, in steelseries_srws1_led_set_brightness() argument
180 struct device *dev = led_cdev->dev->parent; in steelseries_srws1_led_set_brightness()
191 if (led_cdev != drv_data->led[i]) in steelseries_srws1_led_set_brightness()
206 static enum led_brightness steelseries_srws1_led_get_brightness(struct led_classdev *led_cdev) in steelseries_srws1_led_get_brightness() argument
208 struct device *dev = led_cdev->dev->parent; in steelseries_srws1_led_get_brightness()
221 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()
Dhid-thingm.c35 struct led_classdev led_cdev; member
78 static void blink1_led_set(struct led_classdev *led_cdev, in blink1_led_set() argument
81 struct blink1_data *data = dev_get_drvdata(led_cdev->dev->parent); in blink1_led_set()
88 static enum led_brightness blink1_led_get(struct led_classdev *led_cdev) in blink1_led_get() argument
90 struct blink1_data *data = dev_get_drvdata(led_cdev->dev->parent); in blink1_led_get()
221 led = &data->led_cdev; in thingm_probe()
247 struct led_classdev *led = &data->led_cdev; in thingm_remove()
/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()
279 priv->led_cdev.name = priv->led_name; in ath9k_init_leds()
280 priv->led_cdev.brightness_set = ath9k_led_brightness; in ath9k_init_leds()
282 ret = led_classdev_register(wiphy_dev(priv->hw->wiphy), &priv->led_cdev); in ath9k_init_leds()
/drivers/staging/nvec/
Dnvec_paz00.c21 #define to_nvec_led(led_cdev) \ argument
22 container_of(led_cdev, struct nvec_led, cdev)
33 static void nvec_led_brightness_set(struct led_classdev *led_cdev, in nvec_led_brightness_set() argument
36 struct nvec_led *led = to_nvec_led(led_cdev); in nvec_led_brightness_set()

1234