Home
last modified time | relevance | path

Searched refs:led (Results 1 - 25 of 566) sorted by relevance

12345678910>>...23

/kernel/linux/linux-5.10/drivers/leds/
H A Dleds-bd2802.c73 struct led_state led[2]; member
108 static inline int bd2802_is_rgb_off(struct bd2802_led *led, enum led_ids id, in bd2802_is_rgb_off() argument
113 return !led->led[id].r; in bd2802_is_rgb_off()
115 return !led->led[id].g; in bd2802_is_rgb_off()
117 return !led->led[id].b; in bd2802_is_rgb_off()
119 dev_err(&led->client->dev, "%s: Invalid color\n", __func__); in bd2802_is_rgb_off()
124 static inline int bd2802_is_led_off(struct bd2802_led *led, enu argument
132 bd2802_is_all_off(struct bd2802_led *led) bd2802_is_all_off() argument
171 bd2802_update_state(struct bd2802_led *led, enum led_ids id, enum led_colors color, enum led_bits led_bit) bd2802_update_state() argument
216 bd2802_configure(struct bd2802_led *led) bd2802_configure() argument
228 bd2802_reset_cancel(struct bd2802_led *led) bd2802_reset_cancel() argument
235 bd2802_enable(struct bd2802_led *led, enum led_ids id) bd2802_enable() argument
249 bd2802_set_on(struct bd2802_led *led, enum led_ids id, enum led_colors color) bd2802_set_on() argument
268 bd2802_set_blink(struct bd2802_led *led, enum led_ids id, enum led_colors color) bd2802_set_blink() argument
287 bd2802_turn_on(struct bd2802_led *led, enum led_ids id, enum led_colors color, enum led_bits led_bit) bd2802_turn_on() argument
302 bd2802_turn_off(struct bd2802_led *led, enum led_ids id, enum led_colors color) bd2802_turn_off() argument
388 bd2802_enable_adv_conf(struct bd2802_led *led) bd2802_enable_adv_conf() argument
415 bd2802_disable_adv_conf(struct bd2802_led *led) bd2802_disable_adv_conf() argument
432 struct bd2802_led *led = i2c_get_clientdata(to_i2c_client(dev)); bd2802_show_adv_conf() local
448 struct bd2802_led *led = i2c_get_clientdata(to_i2c_client(dev)); bd2802_store_adv_conf() local
555 bd2802_register_led_classdev(struct bd2802_led *led) bd2802_register_led_classdev() argument
649 bd2802_unregister_led_classdev(struct bd2802_led *led) bd2802_unregister_led_classdev() argument
662 struct bd2802_led *led; bd2802_probe() local
727 struct bd2802_led *led = i2c_get_clientdata(client); bd2802_remove() local
741 bd2802_restore_state(struct bd2802_led *led) bd2802_restore_state() argument
758 struct bd2802_led *led = i2c_get_clientdata(client); bd2802_suspend() local
768 struct bd2802_led *led = i2c_get_clientdata(client); bd2802_resume() local
[all...]
H A Dleds-lm3692x.c146 static int lm3692x_fault_check(struct lm3692x_led *led) in lm3692x_fault_check() argument
151 ret = regmap_read(led->regmap, LM3692X_FAULT_FLAGS, &read_buf); in lm3692x_fault_check()
156 dev_err(&led->client->dev, "Detected a fault 0x%X\n", read_buf); in lm3692x_fault_check()
161 regmap_read(led->regmap, LM3692X_FAULT_FLAGS, &read_buf); in lm3692x_fault_check()
163 dev_err(&led->client->dev, "Second read of fault flags 0x%X\n", in lm3692x_fault_check()
169 static int lm3692x_leds_enable(struct lm3692x_led *led) in lm3692x_leds_enable() argument
174 if (led->enabled) in lm3692x_leds_enable()
177 if (led->regulator) { in lm3692x_leds_enable()
178 ret = regulator_enable(led->regulator); in lm3692x_leds_enable()
180 dev_err(&led in lm3692x_leds_enable()
297 lm3692x_leds_disable(struct lm3692x_led *led) lm3692x_leds_disable() argument
328 struct lm3692x_led *led = lm3692x_brightness_set() local
365 lm3692x_max_brightness(struct lm3692x_led *led, u32 max_cur) lm3692x_max_brightness() argument
378 lm3692x_probe_dt(struct lm3692x_led *led) lm3692x_probe_dt() argument
463 struct lm3692x_led *led; lm3692x_probe() local
497 struct lm3692x_led *led = i2c_get_clientdata(client); lm3692x_remove() local
[all...]
H A Dleds-ns2.c56 static int ns2_led_get_mode(struct ns2_led *led, enum ns2_led_modes *mode) in ns2_led_get_mode() argument
62 cmd_level = gpiod_get_value_cansleep(led->cmd); in ns2_led_get_mode()
63 slow_level = gpiod_get_value_cansleep(led->slow); in ns2_led_get_mode()
65 for (i = 0; i < led->num_modes; i++) { in ns2_led_get_mode()
66 if (cmd_level == led->modval[i].cmd_level && in ns2_led_get_mode()
67 slow_level == led->modval[i].slow_level) { in ns2_led_get_mode()
68 *mode = led->modval[i].mode; in ns2_led_get_mode()
76 static void ns2_led_set_mode(struct ns2_led *led, enum ns2_led_modes mode) in ns2_led_set_mode() argument
81 for (i = 0; i < led->num_modes; i++) in ns2_led_set_mode()
82 if (mode == led in ns2_led_set_mode()
106 struct ns2_led *led = container_of(led_cdev, struct ns2_led, cdev); ns2_led_set() local
131 struct ns2_led *led = container_of(led_cdev, struct ns2_led, cdev); ns2_led_sata_store() local
162 struct ns2_led *led = container_of(led_cdev, struct ns2_led, cdev); ns2_led_sata_show() local
175 ns2_led_register(struct device *dev, struct fwnode_handle *node, struct ns2_led *led) ns2_led_register() argument
[all...]
H A Dleds-cpcap.c52 /* camera privacy led */
62 struct led_classdev led; member
81 static int cpcap_led_set_power(struct cpcap_led *led, bool status) in cpcap_led_set_power() argument
85 if (status == led->powered) in cpcap_led_set_power()
89 err = regulator_enable(led->vdd); in cpcap_led_set_power()
91 err = regulator_disable(led->vdd); in cpcap_led_set_power()
94 dev_err(led->dev, "regulator failure: %d", err); in cpcap_led_set_power()
98 led->powered = status; in cpcap_led_set_power()
105 struct cpcap_led *led = container_of(ledc, struct cpcap_led, led); in cpcap_led_set() local
161 struct cpcap_led *led; cpcap_led_probe() local
[all...]
H A Dleds-ktd2692.c12 #include <linux/led-class-flash.h>
95 static void ktd2692_expresswire_start(struct ktd2692_context *led) in ktd2692_expresswire_start() argument
97 gpiod_direction_output(led->ctrl_gpio, KTD2692_HIGH); in ktd2692_expresswire_start()
101 static void ktd2692_expresswire_reset(struct ktd2692_context *led) in ktd2692_expresswire_reset() argument
103 gpiod_direction_output(led->ctrl_gpio, KTD2692_LOW); in ktd2692_expresswire_reset()
107 static void ktd2692_expresswire_end(struct ktd2692_context *led) in ktd2692_expresswire_end() argument
109 gpiod_direction_output(led->ctrl_gpio, KTD2692_LOW); in ktd2692_expresswire_end()
111 gpiod_direction_output(led->ctrl_gpio, KTD2692_HIGH); in ktd2692_expresswire_end()
115 static void ktd2692_expresswire_set_bit(struct ktd2692_context *led, bool bit) in ktd2692_expresswire_set_bit() argument
134 gpiod_direction_output(led in ktd2692_expresswire_set_bit()
146 ktd2692_expresswire_write(struct ktd2692_context *led, u8 value) ktd2692_expresswire_write() argument
160 struct ktd2692_context *led = fled_cdev_to_led(fled_cdev); ktd2692_led_brightness_set() local
182 struct ktd2692_context *led = fled_cdev_to_led(fled_cdev); ktd2692_led_flash_strobe_set() local
247 ktd2692_setup(struct ktd2692_context *led) ktd2692_setup() argument
262 struct ktd2692_context *led = dev_get_drvdata(dev); regulator_disable_action() local
270 ktd2692_parse_dt(struct ktd2692_context *led, struct device *dev, struct ktd2692_led_config_data *cfg) ktd2692_parse_dt() argument
352 struct ktd2692_context *led; ktd2692_probe() local
396 struct ktd2692_context *led = platform_get_drvdata(pdev); ktd2692_remove() local
[all...]
H A Dleds-max77693.c11 #include <linux/led-class-flash.h>
20 #include <media/v4l2-flash-led-class.h>
80 /* sub led data */
140 static inline bool max77693_fled_used(struct max77693_led_device *led, in max77693_fled_used() argument
145 return led->fled_mask & fled_bit; in max77693_fled_used()
148 static int max77693_set_mode_reg(struct max77693_led_device *led, u8 mode) in max77693_set_mode_reg() argument
150 struct regmap *rmap = led->regmap; in max77693_set_mode_reg()
163 * camera sensors use torch led to fathom ambient light in max77693_set_mode_reg()
180 static int max77693_add_mode(struct max77693_led_device *led, u8 mode) in max77693_add_mode() argument
185 if (led in max77693_add_mode()
220 max77693_clear_mode(struct max77693_led_device *led, u8 mode) max77693_clear_mode() argument
232 max77693_add_allowed_modes(struct max77693_led_device *led, int fled_id, enum max77693_led_mode mode) max77693_add_allowed_modes() argument
242 max77693_distribute_currents(struct max77693_led_device *led, int fled_id, enum max77693_led_mode mode, u32 micro_amp, u32 iout_max[2], u32 iout[2]) max77693_distribute_currents() argument
266 max77693_set_torch_current(struct max77693_led_device *led, int fled_id, u32 micro_amp) max77693_set_torch_current() argument
292 max77693_set_flash_current(struct max77693_led_device *led, int fled_id, u32 micro_amp) max77693_set_flash_current() argument
320 max77693_set_timeout(struct max77693_led_device *led, u32 microsec) max77693_set_timeout() argument
337 max77693_get_strobe_status(struct max77693_led_device *led, bool *state) max77693_get_strobe_status() argument
355 struct max77693_led_device *led = sub_led_to_led(sub_led); max77693_get_flash_faults() local
390 max77693_setup(struct max77693_led_device *led, struct max77693_led_config_data *led_cfg) max77693_setup() argument
466 struct max77693_led_device *led = sub_led_to_led(sub_led); max77693_led_brightness_set() local
504 struct max77693_led_device *led = sub_led_to_led(sub_led); max77693_led_flash_brightness_set() local
519 struct max77693_led_device *led = sub_led_to_led(sub_led); max77693_led_flash_strobe_set() local
565 struct max77693_led_device *led = sub_led_to_led(sub_led); max77693_led_flash_strobe_get() local
587 struct max77693_led_device *led = sub_led_to_led(sub_led); max77693_led_flash_timeout_set() local
596 max77693_led_parse_dt(struct max77693_led_device *led, struct max77693_led_config_data *cfg, struct device_node **sub_nodes) max77693_led_parse_dt() argument
705 max77693_align_iout_current(struct max77693_led_device *led, u32 *iout, u32 min, u32 max, u32 step) max77693_align_iout_current() argument
728 max77693_led_validate_configuration(struct max77693_led_device *led, struct max77693_led_config_data *cfg) max77693_led_validate_configuration() argument
764 max77693_led_get_configuration(struct max77693_led_device *led, struct max77693_led_config_data *cfg, struct device_node **sub_nodes) max77693_led_get_configuration() argument
796 struct max77693_led_device *led = sub_led_to_led(sub_led); max77693_init_flash_settings() local
826 struct max77693_led_device *led = sub_led_to_led(sub_led); max77693_led_external_strobe_set() local
846 struct max77693_led_device *led = sub_led_to_led(sub_led); max77693_init_v4l2_flash_config() local
886 struct max77693_led_device *led = sub_led_to_led(sub_led); max77693_init_fled_cdev() local
916 struct max77693_led_device *led = sub_led_to_led(sub_led); max77693_register_led() local
949 struct max77693_led_device *led; max77693_led_probe() local
1021 struct max77693_led_device *led = platform_get_drvdata(pdev); max77693_led_remove() local
[all...]
H A Dleds-wm8350.c88 static int wm8350_led_enable(struct wm8350_led *led) in wm8350_led_enable() argument
92 if (led->enabled) in wm8350_led_enable()
95 ret = regulator_enable(led->isink); in wm8350_led_enable()
97 dev_err(led->cdev.dev, "Failed to enable ISINK: %d\n", ret); in wm8350_led_enable()
101 ret = regulator_enable(led->dcdc); in wm8350_led_enable()
103 dev_err(led->cdev.dev, "Failed to enable DCDC: %d\n", ret); in wm8350_led_enable()
104 regulator_disable(led->isink); in wm8350_led_enable()
108 led->enabled = 1; in wm8350_led_enable()
113 static int wm8350_led_disable(struct wm8350_led *led) in wm8350_led_disable() argument
117 if (!led in wm8350_led_disable()
144 struct wm8350_led *led = to_wm8350_led(led_cdev); wm8350_led_set() local
180 struct wm8350_led *led = platform_get_drvdata(pdev); wm8350_led_shutdown() local
189 struct wm8350_led *led; wm8350_led_probe() local
247 struct wm8350_led *led = platform_get_drvdata(pdev); wm8350_led_remove() local
[all...]
H A Dleds-lm3601x.c9 #include <linux/led-class-flash.h>
135 static int lm3601x_read_faults(struct lm3601x_led *led) in lm3601x_read_faults() argument
140 ret = regmap_read(led->regmap, LM3601X_FLAGS_REG, &flags_val); in lm3601x_read_faults()
144 led->last_flag = 0; in lm3601x_read_faults()
147 led->last_flag |= LED_FAULT_OVER_VOLTAGE; in lm3601x_read_faults()
150 led->last_flag |= LED_FAULT_OVER_TEMPERATURE; in lm3601x_read_faults()
153 led->last_flag |= LED_FAULT_SHORT_CIRCUIT; in lm3601x_read_faults()
156 led->last_flag |= LED_FAULT_OVER_CURRENT; in lm3601x_read_faults()
159 led->last_flag |= LED_FAULT_UNDER_VOLTAGE; in lm3601x_read_faults()
162 led in lm3601x_read_faults()
174 struct lm3601x_led *led = fled_cdev_to_led(fled_cdev); lm3601x_brightness_set() local
209 struct lm3601x_led *led = fled_cdev_to_led(fled_cdev); lm3601x_strobe_set() local
246 struct lm3601x_led *led = fled_cdev_to_led(fled_cdev); lm3601x_flash_brightness_set() local
272 struct lm3601x_led *led = fled_cdev_to_led(fled_cdev); lm3601x_flash_timeout_set() local
285 struct lm3601x_led *led = fled_cdev_to_led(fled_cdev); lm3601x_strobe_get() local
305 struct lm3601x_led *led = fled_cdev_to_led(fled_cdev); lm3601x_flash_fault_get() local
322 lm3601x_register_leds(struct lm3601x_led *led, struct fwnode_handle *fwnode) lm3601x_register_leds() argument
357 lm3601x_parse_node(struct lm3601x_led *led, struct fwnode_handle **fwnode) lm3601x_parse_node() argument
415 struct lm3601x_led *led; lm3601x_probe() local
445 struct lm3601x_led *led = i2c_get_clientdata(client); lm3601x_remove() local
[all...]
H A Dleds-aat1290.c12 #include <linux/led-class-flash.h>
20 #include <media/v4l2-flash-led-class.h>
96 static void aat1290_as2cwire_write(struct aat1290_led *led, int addr, int value) in aat1290_as2cwire_write() argument
100 gpiod_direction_output(led->gpio_fl_en, 0); in aat1290_as2cwire_write()
101 gpiod_direction_output(led->gpio_en_set, 0); in aat1290_as2cwire_write()
108 gpiod_direction_output(led->gpio_en_set, 0); in aat1290_as2cwire_write()
110 gpiod_direction_output(led->gpio_en_set, 1); in aat1290_as2cwire_write()
118 gpiod_direction_output(led->gpio_en_set, 0); in aat1290_as2cwire_write()
120 gpiod_direction_output(led->gpio_en_set, 1); in aat1290_as2cwire_write()
126 static void aat1290_set_flash_safety_timer(struct aat1290_led *led, in aat1290_set_flash_safety_timer() argument
144 struct aat1290_led *led = fled_cdev_to_led(fled_cdev); aat1290_led_brightness_set() local
175 struct aat1290_led *led = fled_cdev_to_led(fled_cdev); aat1290_led_flash_strobe_set() local
215 aat1290_led_parse_dt(struct aat1290_led *led, struct aat1290_led_config_data *cfg, struct device_node **sub_node) aat1290_led_parse_dt() argument
291 aat1290_led_validate_mm_current(struct aat1290_led *led, struct aat1290_led_config_data *cfg) aat1290_led_validate_mm_current() argument
308 init_mm_current_scale(struct aat1290_led *led, struct aat1290_led_config_data *cfg) init_mm_current_scale() argument
331 aat1290_led_get_configuration(struct aat1290_led *led, struct aat1290_led_config_data *cfg, struct device_node **sub_node) aat1290_led_get_configuration() argument
358 aat1290_init_flash_timeout(struct aat1290_led *led, struct aat1290_led_config_data *cfg) aat1290_init_flash_timeout() argument
378 struct aat1290_led *led = fled_cdev_to_led(fled_cdev); aat1290_intensity_to_brightness() local
392 struct aat1290_led *led = fled_cdev_to_led(fled_cdev); aat1290_brightness_to_intensity() local
400 struct aat1290_led *led = fled_cdev_to_led(v4l2_flash->fled_cdev); aat1290_led_external_strobe_set() local
421 aat1290_init_v4l2_flash_config(struct aat1290_led *led, struct aat1290_led_config_data *led_cfg, struct v4l2_flash_config *v4l2_sd_cfg) aat1290_init_v4l2_flash_config() argument
446 aat1290_init_v4l2_flash_config(struct aat1290_led *led, struct aat1290_led_config_data *led_cfg, struct v4l2_flash_config *v4l2_sd_cfg) aat1290_init_v4l2_flash_config() argument
463 struct aat1290_led *led; aat1290_led_probe() local
527 struct aat1290_led *led = platform_get_drvdata(pdev); aat1290_led_remove() local
[all...]
H A Dleds-regulator.c58 static void regulator_led_enable(struct regulator_led *led) in regulator_led_enable() argument
62 if (led->enabled) in regulator_led_enable()
65 ret = regulator_enable(led->vcc); in regulator_led_enable()
67 dev_err(led->cdev.dev, "Failed to enable vcc: %d\n", ret); in regulator_led_enable()
71 led->enabled = 1; in regulator_led_enable()
74 static void regulator_led_disable(struct regulator_led *led) in regulator_led_disable() argument
78 if (!led->enabled) in regulator_led_disable()
81 ret = regulator_disable(led->vcc); in regulator_led_disable()
83 dev_err(led->cdev.dev, "Failed to disable vcc: %d\n", ret); in regulator_led_disable()
87 led in regulator_led_disable()
93 struct regulator_led *led = to_regulator_led(led_cdev); regulator_led_brightness_set() local
126 struct regulator_led *led; regulator_led_probe() local
180 struct regulator_led *led = platform_get_drvdata(pdev); regulator_led_remove() local
[all...]
H A Dleds-lm3533.c59 static inline int lm3533_led_get_ctrlbank_id(struct lm3533_led *led) in lm3533_led_get_ctrlbank_id() argument
61 return led->id + 2; in lm3533_led_get_ctrlbank_id()
64 static inline u8 lm3533_led_get_lv_reg(struct lm3533_led *led, u8 base) in lm3533_led_get_lv_reg() argument
66 return base + led->id; in lm3533_led_get_lv_reg()
69 static inline u8 lm3533_led_get_pattern(struct lm3533_led *led) in lm3533_led_get_pattern() argument
71 return led->id; in lm3533_led_get_pattern()
74 static inline u8 lm3533_led_get_pattern_reg(struct lm3533_led *led, in lm3533_led_get_pattern_reg() argument
77 return base + lm3533_led_get_pattern(led) * LM3533_REG_PATTERN_STEP; in lm3533_led_get_pattern_reg()
80 static int lm3533_led_pattern_enable(struct lm3533_led *led, int enable) in lm3533_led_pattern_enable() argument
88 dev_dbg(led in lm3533_led_pattern_enable()
121 struct lm3533_led *led = to_lm3533_led(cdev); lm3533_led_set() local
133 struct lm3533_led *led = to_lm3533_led(cdev); lm3533_led_get() local
243 lm3533_led_delay_set(struct lm3533_led *led, u8 base, unsigned long *delay) lm3533_led_delay_set() argument
271 lm3533_led_delay_on_set(struct lm3533_led *led, unsigned long *t) lm3533_led_delay_on_set() argument
276 lm3533_led_delay_off_set(struct lm3533_led *led, unsigned long *t) lm3533_led_delay_off_set() argument
285 struct lm3533_led *led = to_lm3533_led(cdev); lm3533_led_blink_set() local
315 struct lm3533_led *led = to_lm3533_led(led_cdev); show_id() local
337 struct lm3533_led *led = to_lm3533_led(led_cdev); show_risefalltime() local
369 struct lm3533_led *led = to_lm3533_led(led_cdev); store_risefalltime() local
405 struct lm3533_led *led = to_lm3533_led(led_cdev); show_als_channel() local
426 struct lm3533_led *led = to_lm3533_led(led_cdev); store_als_channel() local
455 struct lm3533_led *led = to_lm3533_led(led_cdev); show_als_en() local
476 struct lm3533_led *led = to_lm3533_led(led_cdev); store_als_en() local
505 struct lm3533_led *led = to_lm3533_led(led_cdev); show_linear() local
529 struct lm3533_led *led = to_lm3533_led(led_cdev); store_linear() local
559 struct lm3533_led *led = to_lm3533_led(led_cdev); show_pwm() local
575 struct lm3533_led *led = to_lm3533_led(led_cdev); store_pwm() local
613 struct lm3533_led *led = to_lm3533_led(led_cdev); lm3533_led_attr_is_visible() local
635 lm3533_led_setup(struct lm3533_led *led, struct lm3533_led_platform_data *pdata) lm3533_led_setup() argument
651 struct lm3533_led *led; lm3533_led_probe() local
723 struct lm3533_led *led = platform_get_drvdata(pdev); lm3533_led_remove() local
736 struct lm3533_led *led = platform_get_drvdata(pdev); lm3533_led_shutdown() local
[all...]
H A Dleds-lm3697.c116 struct lm3697_led *led = container_of(led_cdev, struct lm3697_led, in lm3697_brightness_set() local
118 int ctrl_en_val = (1 << led->control_bank); in lm3697_brightness_set()
119 struct device *dev = led->priv->dev; in lm3697_brightness_set()
122 mutex_lock(&led->priv->lock); in lm3697_brightness_set()
125 ret = regmap_update_bits(led->priv->regmap, LM3697_CTRL_ENABLE, in lm3697_brightness_set()
132 led->enabled = LED_OFF; in lm3697_brightness_set()
134 ret = ti_lmu_common_set_brightness(&led->lmu_data, brt_val); in lm3697_brightness_set()
140 if (!led->enabled) { in lm3697_brightness_set()
141 ret = regmap_update_bits(led->priv->regmap, in lm3697_brightness_set()
149 led in lm3697_brightness_set()
161 struct lm3697_led *led; lm3697_init() local
198 struct lm3697_led *led; lm3697_probe_dt() local
298 struct lm3697 *led; lm3697_probe() local
334 struct lm3697 *led = i2c_get_clientdata(client); lm3697_remove() local
[all...]
/kernel/linux/linux-6.6/drivers/leds/
H A Dleds-bd2802.c73 struct led_state led[2]; member
108 static inline int bd2802_is_rgb_off(struct bd2802_led *led, enum led_ids id, in bd2802_is_rgb_off() argument
113 return !led->led[id].r; in bd2802_is_rgb_off()
115 return !led->led[id].g; in bd2802_is_rgb_off()
117 return !led->led[id].b; in bd2802_is_rgb_off()
119 dev_err(&led->client->dev, "%s: Invalid color\n", __func__); in bd2802_is_rgb_off()
124 static inline int bd2802_is_led_off(struct bd2802_led *led, enu argument
132 bd2802_is_all_off(struct bd2802_led *led) bd2802_is_all_off() argument
171 bd2802_update_state(struct bd2802_led *led, enum led_ids id, enum led_colors color, enum led_bits led_bit) bd2802_update_state() argument
216 bd2802_configure(struct bd2802_led *led) bd2802_configure() argument
228 bd2802_reset_cancel(struct bd2802_led *led) bd2802_reset_cancel() argument
235 bd2802_enable(struct bd2802_led *led, enum led_ids id) bd2802_enable() argument
249 bd2802_set_on(struct bd2802_led *led, enum led_ids id, enum led_colors color) bd2802_set_on() argument
268 bd2802_set_blink(struct bd2802_led *led, enum led_ids id, enum led_colors color) bd2802_set_blink() argument
287 bd2802_turn_on(struct bd2802_led *led, enum led_ids id, enum led_colors color, enum led_bits led_bit) bd2802_turn_on() argument
302 bd2802_turn_off(struct bd2802_led *led, enum led_ids id, enum led_colors color) bd2802_turn_off() argument
388 bd2802_enable_adv_conf(struct bd2802_led *led) bd2802_enable_adv_conf() argument
415 bd2802_disable_adv_conf(struct bd2802_led *led) bd2802_disable_adv_conf() argument
432 struct bd2802_led *led = i2c_get_clientdata(to_i2c_client(dev)); bd2802_show_adv_conf() local
448 struct bd2802_led *led = i2c_get_clientdata(to_i2c_client(dev)); bd2802_store_adv_conf() local
555 bd2802_register_led_classdev(struct bd2802_led *led) bd2802_register_led_classdev() argument
649 bd2802_unregister_led_classdev(struct bd2802_led *led) bd2802_unregister_led_classdev() argument
661 struct bd2802_led *led; bd2802_probe() local
726 struct bd2802_led *led = i2c_get_clientdata(client); bd2802_remove() local
738 bd2802_restore_state(struct bd2802_led *led) bd2802_restore_state() argument
755 struct bd2802_led *led = i2c_get_clientdata(client); bd2802_suspend() local
765 struct bd2802_led *led = i2c_get_clientdata(client); bd2802_resume() local
[all...]
H A Dleds-lm3692x.c145 static int lm3692x_fault_check(struct lm3692x_led *led) in lm3692x_fault_check() argument
150 ret = regmap_read(led->regmap, LM3692X_FAULT_FLAGS, &read_buf); in lm3692x_fault_check()
155 dev_err(&led->client->dev, "Detected a fault 0x%X\n", read_buf); in lm3692x_fault_check()
160 regmap_read(led->regmap, LM3692X_FAULT_FLAGS, &read_buf); in lm3692x_fault_check()
162 dev_err(&led->client->dev, "Second read of fault flags 0x%X\n", in lm3692x_fault_check()
168 static int lm3692x_leds_enable(struct lm3692x_led *led) in lm3692x_leds_enable() argument
173 if (led->enabled) in lm3692x_leds_enable()
176 if (led->regulator) { in lm3692x_leds_enable()
177 ret = regulator_enable(led->regulator); in lm3692x_leds_enable()
179 dev_err(&led in lm3692x_leds_enable()
296 lm3692x_leds_disable(struct lm3692x_led *led) lm3692x_leds_disable() argument
327 struct lm3692x_led *led = lm3692x_brightness_set() local
364 lm3692x_max_brightness(struct lm3692x_led *led, u32 max_cur) lm3692x_max_brightness() argument
377 lm3692x_probe_dt(struct lm3692x_led *led) lm3692x_probe_dt() argument
462 struct lm3692x_led *led; lm3692x_probe() local
496 struct lm3692x_led *led = i2c_get_clientdata(client); lm3692x_remove() local
[all...]
H A Dleds-ns2.c56 static int ns2_led_get_mode(struct ns2_led *led, enum ns2_led_modes *mode) in ns2_led_get_mode() argument
62 cmd_level = gpiod_get_value_cansleep(led->cmd); in ns2_led_get_mode()
63 slow_level = gpiod_get_value_cansleep(led->slow); in ns2_led_get_mode()
65 for (i = 0; i < led->num_modes; i++) { in ns2_led_get_mode()
66 if (cmd_level == led->modval[i].cmd_level && in ns2_led_get_mode()
67 slow_level == led->modval[i].slow_level) { in ns2_led_get_mode()
68 *mode = led->modval[i].mode; in ns2_led_get_mode()
76 static void ns2_led_set_mode(struct ns2_led *led, enum ns2_led_modes mode) in ns2_led_set_mode() argument
81 for (i = 0; i < led->num_modes; i++) in ns2_led_set_mode()
82 if (mode == led in ns2_led_set_mode()
106 struct ns2_led *led = container_of(led_cdev, struct ns2_led, cdev); ns2_led_set() local
131 struct ns2_led *led = container_of(led_cdev, struct ns2_led, cdev); ns2_led_sata_store() local
162 struct ns2_led *led = container_of(led_cdev, struct ns2_led, cdev); ns2_led_sata_show() local
175 ns2_led_register(struct device *dev, struct fwnode_handle *node, struct ns2_led *led) ns2_led_register() argument
[all...]
H A Dleds-cpcap.c52 /* camera privacy led */
62 struct led_classdev led; member
81 static int cpcap_led_set_power(struct cpcap_led *led, bool status) in cpcap_led_set_power() argument
85 if (status == led->powered) in cpcap_led_set_power()
89 err = regulator_enable(led->vdd); in cpcap_led_set_power()
91 err = regulator_disable(led->vdd); in cpcap_led_set_power()
94 dev_err(led->dev, "regulator failure: %d", err); in cpcap_led_set_power()
98 led->powered = status; in cpcap_led_set_power()
105 struct cpcap_led *led = container_of(ledc, struct cpcap_led, led); in cpcap_led_set() local
161 struct cpcap_led *led; cpcap_led_probe() local
[all...]
H A Dleds-wm8350.c88 static int wm8350_led_enable(struct wm8350_led *led) in wm8350_led_enable() argument
92 if (led->enabled) in wm8350_led_enable()
95 ret = regulator_enable(led->isink); in wm8350_led_enable()
97 dev_err(led->cdev.dev, "Failed to enable ISINK: %d\n", ret); in wm8350_led_enable()
101 ret = regulator_enable(led->dcdc); in wm8350_led_enable()
103 dev_err(led->cdev.dev, "Failed to enable DCDC: %d\n", ret); in wm8350_led_enable()
104 regulator_disable(led->isink); in wm8350_led_enable()
108 led->enabled = 1; in wm8350_led_enable()
113 static int wm8350_led_disable(struct wm8350_led *led) in wm8350_led_disable() argument
117 if (!led in wm8350_led_disable()
144 struct wm8350_led *led = to_wm8350_led(led_cdev); wm8350_led_set() local
180 struct wm8350_led *led = platform_get_drvdata(pdev); wm8350_led_shutdown() local
189 struct wm8350_led *led; wm8350_led_probe() local
247 struct wm8350_led *led = platform_get_drvdata(pdev); wm8350_led_remove() local
[all...]
H A Dleds-lm3533.c59 static inline int lm3533_led_get_ctrlbank_id(struct lm3533_led *led) in lm3533_led_get_ctrlbank_id() argument
61 return led->id + 2; in lm3533_led_get_ctrlbank_id()
64 static inline u8 lm3533_led_get_lv_reg(struct lm3533_led *led, u8 base) in lm3533_led_get_lv_reg() argument
66 return base + led->id; in lm3533_led_get_lv_reg()
69 static inline u8 lm3533_led_get_pattern(struct lm3533_led *led) in lm3533_led_get_pattern() argument
71 return led->id; in lm3533_led_get_pattern()
74 static inline u8 lm3533_led_get_pattern_reg(struct lm3533_led *led, in lm3533_led_get_pattern_reg() argument
77 return base + lm3533_led_get_pattern(led) * LM3533_REG_PATTERN_STEP; in lm3533_led_get_pattern_reg()
80 static int lm3533_led_pattern_enable(struct lm3533_led *led, int enable) in lm3533_led_pattern_enable() argument
88 dev_dbg(led in lm3533_led_pattern_enable()
121 struct lm3533_led *led = to_lm3533_led(cdev); lm3533_led_set() local
133 struct lm3533_led *led = to_lm3533_led(cdev); lm3533_led_get() local
243 lm3533_led_delay_set(struct lm3533_led *led, u8 base, unsigned long *delay) lm3533_led_delay_set() argument
271 lm3533_led_delay_on_set(struct lm3533_led *led, unsigned long *t) lm3533_led_delay_on_set() argument
276 lm3533_led_delay_off_set(struct lm3533_led *led, unsigned long *t) lm3533_led_delay_off_set() argument
285 struct lm3533_led *led = to_lm3533_led(cdev); lm3533_led_blink_set() local
315 struct lm3533_led *led = to_lm3533_led(led_cdev); show_id() local
337 struct lm3533_led *led = to_lm3533_led(led_cdev); show_risefalltime() local
369 struct lm3533_led *led = to_lm3533_led(led_cdev); store_risefalltime() local
405 struct lm3533_led *led = to_lm3533_led(led_cdev); show_als_channel() local
426 struct lm3533_led *led = to_lm3533_led(led_cdev); store_als_channel() local
455 struct lm3533_led *led = to_lm3533_led(led_cdev); show_als_en() local
476 struct lm3533_led *led = to_lm3533_led(led_cdev); store_als_en() local
505 struct lm3533_led *led = to_lm3533_led(led_cdev); show_linear() local
529 struct lm3533_led *led = to_lm3533_led(led_cdev); store_linear() local
559 struct lm3533_led *led = to_lm3533_led(led_cdev); show_pwm() local
575 struct lm3533_led *led = to_lm3533_led(led_cdev); store_pwm() local
613 struct lm3533_led *led = to_lm3533_led(led_cdev); lm3533_led_attr_is_visible() local
635 lm3533_led_setup(struct lm3533_led *led, struct lm3533_led_platform_data *pdata) lm3533_led_setup() argument
651 struct lm3533_led *led; lm3533_led_probe() local
723 struct lm3533_led *led = platform_get_drvdata(pdev); lm3533_led_remove() local
736 struct lm3533_led *led = platform_get_drvdata(pdev); lm3533_led_shutdown() local
[all...]
H A Dleds-lm3697.c125 struct lm3697_led *led = container_of(led_cdev, struct lm3697_led, in lm3697_brightness_set() local
127 int ctrl_en_val = (1 << led->control_bank); in lm3697_brightness_set()
128 struct device *dev = led->priv->dev; in lm3697_brightness_set()
131 mutex_lock(&led->priv->lock); in lm3697_brightness_set()
134 ret = regmap_update_bits(led->priv->regmap, LM3697_CTRL_ENABLE, in lm3697_brightness_set()
141 led->enabled = LED_OFF; in lm3697_brightness_set()
143 ret = ti_lmu_common_set_brightness(&led->lmu_data, brt_val); in lm3697_brightness_set()
149 if (!led->enabled) { in lm3697_brightness_set()
150 ret = regmap_update_bits(led->priv->regmap, in lm3697_brightness_set()
158 led in lm3697_brightness_set()
170 struct lm3697_led *led; lm3697_init() local
207 struct lm3697_led *led; lm3697_probe_dt() local
305 struct lm3697 *led; lm3697_probe() local
341 struct lm3697 *led = i2c_get_clientdata(client); lm3697_remove() local
[all...]
/kernel/linux/linux-6.6/drivers/leds/flash/
H A Dleds-ktd2692.c12 #include <linux/led-class-flash.h>
95 static void ktd2692_expresswire_start(struct ktd2692_context *led) in ktd2692_expresswire_start() argument
97 gpiod_direction_output(led->ctrl_gpio, KTD2692_HIGH); in ktd2692_expresswire_start()
101 static void ktd2692_expresswire_reset(struct ktd2692_context *led) in ktd2692_expresswire_reset() argument
103 gpiod_direction_output(led->ctrl_gpio, KTD2692_LOW); in ktd2692_expresswire_reset()
107 static void ktd2692_expresswire_end(struct ktd2692_context *led) in ktd2692_expresswire_end() argument
109 gpiod_direction_output(led->ctrl_gpio, KTD2692_LOW); in ktd2692_expresswire_end()
111 gpiod_direction_output(led->ctrl_gpio, KTD2692_HIGH); in ktd2692_expresswire_end()
115 static void ktd2692_expresswire_set_bit(struct ktd2692_context *led, bool bit) in ktd2692_expresswire_set_bit() argument
134 gpiod_direction_output(led in ktd2692_expresswire_set_bit()
146 ktd2692_expresswire_write(struct ktd2692_context *led, u8 value) ktd2692_expresswire_write() argument
160 struct ktd2692_context *led = fled_cdev_to_led(fled_cdev); ktd2692_led_brightness_set() local
182 struct ktd2692_context *led = fled_cdev_to_led(fled_cdev); ktd2692_led_flash_strobe_set() local
247 ktd2692_setup(struct ktd2692_context *led) ktd2692_setup() argument
262 struct ktd2692_context *led = dev_get_drvdata(dev); regulator_disable_action() local
270 ktd2692_parse_dt(struct ktd2692_context *led, struct device *dev, struct ktd2692_led_config_data *cfg) ktd2692_parse_dt() argument
347 struct ktd2692_context *led; ktd2692_probe() local
391 struct ktd2692_context *led = platform_get_drvdata(pdev); ktd2692_remove() local
[all...]
H A Dleds-max77693.c11 #include <linux/led-class-flash.h>
20 #include <media/v4l2-flash-led-class.h>
80 /* sub led data */
140 static inline bool max77693_fled_used(struct max77693_led_device *led, in max77693_fled_used() argument
145 return led->fled_mask & fled_bit; in max77693_fled_used()
148 static int max77693_set_mode_reg(struct max77693_led_device *led, u8 mode) in max77693_set_mode_reg() argument
150 struct regmap *rmap = led->regmap; in max77693_set_mode_reg()
163 * camera sensors use torch led to fathom ambient light in max77693_set_mode_reg()
180 static int max77693_add_mode(struct max77693_led_device *led, u8 mode) in max77693_add_mode() argument
185 if (led in max77693_add_mode()
220 max77693_clear_mode(struct max77693_led_device *led, u8 mode) max77693_clear_mode() argument
232 max77693_add_allowed_modes(struct max77693_led_device *led, int fled_id, enum max77693_led_mode mode) max77693_add_allowed_modes() argument
242 max77693_distribute_currents(struct max77693_led_device *led, int fled_id, enum max77693_led_mode mode, u32 micro_amp, u32 iout_max[2], u32 iout[2]) max77693_distribute_currents() argument
266 max77693_set_torch_current(struct max77693_led_device *led, int fled_id, u32 micro_amp) max77693_set_torch_current() argument
292 max77693_set_flash_current(struct max77693_led_device *led, int fled_id, u32 micro_amp) max77693_set_flash_current() argument
320 max77693_set_timeout(struct max77693_led_device *led, u32 microsec) max77693_set_timeout() argument
337 max77693_get_strobe_status(struct max77693_led_device *led, bool *state) max77693_get_strobe_status() argument
355 struct max77693_led_device *led = sub_led_to_led(sub_led); max77693_get_flash_faults() local
390 max77693_setup(struct max77693_led_device *led, struct max77693_led_config_data *led_cfg) max77693_setup() argument
466 struct max77693_led_device *led = sub_led_to_led(sub_led); max77693_led_brightness_set() local
504 struct max77693_led_device *led = sub_led_to_led(sub_led); max77693_led_flash_brightness_set() local
519 struct max77693_led_device *led = sub_led_to_led(sub_led); max77693_led_flash_strobe_set() local
565 struct max77693_led_device *led = sub_led_to_led(sub_led); max77693_led_flash_strobe_get() local
587 struct max77693_led_device *led = sub_led_to_led(sub_led); max77693_led_flash_timeout_set() local
596 max77693_led_parse_dt(struct max77693_led_device *led, struct max77693_led_config_data *cfg, struct device_node **sub_nodes) max77693_led_parse_dt() argument
705 max77693_align_iout_current(struct max77693_led_device *led, u32 *iout, u32 min, u32 max, u32 step) max77693_align_iout_current() argument
728 max77693_led_validate_configuration(struct max77693_led_device *led, struct max77693_led_config_data *cfg) max77693_led_validate_configuration() argument
764 max77693_led_get_configuration(struct max77693_led_device *led, struct max77693_led_config_data *cfg, struct device_node **sub_nodes) max77693_led_get_configuration() argument
796 struct max77693_led_device *led = sub_led_to_led(sub_led); max77693_init_flash_settings() local
826 struct max77693_led_device *led = sub_led_to_led(sub_led); max77693_led_external_strobe_set() local
846 struct max77693_led_device *led = sub_led_to_led(sub_led); max77693_init_v4l2_flash_config() local
886 struct max77693_led_device *led = sub_led_to_led(sub_led); max77693_init_fled_cdev() local
916 struct max77693_led_device *led = sub_led_to_led(sub_led); max77693_register_led() local
949 struct max77693_led_device *led; max77693_led_probe() local
1021 struct max77693_led_device *led = platform_get_drvdata(pdev); max77693_led_remove() local
[all...]
H A Dleds-lm3601x.c9 #include <linux/led-class-flash.h>
135 static int lm3601x_read_faults(struct lm3601x_led *led) in lm3601x_read_faults() argument
140 ret = regmap_read(led->regmap, LM3601X_FLAGS_REG, &flags_val); in lm3601x_read_faults()
144 led->last_flag = 0; in lm3601x_read_faults()
147 led->last_flag |= LED_FAULT_OVER_VOLTAGE; in lm3601x_read_faults()
150 led->last_flag |= LED_FAULT_OVER_TEMPERATURE; in lm3601x_read_faults()
153 led->last_flag |= LED_FAULT_SHORT_CIRCUIT; in lm3601x_read_faults()
156 led->last_flag |= LED_FAULT_OVER_CURRENT; in lm3601x_read_faults()
159 led->last_flag |= LED_FAULT_UNDER_VOLTAGE; in lm3601x_read_faults()
162 led in lm3601x_read_faults()
174 struct lm3601x_led *led = fled_cdev_to_led(fled_cdev); lm3601x_brightness_set() local
209 struct lm3601x_led *led = fled_cdev_to_led(fled_cdev); lm3601x_strobe_set() local
246 struct lm3601x_led *led = fled_cdev_to_led(fled_cdev); lm3601x_flash_brightness_set() local
272 struct lm3601x_led *led = fled_cdev_to_led(fled_cdev); lm3601x_flash_timeout_set() local
285 struct lm3601x_led *led = fled_cdev_to_led(fled_cdev); lm3601x_strobe_get() local
305 struct lm3601x_led *led = fled_cdev_to_led(fled_cdev); lm3601x_flash_fault_get() local
322 lm3601x_register_leds(struct lm3601x_led *led, struct fwnode_handle *fwnode) lm3601x_register_leds() argument
357 lm3601x_parse_node(struct lm3601x_led *led, struct fwnode_handle **fwnode) lm3601x_parse_node() argument
415 struct lm3601x_led *led; lm3601x_probe() local
445 struct lm3601x_led *led = i2c_get_clientdata(client); lm3601x_remove() local
[all...]
H A Dleds-aat1290.c12 #include <linux/led-class-flash.h>
20 #include <media/v4l2-flash-led-class.h>
96 static void aat1290_as2cwire_write(struct aat1290_led *led, int addr, int value) in aat1290_as2cwire_write() argument
100 gpiod_direction_output(led->gpio_fl_en, 0); in aat1290_as2cwire_write()
101 gpiod_direction_output(led->gpio_en_set, 0); in aat1290_as2cwire_write()
108 gpiod_direction_output(led->gpio_en_set, 0); in aat1290_as2cwire_write()
110 gpiod_direction_output(led->gpio_en_set, 1); in aat1290_as2cwire_write()
118 gpiod_direction_output(led->gpio_en_set, 0); in aat1290_as2cwire_write()
120 gpiod_direction_output(led->gpio_en_set, 1); in aat1290_as2cwire_write()
126 static void aat1290_set_flash_safety_timer(struct aat1290_led *led, in aat1290_set_flash_safety_timer() argument
144 struct aat1290_led *led = fled_cdev_to_led(fled_cdev); aat1290_led_brightness_set() local
175 struct aat1290_led *led = fled_cdev_to_led(fled_cdev); aat1290_led_flash_strobe_set() local
215 aat1290_led_parse_dt(struct aat1290_led *led, struct aat1290_led_config_data *cfg, struct device_node **sub_node) aat1290_led_parse_dt() argument
291 aat1290_led_validate_mm_current(struct aat1290_led *led, struct aat1290_led_config_data *cfg) aat1290_led_validate_mm_current() argument
308 init_mm_current_scale(struct aat1290_led *led, struct aat1290_led_config_data *cfg) init_mm_current_scale() argument
331 aat1290_led_get_configuration(struct aat1290_led *led, struct aat1290_led_config_data *cfg, struct device_node **sub_node) aat1290_led_get_configuration() argument
358 aat1290_init_flash_timeout(struct aat1290_led *led, struct aat1290_led_config_data *cfg) aat1290_init_flash_timeout() argument
378 struct aat1290_led *led = fled_cdev_to_led(fled_cdev); aat1290_intensity_to_brightness() local
392 struct aat1290_led *led = fled_cdev_to_led(fled_cdev); aat1290_brightness_to_intensity() local
400 struct aat1290_led *led = fled_cdev_to_led(v4l2_flash->fled_cdev); aat1290_led_external_strobe_set() local
421 aat1290_init_v4l2_flash_config(struct aat1290_led *led, struct aat1290_led_config_data *led_cfg, struct v4l2_flash_config *v4l2_sd_cfg) aat1290_init_v4l2_flash_config() argument
446 aat1290_init_v4l2_flash_config(struct aat1290_led *led, struct aat1290_led_config_data *led_cfg, struct v4l2_flash_config *v4l2_sd_cfg) aat1290_init_v4l2_flash_config() argument
463 struct aat1290_led *led; aat1290_led_probe() local
527 struct aat1290_led *led = platform_get_drvdata(pdev); aat1290_led_remove() local
[all...]
/kernel/linux/linux-5.10/drivers/net/wireless/broadcom/b43/
H A Dleds.c48 struct b43_led *led) in b43_led_update()
53 if (!led->wl) in b43_led_update()
58 /* The led->state read is racy, but we don't care. In case we raced in b43_led_update()
62 turn_on = atomic_read(&led->state) != LED_OFF; in b43_led_update()
65 if (turn_on == led->hw_state) in b43_led_update()
67 led->hw_state = turn_on; in b43_led_update()
70 b43_led_turn_on(dev, led->index, led->activelow); in b43_led_update()
72 b43_led_turn_off(dev, led->index, led in b43_led_update()
47 b43_led_update(struct b43_wldev *dev, struct b43_led *led) b43_led_update() argument
99 struct b43_led *led = container_of(led_dev, struct b43_led, led_dev); b43_led_brightness_set() local
108 b43_register_led(struct b43_wldev *dev, struct b43_led *led, const char *name, const char *default_trigger, u8 led_index, bool activelow) b43_register_led() argument
138 b43_unregister_led(struct b43_led *led) b43_unregister_led() argument
251 struct b43_led *led; b43_leds_init() local
[all...]
/kernel/linux/linux-6.6/drivers/net/wireless/broadcom/b43/
H A Dleds.c48 struct b43_led *led) in b43_led_update()
53 if (!led->wl) in b43_led_update()
58 /* The led->state read is racy, but we don't care. In case we raced in b43_led_update()
62 turn_on = atomic_read(&led->state) != LED_OFF; in b43_led_update()
65 if (turn_on == led->hw_state) in b43_led_update()
67 led->hw_state = turn_on; in b43_led_update()
70 b43_led_turn_on(dev, led->index, led->activelow); in b43_led_update()
72 b43_led_turn_off(dev, led->index, led in b43_led_update()
47 b43_led_update(struct b43_wldev *dev, struct b43_led *led) b43_led_update() argument
99 struct b43_led *led = container_of(led_dev, struct b43_led, led_dev); b43_led_brightness_set() local
108 b43_register_led(struct b43_wldev *dev, struct b43_led *led, const char *name, const char *default_trigger, u8 led_index, bool activelow) b43_register_led() argument
138 b43_unregister_led(struct b43_led *led) b43_unregister_led() argument
251 struct b43_led *led; b43_leds_init() local
[all...]

Completed in 14 milliseconds

12345678910>>...23