/drivers/leds/ |
D | led-core.c | 28 static int __led_set_brightness(struct led_classdev *led_cdev, in __led_set_brightness() argument 31 if (!led_cdev->brightness_set) in __led_set_brightness() 34 led_cdev->brightness_set(led_cdev, value); in __led_set_brightness() 39 static int __led_set_brightness_blocking(struct led_classdev *led_cdev, in __led_set_brightness_blocking() argument 42 if (!led_cdev->brightness_set_blocking) in __led_set_brightness_blocking() 45 return led_cdev->brightness_set_blocking(led_cdev, value); in __led_set_brightness_blocking() 50 struct led_classdev *led_cdev = (void *)data; in led_timer_function() local 54 if (!led_cdev->blink_delay_on || !led_cdev->blink_delay_off) { in led_timer_function() 55 led_set_brightness_nosleep(led_cdev, LED_OFF); in led_timer_function() 56 clear_bit(LED_BLINK_SW, &led_cdev->work_flags); in led_timer_function() [all …]
|
D | led-class.c | 31 struct led_classdev *led_cdev = dev_get_drvdata(dev); in brightness_show() local 34 led_update_brightness(led_cdev); in brightness_show() 36 return sprintf(buf, "%u\n", led_cdev->brightness); in brightness_show() 42 struct led_classdev *led_cdev = dev_get_drvdata(dev); in brightness_store() local 46 mutex_lock(&led_cdev->led_access); in brightness_store() 48 if (led_sysfs_is_disabled(led_cdev)) { in brightness_store() 58 led_trigger_remove(led_cdev); in brightness_store() 59 led_set_brightness(led_cdev, state); in brightness_store() 63 mutex_unlock(&led_cdev->led_access); in brightness_store() 71 struct led_classdev *led_cdev = dev_get_drvdata(dev); in max_brightness_show() local [all …]
|
D | led-triggers.c | 36 struct led_classdev *led_cdev = dev_get_drvdata(dev); in led_trigger_store() local 40 mutex_lock(&led_cdev->led_access); in led_trigger_store() 42 if (led_sysfs_is_disabled(led_cdev)) { in led_trigger_store() 48 led_trigger_remove(led_cdev); in led_trigger_store() 55 down_write(&led_cdev->trigger_lock); in led_trigger_store() 56 led_trigger_set(led_cdev, trig); in led_trigger_store() 57 up_write(&led_cdev->trigger_lock); in led_trigger_store() 68 mutex_unlock(&led_cdev->led_access); in led_trigger_store() 76 struct led_classdev *led_cdev = dev_get_drvdata(dev); in led_trigger_show() local 81 down_read(&led_cdev->trigger_lock); in led_trigger_show() [all …]
|
D | led-class-flash.c | 43 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 …]
|
D | leds-sunfire.c | 24 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 …]
|
D | leds-aat1290.c | 93 struct led_classdev *led_cdev) in led_cdev_to_fled_cdev() argument 95 return container_of(led_cdev, struct led_classdev_flash, led_cdev); in led_cdev_to_fled_cdev() 142 static int aat1290_led_brightness_set(struct led_classdev *led_cdev, in aat1290_led_brightness_set() argument 145 struct led_classdev_flash *fled_cdev = led_cdev_to_fled_cdev(led_cdev); in aat1290_led_brightness_set() 178 struct led_classdev *led_cdev = &fled_cdev->led_cdev; in aat1290_led_flash_strobe_set() local 197 led_cdev->brightness = 0; in aat1290_led_flash_strobe_set() 221 struct led_classdev *led_cdev = &led->fled_cdev.led_cdev; in aat1290_led_parse_dt() local 260 led_cdev->name = of_get_property(child_node, "label", NULL) ? : in aat1290_led_parse_dt() 408 struct led_classdev *led_cdev = &fled_cdev->led_cdev; in aat1290_led_external_strobe_set() local 415 led_cdev->brightness = 0; in aat1290_led_external_strobe_set() [all …]
|
D | leds-ss4200.c | 140 struct led_classdev led_cdev; member 162 led_classdev_to_nasgpio_led(struct led_classdev *led_cdev) in led_classdev_to_nasgpio_led() argument 164 return container_of(led_cdev, struct nasgpio_led, led_cdev); in led_classdev_to_nasgpio_led() 190 static void __nasgpio_led_set_attr(struct led_classdev *led_cdev, in __nasgpio_led_set_attr() argument 193 struct nasgpio_led *led = led_classdev_to_nasgpio_led(led_cdev); in __nasgpio_led_set_attr() 205 static void nasgpio_led_set_attr(struct led_classdev *led_cdev, in nasgpio_led_set_attr() argument 209 __nasgpio_led_set_attr(led_cdev, port, value); in nasgpio_led_set_attr() 213 static u32 nasgpio_led_get_attr(struct led_classdev *led_cdev, u32 port) in nasgpio_led_get_attr() argument 215 struct nasgpio_led *led = led_classdev_to_nasgpio_led(led_cdev); in nasgpio_led_get_attr() 231 static void nasgpio_led_set_brightness(struct led_classdev *led_cdev, in nasgpio_led_set_brightness() argument [all …]
|
D | leds-blinkm.c | 40 struct led_classdev led_cdev; member 44 #define cdev_to_blmled(c) container_of(c, struct blinkm_led, led_cdev) 435 static int blinkm_led_common_set(struct led_classdev *led_cdev, in blinkm_led_common_set() argument 439 struct blinkm_led *led = cdev_to_blmled(led_cdev); in blinkm_led_common_set() 476 static int blinkm_led_red_set(struct led_classdev *led_cdev, in blinkm_led_red_set() argument 479 return blinkm_led_common_set(led_cdev, value, RED); in blinkm_led_red_set() 482 static int blinkm_led_green_set(struct led_classdev *led_cdev, in blinkm_led_green_set() argument 485 return blinkm_led_common_set(led_cdev, value, GREEN); in blinkm_led_green_set() 488 static int blinkm_led_blue_set(struct led_classdev *led_cdev, in blinkm_led_blue_set() argument 491 return blinkm_led_common_set(led_cdev, value, BLUE); in blinkm_led_blue_set() [all …]
|
D | leds.h | 19 static inline int led_get_brightness(struct led_classdev *led_cdev) in led_get_brightness() argument 21 return led_cdev->brightness; in led_get_brightness() 24 void led_init_core(struct led_classdev *led_cdev); 25 void led_stop_software_blink(struct led_classdev *led_cdev); 26 void led_set_brightness_nopm(struct led_classdev *led_cdev, 28 void led_set_brightness_nosleep(struct led_classdev *led_cdev,
|
D | leds-tca6507.c | 182 struct led_classdev led_cdev; member 393 int level = TO_LEVEL(led->led_cdev.brightness); in led_prepare() 400 led->led_cdev.brightness = TO_BRIGHT(level); in led_prepare() 437 led->led_cdev.brightness = LED_FULL; in led_prepare() 447 led->led_cdev.brightness = TO_BRIGHT(tca->bank[best].level); in led_prepare() 526 led->led_cdev.brightness = TO_BRIGHT(b->level); in led_prepare() 556 static void tca6507_brightness_set(struct led_classdev *led_cdev, in tca6507_brightness_set() argument 559 struct tca6507_led *led = container_of(led_cdev, struct tca6507_led, in tca6507_brightness_set() 560 led_cdev); in tca6507_brightness_set() 561 led->led_cdev.brightness = brightness; in tca6507_brightness_set() [all …]
|
D | leds-lm3533.c | 318 struct led_classdev *led_cdev = dev_get_drvdata(dev); in show_id() local 319 struct lm3533_led *led = to_lm3533_led(led_cdev); in show_id() 340 struct led_classdev *led_cdev = dev_get_drvdata(dev); in show_risefalltime() local 341 struct lm3533_led *led = to_lm3533_led(led_cdev); in show_risefalltime() 372 struct led_classdev *led_cdev = dev_get_drvdata(dev); in store_risefalltime() local 373 struct lm3533_led *led = to_lm3533_led(led_cdev); in store_risefalltime() 408 struct led_classdev *led_cdev = dev_get_drvdata(dev); in show_als_channel() local 409 struct lm3533_led *led = to_lm3533_led(led_cdev); in show_als_channel() 429 struct led_classdev *led_cdev = dev_get_drvdata(dev); in store_als_channel() local 430 struct lm3533_led *led = to_lm3533_led(led_cdev); in store_als_channel() [all …]
|
D | leds-locomo.c | 20 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()
|
D | uleds.c | 38 struct led_classdev led_cdev; member 48 static void uleds_brightness_set(struct led_classdev *led_cdev, in uleds_brightness_set() argument 51 struct uleds_device *udev = container_of(led_cdev, struct uleds_device, in uleds_brightness_set() 52 led_cdev); in uleds_brightness_set() 69 udev->led_cdev.name = udev->user_dev.name; in uleds_open() 70 udev->led_cdev.brightness_set = uleds_brightness_set; in uleds_open() 123 udev->led_cdev.max_brightness = udev->user_dev.max_brightness; in uleds_write() 126 &udev->led_cdev); in uleds_write() 198 &udev->led_cdev); in uleds_release()
|
D | leds-wm831x-status.c | 39 #define to_wm831x_status(led_cdev) \ argument 40 container_of(led_cdev, struct wm831x_status, cdev) 70 static int wm831x_status_brightness_set(struct led_classdev *led_cdev, in wm831x_status_brightness_set() argument 73 struct wm831x_status *led = to_wm831x_status(led_cdev); in wm831x_status_brightness_set() 86 static int wm831x_status_blink_set(struct led_classdev *led_cdev, in wm831x_status_blink_set() argument 90 struct wm831x_status *led = to_wm831x_status(led_cdev); in wm831x_status_blink_set() 165 struct led_classdev *led_cdev = dev_get_drvdata(dev); in wm831x_status_src_show() local 166 struct wm831x_status *led = to_wm831x_status(led_cdev); in wm831x_status_src_show() 189 struct led_classdev *led_cdev = dev_get_drvdata(dev); in wm831x_status_src_store() local 190 struct wm831x_status *led = to_wm831x_status(led_cdev); in wm831x_status_src_store()
|
D | leds-pca963x.c | 123 struct led_classdev led_cdev; member 199 if (pca963x->led_cdev.brightness) in pca963x_power_state() 211 static int pca963x_led_set(struct led_classdev *led_cdev, in pca963x_led_set() argument 217 pca963x = container_of(led_cdev, struct pca963x_led, led_cdev); in pca963x_led_set() 239 static int pca963x_blink_set(struct led_classdev *led_cdev, in pca963x_blink_set() argument 246 pca963x = container_of(led_cdev, struct pca963x_led, led_cdev); in pca963x_blink_set() 439 pca963x[i].led_cdev.default_trigger = in pca963x_probe() 448 pca963x[i].led_cdev.name = pca963x[i].name; in pca963x_probe() 449 pca963x[i].led_cdev.brightness_set_blocking = pca963x_led_set; in pca963x_probe() 452 pca963x[i].led_cdev.blink_set = pca963x_blink_set; in pca963x_probe() [all …]
|
D | leds-ktd2692.c | 159 static int ktd2692_led_brightness_set(struct led_classdev *led_cdev, in ktd2692_led_brightness_set() argument 162 struct led_classdev_flash *fled_cdev = lcdev_to_flcdev(led_cdev); in ktd2692_led_brightness_set() 205 fled_cdev->led_cdev.brightness = LED_OFF; in ktd2692_led_flash_strobe_set() 302 led->fled_cdev.led_cdev.name = in ktd2692_parse_dt() 339 struct led_classdev *led_cdev; in ktd2692_probe() local 349 led_cdev = &fled_cdev->led_cdev; in ktd2692_probe() 360 led_cdev->max_brightness = led_cfg.max_brightness; in ktd2692_probe() 361 led_cdev->brightness_set_blocking = ktd2692_led_brightness_set; in ktd2692_probe() 362 led_cdev->flags |= LED_CORE_SUSPENDRESUME | LED_DEV_CAP_FLASH; in ktd2692_probe() 370 dev_err(&pdev->dev, "can't register LED %s\n", led_cdev->name); in ktd2692_probe()
|
D | leds-fsg.c | 36 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/ |
D | ledtrig-oneshot.c | 32 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_nosleep(led_cdev, LED_FULL); in led_invert_store() 68 led_set_brightness_nosleep(led_cdev, LED_OFF); in led_invert_store() [all …]
|
D | ledtrig-transient.c | 40 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_nosleep(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_nosleep(led_cdev, in transient_activate_store() 84 led_set_brightness_nosleep(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 …]
|
D | ledtrig-timer.c | 24 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 …]
|
D | ledtrig-heartbeat.c | 36 struct led_classdev *led_cdev = (struct led_classdev *) data; in led_heartbeat_function() local 37 struct heartbeat_trig_data *heartbeat_data = led_cdev->trigger_data; in led_heartbeat_function() 42 led_set_brightness_nosleep(led_cdev, LED_OFF); in led_heartbeat_function() 46 if (test_and_clear_bit(LED_BLINK_BRIGHTNESS_CHANGE, &led_cdev->work_flags)) in led_heartbeat_function() 47 led_cdev->blink_brightness = led_cdev->new_blink_brightness; in led_heartbeat_function() 65 brightness = led_cdev->blink_brightness; in led_heartbeat_function() 71 brightness = led_cdev->blink_brightness; in led_heartbeat_function() 77 brightness = led_cdev->blink_brightness; in led_heartbeat_function() 84 brightness = led_cdev->blink_brightness; in led_heartbeat_function() 88 led_set_brightness_nosleep(led_cdev, brightness); in led_heartbeat_function() [all …]
|
D | ledtrig-panic.c | 25 static void led_trigger_set_panic(struct led_classdev *led_cdev) in led_trigger_set_panic() argument 32 if (led_cdev->trigger) in led_trigger_set_panic() 33 list_del(&led_cdev->trig_list); in led_trigger_set_panic() 34 list_add_tail(&led_cdev->trig_list, &trig->led_cdevs); in led_trigger_set_panic() 37 led_cdev->blink_delay_on = 0; in led_trigger_set_panic() 38 led_cdev->blink_delay_off = 0; in led_trigger_set_panic() 40 led_cdev->trigger = trig; in led_trigger_set_panic() 42 trig->activate(led_cdev); in led_trigger_set_panic() 50 struct led_classdev *led_cdev; in led_trigger_panic_notifier() local 52 list_for_each_entry(led_cdev, &leds_list, node) in led_trigger_panic_notifier() [all …]
|
/drivers/usb/core/ |
D | ledtrig-usbport.c | 20 struct led_classdev *led_cdev; member 75 struct led_classdev *led_cdev = usbport_data->led_cdev; in usbport_trig_update_count() local 79 led_set_brightness(led_cdev, usbport_data->count ? LED_FULL : LED_OFF); in usbport_trig_update_count() 134 struct device *dev = usbport_data->led_cdev->dev; in usbport_trig_port_observed() 189 struct led_classdev *led_cdev = usbport_data->led_cdev; in usbport_trig_add_port() local 220 err = sysfs_add_file_to_group(&led_cdev->dev->kobj, &port->attr.attr, in usbport_trig_add_port() 253 struct led_classdev *led_cdev = usbport_data->led_cdev; in usbport_trig_remove_port() local 256 sysfs_remove_file_from_group(&led_cdev->dev->kobj, &port->attr.attr, in usbport_trig_remove_port() 282 struct led_classdev *led_cdev = usbport_data->led_cdev; in usbport_trig_notify() local 292 led_set_brightness(led_cdev, LED_FULL); in usbport_trig_notify() [all …]
|
/drivers/media/v4l2-core/ |
D | v4l2-flash-led-class.c | 110 led_set_brightness_sync(&v4l2_flash->fled_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; 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 ? &fled_cdev->led_cdev : NULL; in v4l2_flash_s_ctrl() local 209 led_set_brightness_sync(led_cdev, LED_OFF); in v4l2_flash_s_ctrl() 213 led_set_brightness_sync(led_cdev, LED_OFF); in v4l2_flash_s_ctrl() [all …]
|
/drivers/hid/ |
D | hid-steelseries.c | 140 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()
|