/kernel/linux/linux-5.10/drivers/leds/ |
D | led-core.c | 42 static int __led_set_brightness(struct led_classdev *led_cdev, in __led_set_brightness() argument 45 if (!led_cdev->brightness_set) in __led_set_brightness() 48 led_cdev->brightness_set(led_cdev, value); in __led_set_brightness() 53 static int __led_set_brightness_blocking(struct led_classdev *led_cdev, in __led_set_brightness_blocking() argument 56 if (!led_cdev->brightness_set_blocking) in __led_set_brightness_blocking() 59 return led_cdev->brightness_set_blocking(led_cdev, value); in __led_set_brightness_blocking() 64 struct led_classdev *led_cdev = from_timer(led_cdev, t, blink_timer); in led_timer_function() local 68 if (!led_cdev->blink_delay_on || !led_cdev->blink_delay_off) { in led_timer_function() 69 led_set_brightness_nosleep(led_cdev, LED_OFF); in led_timer_function() 70 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 | 18 struct led_classdev *led_cdev = &mcled_cdev->led_cdev; in led_mc_calc_color_components() local 24 led_cdev->max_brightness; in led_mc_calc_color_components() 34 struct led_classdev *led_cdev = dev_get_drvdata(dev); in multi_intensity_store() local 35 struct led_classdev_mc *mcled_cdev = lcdev_to_mccdev(led_cdev); in multi_intensity_store() 41 mutex_lock(&led_cdev->led_access); in multi_intensity_store() 62 led_set_brightness(led_cdev, led_cdev->brightness); in multi_intensity_store() 65 mutex_unlock(&led_cdev->led_access); in multi_intensity_store() 73 struct led_classdev *led_cdev = dev_get_drvdata(dev); in multi_intensity_show() local 74 struct led_classdev_mc *mcled_cdev = lcdev_to_mccdev(led_cdev); in multi_intensity_show() 94 struct led_classdev *led_cdev = dev_get_drvdata(dev); in multi_index_show() local [all …]
|
D | leds-mlxreg.c | 38 struct led_classdev led_cdev; member 44 #define cdev_to_priv(c) container_of(c, struct mlxreg_led_data, led_cdev) 118 dev_warn(led_data->led_cdev.dev, "Failed to get current brightness, error: %d\n", in mlxreg_led_get_hw() 189 struct led_classdev *led_cdev; in mlxreg_led_config() local 218 led_cdev = &led_data->led_cdev; in mlxreg_led_config() 233 led_cdev->name = led_data->led_cdev_name; in mlxreg_led_config() 234 led_cdev->brightness = brightness; in mlxreg_led_config() 235 led_cdev->max_brightness = LED_ON; in mlxreg_led_config() 236 led_cdev->brightness_set_blocking = in mlxreg_led_config() 238 led_cdev->brightness_get = mlxreg_led_brightness_get; in mlxreg_led_config() [all …]
|
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.h | 15 static inline int led_get_brightness(struct led_classdev *led_cdev) in led_get_brightness() argument 17 return led_cdev->brightness; in led_get_brightness() 20 void led_init_core(struct led_classdev *led_cdev); 21 void led_stop_software_blink(struct led_classdev *led_cdev); 22 void led_set_brightness_nopm(struct led_classdev *led_cdev, 24 void led_set_brightness_nosleep(struct led_classdev *led_cdev,
|
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-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-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 …]
|
/kernel/linux/linux-5.10/drivers/leds/trigger/ |
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-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-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 | 25 struct led_classdev *led_cdev; member 36 struct led_classdev *led_cdev; in led_heartbeat_function() local 40 led_cdev = heartbeat_data->led_cdev; in led_heartbeat_function() 43 led_set_brightness_nosleep(led_cdev, LED_OFF); in led_heartbeat_function() 47 if (test_and_clear_bit(LED_BLINK_BRIGHTNESS_CHANGE, &led_cdev->work_flags)) in led_heartbeat_function() 48 led_cdev->blink_brightness = led_cdev->new_blink_brightness; in led_heartbeat_function() 66 brightness = led_cdev->blink_brightness; in led_heartbeat_function() 72 brightness = led_cdev->blink_brightness; in led_heartbeat_function() 78 brightness = led_cdev->blink_brightness; in led_heartbeat_function() 85 brightness = led_cdev->blink_brightness; in led_heartbeat_function() [all …]
|
D | ledtrig-panic.c | 21 static void led_trigger_set_panic(struct led_classdev *led_cdev) in led_trigger_set_panic() argument 28 if (led_cdev->trigger) in led_trigger_set_panic() 29 list_del(&led_cdev->trig_list); in led_trigger_set_panic() 30 list_add_tail(&led_cdev->trig_list, &trig->led_cdevs); in led_trigger_set_panic() 33 led_cdev->blink_delay_on = 0; in led_trigger_set_panic() 34 led_cdev->blink_delay_off = 0; in led_trigger_set_panic() 36 led_cdev->trigger = trig; in led_trigger_set_panic() 38 trig->activate(led_cdev); in led_trigger_set_panic() 46 struct led_classdev *led_cdev; in led_trigger_panic_notifier() local 48 list_for_each_entry(led_cdev, &leds_list, node) in led_trigger_panic_notifier() [all …]
|
D | ledtrig-activity.c | 24 struct led_classdev *led_cdev; member 36 struct led_classdev *led_cdev = activity_data->led_cdev; in led_activity_function() local 47 if (test_and_clear_bit(LED_BLINK_BRIGHTNESS_CHANGE, &led_cdev->work_flags)) in led_activity_function() 48 led_cdev->blink_brightness = led_cdev->new_blink_brightness; in led_activity_function() 52 led_set_brightness_nosleep(led_cdev, led_cdev->blink_brightness); in led_activity_function() 129 led_set_brightness_nosleep(led_cdev, in led_activity_function() 131 led_cdev->blink_brightness : LED_OFF); in led_activity_function() 186 static int activity_activate(struct led_classdev *led_cdev) in activity_activate() argument 194 led_set_trigger_data(led_cdev, activity_data); in activity_activate() 196 activity_data->led_cdev = led_cdev; in activity_activate() [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 …]
|
/kernel/linux/linux-5.10/include/linux/ |
D | leds.h | 97 void (*brightness_set)(struct led_classdev *led_cdev, 103 int (*brightness_set_blocking)(struct led_classdev *led_cdev, 106 enum led_brightness (*brightness_get)(struct led_classdev *led_cdev); 116 int (*blink_set)(struct led_classdev *led_cdev, 120 int (*pattern_set)(struct led_classdev *led_cdev, 122 int (*pattern_clear)(struct led_classdev *led_cdev); 134 void (*flash_resume)(struct led_classdev *led_cdev); 174 struct led_classdev *led_cdev, 188 struct led_classdev *led_cdev) in led_classdev_register() argument 190 return led_classdev_register_ext(parent, led_cdev, NULL); in led_classdev_register() [all …]
|
/kernel/linux/linux-5.10/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 …]
|
/kernel/linux/linux-5.10/net/mac80211/ |
D | led.c | 52 static int ieee80211_tx_led_activate(struct led_classdev *led_cdev) in ieee80211_tx_led_activate() argument 54 struct ieee80211_local *local = container_of(led_cdev->trigger, in ieee80211_tx_led_activate() 63 static void ieee80211_tx_led_deactivate(struct led_classdev *led_cdev) in ieee80211_tx_led_deactivate() argument 65 struct ieee80211_local *local = container_of(led_cdev->trigger, in ieee80211_tx_led_deactivate() 72 static int ieee80211_rx_led_activate(struct led_classdev *led_cdev) in ieee80211_rx_led_activate() argument 74 struct ieee80211_local *local = container_of(led_cdev->trigger, in ieee80211_rx_led_activate() 83 static void ieee80211_rx_led_deactivate(struct led_classdev *led_cdev) in ieee80211_rx_led_deactivate() argument 85 struct ieee80211_local *local = container_of(led_cdev->trigger, in ieee80211_rx_led_deactivate() 92 static int ieee80211_assoc_led_activate(struct led_classdev *led_cdev) in ieee80211_assoc_led_activate() argument 94 struct ieee80211_local *local = container_of(led_cdev->trigger, in ieee80211_assoc_led_activate() [all …]
|
/kernel/linux/linux-5.10/drivers/media/v4l2-core/ |
D | v4l2-flash-led-class.c | 107 led_set_brightness_sync(&v4l2_flash->fled_cdev->led_cdev, in v4l2_flash_set_led_brightness() 119 struct led_classdev *led_cdev; in v4l2_flash_update_led_brightness() local 131 led_cdev = &v4l2_flash->fled_cdev->led_cdev; in v4l2_flash_update_led_brightness() 133 led_cdev = v4l2_flash->iled_cdev; in v4l2_flash_update_led_brightness() 136 ret = led_update_brightness(led_cdev); in v4l2_flash_update_led_brightness() 143 led_cdev->brightness); in v4l2_flash_update_led_brightness() 146 led_cdev->brightness); in v4l2_flash_update_led_brightness() 197 struct led_classdev *led_cdev = fled_cdev ? &fled_cdev->led_cdev : NULL; in v4l2_flash_s_ctrl() local 206 led_set_brightness_sync(led_cdev, LED_OFF); in v4l2_flash_s_ctrl() 210 led_set_brightness_sync(led_cdev, LED_OFF); in v4l2_flash_s_ctrl() [all …]
|