/drivers/leds/ |
D | led-core.c | 42 static int __led_set_brightness(struct led_classdev *led_cdev, unsigned int value) in __led_set_brightness() argument 44 if (!led_cdev->brightness_set) in __led_set_brightness() 47 led_cdev->brightness_set(led_cdev, value); in __led_set_brightness() 52 static int __led_set_brightness_blocking(struct led_classdev *led_cdev, unsigned int value) in __led_set_brightness_blocking() argument 54 if (!led_cdev->brightness_set_blocking) in __led_set_brightness_blocking() 57 return led_cdev->brightness_set_blocking(led_cdev, value); in __led_set_brightness_blocking() 62 struct led_classdev *led_cdev = from_timer(led_cdev, t, blink_timer); in led_timer_function() local 66 if (!led_cdev->blink_delay_on || !led_cdev->blink_delay_off) { in led_timer_function() 67 led_set_brightness_nosleep(led_cdev, LED_OFF); in led_timer_function() 68 clear_bit(LED_BLINK_SW, &led_cdev->work_flags); in led_timer_function() [all …]
|
D | led-class.c | 30 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() 59 flush_work(&led_cdev->set_brightness_work); in brightness_store() 63 mutex_unlock(&led_cdev->led_access); in brightness_store() [all …]
|
D | led-triggers.c | 31 trigger_relevant(struct led_classdev *led_cdev, struct led_trigger *trig) in trigger_relevant() argument 33 return !trig->trigger_type || trig->trigger_type == led_cdev->trigger_type; in trigger_relevant() 41 struct led_classdev *led_cdev = dev_get_drvdata(dev); in led_trigger_write() local 45 mutex_lock(&led_cdev->led_access); in led_trigger_write() 47 if (led_sysfs_is_disabled(led_cdev)) { in led_trigger_write() 53 led_trigger_remove(led_cdev); in led_trigger_write() 59 if (sysfs_streq(buf, trig->name) && trigger_relevant(led_cdev, trig)) { in led_trigger_write() 60 down_write(&led_cdev->trigger_lock); in led_trigger_write() 61 led_trigger_set(led_cdev, trig); in led_trigger_write() 62 up_write(&led_cdev->trigger_lock); in led_trigger_write() [all …]
|
D | led-class-flash.c | 40 struct led_classdev *led_cdev = dev_get_drvdata(dev); in flash_brightness_store() local 41 struct led_classdev_flash *fled_cdev = lcdev_to_flcdev(led_cdev); in flash_brightness_store() 45 mutex_lock(&led_cdev->led_access); in flash_brightness_store() 47 if (led_sysfs_is_disabled(led_cdev)) { in flash_brightness_store() 62 mutex_unlock(&led_cdev->led_access); in flash_brightness_store() 69 struct led_classdev *led_cdev = dev_get_drvdata(dev); in flash_brightness_show() local 70 struct led_classdev_flash *fled_cdev = lcdev_to_flcdev(led_cdev); in flash_brightness_show() 82 struct led_classdev *led_cdev = dev_get_drvdata(dev); in max_flash_brightness_show() local 83 struct led_classdev_flash *fled_cdev = lcdev_to_flcdev(led_cdev); in max_flash_brightness_show() 92 struct led_classdev *led_cdev = dev_get_drvdata(dev); in flash_strobe_store() local [all …]
|
D | leds-ariel.c | 29 struct led_classdev led_cdev; member 32 #define led_cdev_to_ariel_led(c) container_of(c, struct ariel_led, led_cdev) 34 static enum led_brightness ariel_led_get(struct led_classdev *led_cdev) in ariel_led_get() argument 36 struct ariel_led *led = led_cdev_to_ariel_led(led_cdev); in ariel_led_get() 48 static void ariel_led_set(struct led_classdev *led_cdev, in ariel_led_set() argument 51 struct ariel_led *led = led_cdev_to_ariel_led(led_cdev); in ariel_led_set() 59 static int ariel_blink_set(struct led_classdev *led_cdev, in ariel_blink_set() argument 62 struct ariel_led *led = led_cdev_to_ariel_led(led_cdev); in ariel_blink_set() 99 leds[0].led_cdev.name = "blue:power"; in ariel_led_probe() 100 leds[0].led_cdev.default_trigger = "default-on"; in ariel_led_probe() [all …]
|
D | leds-sunfire.c | 25 struct led_classdev led_cdev; member 28 #define to_sunfire_led(d) container_of(d, struct sunfire_led, led_cdev) 30 static void __clockboard_set(struct led_classdev *led_cdev, in __clockboard_set() argument 33 struct sunfire_led *p = to_sunfire_led(led_cdev); in __clockboard_set() 54 static void clockboard_left_set(struct led_classdev *led_cdev, in clockboard_left_set() argument 57 __clockboard_set(led_cdev, led_val, CLOCK_CTRL_LLED); in clockboard_left_set() 60 static void clockboard_middle_set(struct led_classdev *led_cdev, in clockboard_middle_set() argument 63 __clockboard_set(led_cdev, led_val, CLOCK_CTRL_MLED); in clockboard_middle_set() 66 static void clockboard_right_set(struct led_classdev *led_cdev, in clockboard_right_set() argument 69 __clockboard_set(led_cdev, led_val, CLOCK_CTRL_RLED); in clockboard_right_set() [all …]
|
D | led-class-multicolor.c | 19 struct led_classdev *led_cdev = &mcled_cdev->led_cdev; in led_mc_calc_color_components() local 26 led_cdev->max_brightness); in led_mc_calc_color_components() 36 struct led_classdev *led_cdev = dev_get_drvdata(dev); in multi_intensity_store() local 37 struct led_classdev_mc *mcled_cdev = lcdev_to_mccdev(led_cdev); in multi_intensity_store() 43 mutex_lock(&led_cdev->led_access); in multi_intensity_store() 64 led_set_brightness(led_cdev, led_cdev->brightness); in multi_intensity_store() 67 mutex_unlock(&led_cdev->led_access); in multi_intensity_store() 75 struct led_classdev *led_cdev = dev_get_drvdata(dev); in multi_intensity_show() local 76 struct led_classdev_mc *mcled_cdev = lcdev_to_mccdev(led_cdev); in multi_intensity_show() 96 struct led_classdev *led_cdev = dev_get_drvdata(dev); in multi_index_show() local [all …]
|
D | leds-mlxreg.c | 39 struct led_classdev led_cdev; member 45 #define cdev_to_priv(c) container_of(c, struct mlxreg_led_data, led_cdev) 119 dev_warn(led_data->led_cdev.dev, "Failed to get current brightness, error: %d\n", in mlxreg_led_get_hw() 190 struct led_classdev *led_cdev; in mlxreg_led_config() local 219 led_cdev = &led_data->led_cdev; in mlxreg_led_config() 234 led_cdev->name = led_data->led_cdev_name; in mlxreg_led_config() 235 led_cdev->brightness = brightness; in mlxreg_led_config() 236 led_cdev->max_brightness = LED_ON; in mlxreg_led_config() 237 led_cdev->brightness_set_blocking = in mlxreg_led_config() 239 led_cdev->brightness_get = mlxreg_led_brightness_get; in mlxreg_led_config() [all …]
|
D | leds-tca6507.c | 174 struct led_classdev led_cdev; member 382 int level = TO_LEVEL(led->led_cdev.brightness); in led_prepare() 389 led->led_cdev.brightness = TO_BRIGHT(level); in led_prepare() 426 led->led_cdev.brightness = LED_FULL; in led_prepare() 436 led->led_cdev.brightness = TO_BRIGHT(tca->bank[best].level); in led_prepare() 515 led->led_cdev.brightness = TO_BRIGHT(b->level); in led_prepare() 545 static void tca6507_brightness_set(struct led_classdev *led_cdev, in tca6507_brightness_set() argument 548 struct tca6507_led *led = container_of(led_cdev, struct tca6507_led, in tca6507_brightness_set() 549 led_cdev); in tca6507_brightness_set() 550 led->led_cdev.brightness = brightness; in tca6507_brightness_set() [all …]
|
D | leds-blinkm.c | 27 struct led_classdev led_cdev; member 31 #define cdev_to_blmled(c) container_of(c, struct blinkm_led, led_cdev) 422 static int blinkm_led_common_set(struct led_classdev *led_cdev, in blinkm_led_common_set() argument 426 struct blinkm_led *led = cdev_to_blmled(led_cdev); in blinkm_led_common_set() 463 static int blinkm_led_red_set(struct led_classdev *led_cdev, in blinkm_led_red_set() argument 466 return blinkm_led_common_set(led_cdev, value, RED); in blinkm_led_red_set() 469 static int blinkm_led_green_set(struct led_classdev *led_cdev, in blinkm_led_green_set() argument 472 return blinkm_led_common_set(led_cdev, value, GREEN); in blinkm_led_green_set() 475 static int blinkm_led_blue_set(struct led_classdev *led_cdev, in blinkm_led_blue_set() argument 478 return blinkm_led_common_set(led_cdev, value, BLUE); in blinkm_led_blue_set() [all …]
|
D | leds-ss4200.c | 128 struct led_classdev led_cdev; member 150 led_classdev_to_nasgpio_led(struct led_classdev *led_cdev) in led_classdev_to_nasgpio_led() argument 152 return container_of(led_cdev, struct nasgpio_led, led_cdev); in led_classdev_to_nasgpio_led() 178 static void __nasgpio_led_set_attr(struct led_classdev *led_cdev, in __nasgpio_led_set_attr() argument 181 struct nasgpio_led *led = led_classdev_to_nasgpio_led(led_cdev); in __nasgpio_led_set_attr() 193 static void nasgpio_led_set_attr(struct led_classdev *led_cdev, in nasgpio_led_set_attr() argument 197 __nasgpio_led_set_attr(led_cdev, port, value); in nasgpio_led_set_attr() 201 static u32 nasgpio_led_get_attr(struct led_classdev *led_cdev, u32 port) in nasgpio_led_get_attr() argument 203 struct nasgpio_led *led = led_classdev_to_nasgpio_led(led_cdev); in nasgpio_led_get_attr() 219 static void nasgpio_led_set_brightness(struct led_classdev *led_cdev, in nasgpio_led_set_brightness() argument [all …]
|
D | leds-lm3533.c | 314 struct led_classdev *led_cdev = dev_get_drvdata(dev); in show_id() local 315 struct lm3533_led *led = to_lm3533_led(led_cdev); in show_id() 336 struct led_classdev *led_cdev = dev_get_drvdata(dev); in show_risefalltime() local 337 struct lm3533_led *led = to_lm3533_led(led_cdev); in show_risefalltime() 368 struct led_classdev *led_cdev = dev_get_drvdata(dev); in store_risefalltime() local 369 struct lm3533_led *led = to_lm3533_led(led_cdev); in store_risefalltime() 404 struct led_classdev *led_cdev = dev_get_drvdata(dev); in show_als_channel() local 405 struct lm3533_led *led = to_lm3533_led(led_cdev); in show_als_channel() 425 struct led_classdev *led_cdev = dev_get_drvdata(dev); in store_als_channel() local 426 struct lm3533_led *led = to_lm3533_led(led_cdev); in store_als_channel() [all …]
|
/drivers/leds/trigger/ |
D | ledtrig-pattern.c | 25 struct led_classdev *led_cdev; member 84 led_set_brightness(data->led_cdev, in pattern_trig_timer_function() 107 led_set_brightness(data->led_cdev, in pattern_trig_timer_function() 120 static int pattern_trig_start_pattern(struct led_classdev *led_cdev) in pattern_trig_start_pattern() argument 122 struct pattern_trig_data *data = led_cdev->trigger_data; in pattern_trig_start_pattern() 128 return led_cdev->pattern_set(led_cdev, data->patterns, in pattern_trig_start_pattern() 148 struct led_classdev *led_cdev = dev_get_drvdata(dev); in repeat_show() local 149 struct pattern_trig_data *data = led_cdev->trigger_data; in repeat_show() 164 struct led_classdev *led_cdev = dev_get_drvdata(dev); in repeat_store() local 165 struct pattern_trig_data *data = led_cdev->trigger_data; in repeat_store() [all …]
|
D | ledtrig-timer.c | 21 struct led_classdev *led_cdev = led_trigger_get_led(dev); in led_delay_on_show() local 23 return sprintf(buf, "%lu\n", led_cdev->blink_delay_on); in led_delay_on_show() 29 struct led_classdev *led_cdev = led_trigger_get_led(dev); in led_delay_on_store() local 37 led_blink_set(led_cdev, &state, &led_cdev->blink_delay_off); in led_delay_on_store() 38 led_cdev->blink_delay_on = state; in led_delay_on_store() 46 struct led_classdev *led_cdev = led_trigger_get_led(dev); in led_delay_off_show() local 48 return sprintf(buf, "%lu\n", led_cdev->blink_delay_off); in led_delay_off_show() 54 struct led_classdev *led_cdev = led_trigger_get_led(dev); in led_delay_off_store() local 62 led_blink_set(led_cdev, &led_cdev->blink_delay_on, &state); in led_delay_off_store() 63 led_cdev->blink_delay_off = state; in led_delay_off_store() [all …]
|
D | ledtrig-oneshot.c | 28 struct led_classdev *led_cdev = led_trigger_get_led(dev); in led_shot() local 31 led_blink_set_oneshot(led_cdev, in led_shot() 32 &led_cdev->blink_delay_on, &led_cdev->blink_delay_off, in led_shot() 49 struct led_classdev *led_cdev = led_trigger_get_led(dev); in led_invert_store() local 61 led_set_brightness_nosleep(led_cdev, LED_FULL); in led_invert_store() 63 led_set_brightness_nosleep(led_cdev, LED_OFF); in led_invert_store() 71 struct led_classdev *led_cdev = led_trigger_get_led(dev); in led_delay_on_show() local 73 return sprintf(buf, "%lu\n", led_cdev->blink_delay_on); in led_delay_on_show() 79 struct led_classdev *led_cdev = led_trigger_get_led(dev); in led_delay_on_store() local 87 led_cdev->blink_delay_on = state; in led_delay_on_store() [all …]
|
D | ledtrig-heartbeat.c | 26 struct led_classdev *led_cdev; member 37 struct led_classdev *led_cdev; in led_heartbeat_function() local 41 led_cdev = heartbeat_data->led_cdev; in led_heartbeat_function() 44 led_set_brightness_nosleep(led_cdev, LED_OFF); in led_heartbeat_function() 48 if (test_and_clear_bit(LED_BLINK_BRIGHTNESS_CHANGE, &led_cdev->work_flags)) in led_heartbeat_function() 49 led_cdev->blink_brightness = led_cdev->new_blink_brightness; in led_heartbeat_function() 67 brightness = led_cdev->blink_brightness; in led_heartbeat_function() 73 brightness = led_cdev->blink_brightness; in led_heartbeat_function() 79 brightness = led_cdev->blink_brightness; in led_heartbeat_function() 86 brightness = led_cdev->blink_brightness; in led_heartbeat_function() [all …]
|
D | ledtrig-activity.c | 25 struct led_classdev *led_cdev; member 37 struct led_classdev *led_cdev = activity_data->led_cdev; in led_activity_function() local 48 if (test_and_clear_bit(LED_BLINK_BRIGHTNESS_CHANGE, &led_cdev->work_flags)) in led_activity_function() 49 led_cdev->blink_brightness = led_cdev->new_blink_brightness; in led_activity_function() 53 led_set_brightness_nosleep(led_cdev, led_cdev->blink_brightness); in led_activity_function() 130 led_set_brightness_nosleep(led_cdev, in led_activity_function() 132 led_cdev->blink_brightness : LED_OFF); in led_activity_function() 187 static int activity_activate(struct led_classdev *led_cdev) in activity_activate() argument 195 led_set_trigger_data(led_cdev, activity_data); in activity_activate() 197 activity_data->led_cdev = led_cdev; in activity_activate() [all …]
|
D | ledtrig-panic.c | 22 static void led_trigger_set_panic(struct led_classdev *led_cdev) in led_trigger_set_panic() argument 29 if (led_cdev->trigger) in led_trigger_set_panic() 30 list_del(&led_cdev->trig_list); in led_trigger_set_panic() 31 list_add_tail(&led_cdev->trig_list, &trig->led_cdevs); in led_trigger_set_panic() 34 led_cdev->blink_delay_on = 0; in led_trigger_set_panic() 35 led_cdev->blink_delay_off = 0; in led_trigger_set_panic() 37 led_cdev->trigger = trig; in led_trigger_set_panic() 39 trig->activate(led_cdev); in led_trigger_set_panic() 47 struct led_classdev *led_cdev; in led_trigger_panic_notifier() local 49 list_for_each_entry(led_cdev, &leds_list, node) in led_trigger_panic_notifier() [all …]
|
D | ledtrig-transient.c | 29 struct led_classdev *led_cdev; member 36 struct led_classdev *led_cdev = transient_data->led_cdev; in transient_timer_function() local 39 led_set_brightness_nosleep(led_cdev, transient_data->restore_state); in transient_timer_function() 54 struct led_classdev *led_cdev = led_trigger_get_led(dev); in transient_activate_store() local 71 led_set_brightness_nosleep(led_cdev, in transient_activate_store() 80 led_set_brightness_nosleep(led_cdev, transient_data->state); in transient_activate_store() 163 static int transient_trig_activate(struct led_classdev *led_cdev) in transient_trig_activate() argument 171 led_set_trigger_data(led_cdev, tdata); in transient_trig_activate() 172 tdata->led_cdev = led_cdev; in transient_trig_activate() 179 static void transient_trig_deactivate(struct led_classdev *led_cdev) in transient_trig_deactivate() argument [all …]
|
D | ledtrig-netdev.c | 45 struct led_classdev *led_cdev; member 68 struct led_classdev *led_cdev = trigger_data->led_cdev; in set_baseline_state() local 70 current_brightness = led_cdev->brightness; in set_baseline_state() 72 led_cdev->blink_brightness = current_brightness; in set_baseline_state() 73 if (!led_cdev->blink_brightness) in set_baseline_state() 74 led_cdev->blink_brightness = led_cdev->max_brightness; in set_baseline_state() 77 led_set_brightness(led_cdev, LED_OFF); in set_baseline_state() 80 led_set_brightness(led_cdev, in set_baseline_state() 81 led_cdev->blink_brightness); in set_baseline_state() 83 led_set_brightness(led_cdev, LED_OFF); in set_baseline_state() [all …]
|
/drivers/media/v4l2-core/ |
D | v4l2-flash-led-class.c | 83 struct led_classdev *led_cdev; in v4l2_flash_set_led_brightness() local 111 led_cdev = &v4l2_flash->fled_cdev->led_cdev; in v4l2_flash_set_led_brightness() 116 led_cdev = v4l2_flash->iled_cdev; in v4l2_flash_set_led_brightness() 119 return led_set_brightness_sync(led_cdev, brightness); in v4l2_flash_set_led_brightness() 126 struct led_classdev *led_cdev; in v4l2_flash_update_led_brightness() local 142 led_cdev = &v4l2_flash->fled_cdev->led_cdev; in v4l2_flash_update_led_brightness() 147 led_cdev = v4l2_flash->iled_cdev; in v4l2_flash_update_led_brightness() 150 ret = led_update_brightness(led_cdev); in v4l2_flash_update_led_brightness() 157 led_cdev->brightness); in v4l2_flash_update_led_brightness() 160 led_cdev->brightness); in v4l2_flash_update_led_brightness() [all …]
|
/drivers/usb/core/ |
D | ledtrig-usbport.c | 17 struct led_classdev *led_cdev; member 72 struct led_classdev *led_cdev = usbport_data->led_cdev; in usbport_trig_update_count() local 76 led_set_brightness(led_cdev, usbport_data->count ? LED_FULL : LED_OFF); in usbport_trig_update_count() 132 struct device *dev = usbport_data->led_cdev->dev; in usbport_trig_port_observed() 187 struct led_classdev *led_cdev = usbport_data->led_cdev; in usbport_trig_add_port() local 218 err = sysfs_add_file_to_group(&led_cdev->dev->kobj, &port->attr.attr, in usbport_trig_add_port() 251 struct led_classdev *led_cdev = usbport_data->led_cdev; in usbport_trig_remove_port() local 254 sysfs_remove_file_from_group(&led_cdev->dev->kobj, &port->attr.attr, in usbport_trig_remove_port() 280 struct led_classdev *led_cdev = usbport_data->led_cdev; in usbport_trig_notify() local 290 led_set_brightness(led_cdev, LED_FULL); in usbport_trig_notify() [all …]
|
/drivers/leds/flash/ |
D | leds-sgm3140.c | 49 dev_err(fled_cdev->led_cdev.dev, in sgm3140_strobe_set() 63 dev_err(fled_cdev->led_cdev.dev, in sgm3140_strobe_set() 99 static int sgm3140_brightness_set(struct led_classdev *led_cdev, in sgm3140_brightness_set() argument 102 struct led_classdev_flash *fled_cdev = lcdev_to_flcdev(led_cdev); in sgm3140_brightness_set() 113 dev_err(led_cdev->dev, in sgm3140_brightness_set() 122 dev_err(led_cdev->dev, in sgm3140_brightness_set() 161 struct led_classdev *led_cdev = &priv->fled_cdev.led_cdev; in sgm3140_init_v4l2_flash_config() local 164 strscpy(v4l2_sd_cfg->dev_name, led_cdev->dev->kobj.name, in sgm3140_init_v4l2_flash_config() 185 struct led_classdev *led_cdev; in sgm3140_probe() local 239 led_cdev = &fled_cdev->led_cdev; in sgm3140_probe() [all …]
|
D | leds-aat1290.c | 91 struct led_classdev *led_cdev) in led_cdev_to_fled_cdev() argument 93 return container_of(led_cdev, struct led_classdev_flash, led_cdev); in led_cdev_to_fled_cdev() 140 static int aat1290_led_brightness_set(struct led_classdev *led_cdev, in aat1290_led_brightness_set() argument 143 struct led_classdev_flash *fled_cdev = led_cdev_to_fled_cdev(led_cdev); in aat1290_led_brightness_set() 176 struct led_classdev *led_cdev = &fled_cdev->led_cdev; in aat1290_led_flash_strobe_set() local 195 led_cdev->brightness = 0; in aat1290_led_flash_strobe_set() 402 struct led_classdev *led_cdev = &fled_cdev->led_cdev; in aat1290_led_external_strobe_set() local 409 led_cdev->brightness = 0; in aat1290_led_external_strobe_set() 425 struct led_classdev *led_cdev = &led->fled_cdev.led_cdev; in aat1290_init_v4l2_flash_config() local 428 strlcpy(v4l2_sd_cfg->dev_name, led_cdev->dev->kobj.name, in aat1290_init_v4l2_flash_config() [all …]
|
/drivers/net/wireless/mediatek/mt76/mt7615/ |
D | pci_init.c | 70 mt7615_led_set_config(struct led_classdev *led_cdev, in mt7615_led_set_config() argument 77 mt76 = container_of(led_cdev, struct mt76_dev, led_cdev); in mt7615_led_set_config() 103 mt7615_led_set_blink(struct led_classdev *led_cdev, in mt7615_led_set_blink() argument 112 mt7615_led_set_config(led_cdev, delta_on, delta_off); in mt7615_led_set_blink() 118 mt7615_led_set_brightness(struct led_classdev *led_cdev, in mt7615_led_set_brightness() argument 122 mt7615_led_set_config(led_cdev, 0, 0xff); in mt7615_led_set_brightness() 124 mt7615_led_set_config(led_cdev, 0xff, 0); in mt7615_led_set_brightness() 136 dev->mt76.led_cdev.brightness_set = mt7615_led_set_brightness; in mt7615_register_device() 137 dev->mt76.led_cdev.blink_set = mt7615_led_set_blink; in mt7615_register_device()
|