Home
last modified time | relevance | path

Searched refs:led (Results 1 – 25 of 918) sorted by relevance

12345678910>>...37

/linux/drivers/leds/
H A Dleds-lm3692x.c147 static int lm3692x_fault_check(struct lm3692x_led *led) in lm3692x_fault_check() argument
152 ret = regmap_read(led->regmap, LM3692X_FAULT_FLAGS, &read_buf); in lm3692x_fault_check()
157 dev_err(&led->client->dev, "Detected a fault 0x%X\n", read_buf); in lm3692x_fault_check()
162 regmap_read(led->regmap, LM3692X_FAULT_FLAGS, &read_buf); in lm3692x_fault_check()
164 dev_err(&led->client->dev, "Second read of fault flags 0x%X\n", in lm3692x_fault_check()
170 static int lm3692x_leds_enable(struct lm3692x_led *led) in lm3692x_leds_enable() argument
175 if (led->enabled) in lm3692x_leds_enable()
178 if (led->regulator) { in lm3692x_leds_enable()
179 ret = regulator_enable(led->regulator); in lm3692x_leds_enable()
181 dev_err(&led in lm3692x_leds_enable()
298 lm3692x_leds_disable(struct lm3692x_led * led) lm3692x_leds_disable() argument
329 struct lm3692x_led *led = lm3692x_brightness_set() local
366 lm3692x_max_brightness(struct lm3692x_led * led,u32 max_cur) lm3692x_max_brightness() argument
379 lm3692x_probe_dt(struct lm3692x_led * led) lm3692x_probe_dt() argument
464 struct lm3692x_led *led; lm3692x_probe() local
498 struct lm3692x_led *led = i2c_get_clientdata(client); lm3692x_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-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-max8997.c47 static void max8997_led_set_mode(struct max8997_led *led, in max8997_led_set_mode() argument
51 struct i2c_client *client = led->iodev->i2c; in max8997_led_set_mode()
57 val = led->id ? in max8997_led_set_mode()
59 led->cdev.max_brightness = MAX8997_LED_FLASH_MAX_BRIGHTNESS; in max8997_led_set_mode()
63 val = led->id ? in max8997_led_set_mode()
65 led->cdev.max_brightness = MAX8997_LED_MOVIE_MAX_BRIGHTNESS; in max8997_led_set_mode()
70 val = led->id ? in max8997_led_set_mode()
72 led->cdev.max_brightness = MAX8997_LED_FLASH_MAX_BRIGHTNESS; in max8997_led_set_mode()
77 val = led->id ? in max8997_led_set_mode()
79 led in max8997_led_set_mode()
97 max8997_led_enable(struct max8997_led * led,bool enable) max8997_led_enable() argument
116 max8997_led_set_current(struct max8997_led * led,enum led_brightness value) max8997_led_set_current() argument
151 struct max8997_led *led = max8997_led_brightness_set() local
167 struct max8997_led *led = mode_show() local
201 struct max8997_led *led = mode_store() local
237 struct max8997_led *led; max8997_led_probe() 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
176 ns2_led_register(struct device * dev,struct fwnode_handle * node,struct ns2_led * led) ns2_led_register() argument
[all...]
H A Dleds-lm3533.c66 static inline int lm3533_led_get_ctrlbank_id(struct lm3533_led *led) in lm3533_led_get_lv_reg()
68 return led->id + 2;
71 static inline u8 lm3533_led_get_lv_reg(struct lm3533_led *led, u8 base) in lm3533_led_get_pattern()
73 return base + led->id;
76 static inline u8 lm3533_led_get_pattern(struct lm3533_led *led) in lm3533_led_get_pattern_reg()
78 return led->id; in lm3533_led_get_pattern_reg()
81 static inline u8 lm3533_led_get_pattern_reg(struct lm3533_led *led, in lm3533_led_pattern_enable()
84 return base + lm3533_led_get_pattern(led) * LM3533_REG_PATTERN_STEP; in lm3533_led_pattern_enable()
87 static int lm3533_led_pattern_enable(struct lm3533_led *led, int enable) in lm3533_led_pattern_enable()
94 dev_dbg(led in lm3533_led_pattern_enable()
59 lm3533_led_get_ctrlbank_id(struct lm3533_led * led) lm3533_led_get_ctrlbank_id() argument
64 lm3533_led_get_lv_reg(struct lm3533_led * led,u8 base) lm3533_led_get_lv_reg() argument
69 lm3533_led_get_pattern(struct lm3533_led * led) lm3533_led_get_pattern() argument
74 lm3533_led_get_pattern_reg(struct lm3533_led * led,u8 base) lm3533_led_get_pattern_reg() argument
80 lm3533_led_pattern_enable(struct lm3533_led * led,int enable) lm3533_led_pattern_enable() argument
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
734 struct lm3533_led *led = platform_get_drvdata(pdev); lm3533_led_shutdown() local
[all...]
H A Dleds-lm3697.c124 struct lm3697_led *led = container_of(led_cdev, struct lm3697_led, in lm3697_brightness_set() local
126 int ctrl_en_val = (1 << led->control_bank); in lm3697_brightness_set()
127 struct device *dev = led->priv->dev; in lm3697_brightness_set()
130 mutex_lock(&led->priv->lock); in lm3697_brightness_set()
133 ret = regmap_update_bits(led->priv->regmap, LM3697_CTRL_ENABLE, in lm3697_brightness_set()
140 led->enabled = LED_OFF; in lm3697_brightness_set()
142 ret = ti_lmu_common_set_brightness(&led->lmu_data, brt_val); in lm3697_brightness_set()
148 if (!led->enabled) { in lm3697_brightness_set()
149 ret = regmap_update_bits(led->priv->regmap, in lm3697_brightness_set()
157 led in lm3697_brightness_set()
169 struct lm3697_led *led; lm3697_init() local
205 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...]
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
128 struct regulator_led *led; regulator_led_probe() local
177 struct regulator_led *led = platform_get_drvdata(pdev); regulator_led_remove() local
[all...]
H A Dleds-el15203000.c87 static int el15203000_cmd(struct el15203000_led *led, u8 brightness) in el15203000_cmd() argument
93 mutex_lock(&led->priv->lock); in el15203000_cmd()
95 dev_dbg(led->priv->dev, "Set brightness of 0x%02x(%c) to 0x%02x(%c)", in el15203000_cmd()
96 led->reg, led->reg, brightness, brightness); in el15203000_cmd()
99 if (time_after(led->priv->delay, jiffies)) { in el15203000_cmd()
100 dev_dbg(led->priv->dev, "Wait %luus to sync", in el15203000_cmd()
107 cmd[0] = led->reg; in el15203000_cmd()
115 ret = spi_write(led->priv->spi, &cmd[i], sizeof(cmd[i])); in el15203000_cmd()
117 dev_err(led in el15203000_cmd()
133 struct el15203000_led *led = to_el15203000_led(ldev); el15203000_set_blocking() local
142 struct el15203000_led *led = to_el15203000_led(ldev); el15203000_pattern_set_S() local
193 struct el15203000_led *led = to_el15203000_led(ldev); el15203000_pattern_set_P() local
231 struct el15203000_led *led = to_el15203000_led(ldev); el15203000_pattern_clear() local
238 struct el15203000_led *led = priv->leds; el15203000_probe_dt() local
[all...]
H A Dleds-wm831x-status.c38 static void wm831x_status_set(struct wm831x_status *led) in wm831x_status_set() argument
42 mutex_lock(&led->mutex); in wm831x_status_set()
44 led->reg_val &= ~(WM831X_LED_SRC_MASK | WM831X_LED_MODE_MASK | in wm831x_status_set()
47 spin_lock_irqsave(&led->value_lock, flags); in wm831x_status_set()
49 led->reg_val |= led->src << WM831X_LED_SRC_SHIFT; in wm831x_status_set()
50 if (led->blink) { in wm831x_status_set()
51 led->reg_val |= 2 << WM831X_LED_MODE_SHIFT; in wm831x_status_set()
52 led->reg_val |= led in wm831x_status_set()
69 struct wm831x_status *led = to_wm831x_status(led_cdev); wm831x_status_brightness_set() local
86 struct wm831x_status *led = to_wm831x_status(led_cdev); wm831x_status_blink_set() local
162 struct wm831x_status *led = to_wm831x_status(led_cdev); src_show() local
186 struct wm831x_status *led = to_wm831x_status(led_cdev); src_store() local
[all...]
H A Dleds-bcm6328.c110 static void bcm6328_led_mode(struct bcm6328_led *led, unsigned long value) in bcm6328_led_mode() argument
115 shift = bcm6328_pin2shift(led->pin); in bcm6328_led_mode()
117 mode = led->mem + BCM6328_REG_MODE_HI; in bcm6328_led_mode()
119 mode = led->mem + BCM6328_REG_MODE_LO; in bcm6328_led_mode()
130 struct bcm6328_led *led = in bcm6328_led_set() local
134 spin_lock_irqsave(led->lock, flags); in bcm6328_led_set()
137 led->blink_leds[0] &= ~BIT(led->pin); in bcm6328_led_set()
138 led->blink_leds[1] &= ~BIT(led in bcm6328_led_set()
165 struct bcm6328_led *led = bcm6328_blink_set() local
332 struct bcm6328_led *led; bcm6328_led() local
[all...]
H A Dleds-pca963x.c30 #include <linux/led-class-multicolor.h>
122 static int pca963x_brightness(struct pca963x_led *led, unsigned int led_num, in pca963x_brightness() argument
125 struct i2c_client *client = led->chip->client; in pca963x_brightness()
126 struct pca963x_chipdef *chipdef = led->chip->chipdef; in pca963x_brightness()
138 if (led->blinking) { in pca963x_brightness()
152 led->blinking = false; in pca963x_brightness()
162 if (led->blinking) in pca963x_brightness()
174 static void pca963x_blink(struct pca963x_led *led) in pca963x_blink() argument
176 struct i2c_client *client = led->chip->client; in pca963x_blink()
177 struct pca963x_chipdef *chipdef = led in pca963x_blink()
206 pca963x_track_power_state(struct pca963x_led * led,unsigned int led_num,enum led_brightness brightness) pca963x_track_power_state() argument
217 pca963x_sync_power_state(struct pca963x_led * led,unsigned long cached_leds) pca963x_sync_power_state() argument
231 struct pca963x_led *led; pca963x_led_set() local
256 struct pca963x_led *led = container_of(mc_cdev, struct pca963x_led, mc_cdev); pca963x_led_mc_set() local
286 pca963x_period_scale(struct pca963x_led * led,unsigned int val) pca963x_period_scale() argument
298 struct pca963x_led *led; pca963x_blink_set() local
349 pca963x_parse_mc_subleds(struct device * dev,struct pca963x_led * led,struct fwnode_handle * fwnode,const struct pca963x_chipdef * chipdef) pca963x_parse_mc_subleds() argument
386 pca963x_register_led(struct device * dev,struct pca963x_led * led,u32 reg,struct fwnode_handle * fwnode,const struct pca963x_chipdef * chipdef,bool hw_blink) pca963x_register_led() argument
428 struct pca963x_led *led = chip->leds; pca963x_register_leds() local
[all...]
H A Dleds-cht-wcove.c29 #define CHT_WC_LED1_SWCTL BIT(0) /* HW or SW control of charging led */
108 struct cht_wc_led *led = container_of(cdev, struct cht_wc_led, cdev); in cht_wc_leds_brightness_set() local
111 mutex_lock(&led->mutex); in cht_wc_leds_brightness_set()
114 ret = regmap_update_bits(led->regmap, led->regs->ctrl, in cht_wc_leds_brightness_set()
115 led->regs->on_off_mask, led->regs->off_val); in cht_wc_leds_brightness_set()
122 ret = regmap_update_bits(led->regmap, led->regs->fsm, in cht_wc_leds_brightness_set()
127 ret = regmap_write(led in cht_wc_leds_brightness_set()
145 struct cht_wc_led *led = container_of(cdev, struct cht_wc_led, cdev); cht_wc_leds_brightness_get() local
224 struct cht_wc_led *led = container_of(cdev, struct cht_wc_led, cdev); cht_wc_leds_set_effect() local
312 cht_wc_led_save_regs(struct cht_wc_led * led,struct cht_wc_led_saved_regs * saved_regs) cht_wc_led_save_regs() argument
328 cht_wc_led_restore_regs(struct cht_wc_led * led,const struct cht_wc_led_saved_regs * saved_regs) cht_wc_led_restore_regs() argument
383 struct cht_wc_led *led = &leds->leds[i]; cht_wc_leds_probe() local
[all...]
H A Dleds-pm8058.c30 struct pm8058_led *led; in pm8058_led_set() local
35 led = container_of(cled, struct pm8058_led, cdev); in pm8058_led_set()
36 switch (led->ledtype) { in pm8058_led_set()
50 ret = regmap_update_bits(led->map, led->reg, mask, val); in pm8058_led_set()
57 struct pm8058_led *led; in pm8058_led_get() local
61 led = container_of(cled, struct pm8058_led, cdev); in pm8058_led_get()
63 ret = regmap_read(led->map, led->reg, &val); in pm8058_led_get()
69 switch (led in pm8058_led_get()
91 struct pm8058_led *led; pm8058_led_probe() local
[all...]
H A Dleds-da903x.c43 struct da903x_led *led = in da903x_led_set() local
48 switch (led->id) { in da903x_led_set()
54 offset = DA9030_LED_OFFSET(led->id); in da903x_led_set()
55 val = led->flags & ~0x87; in da903x_led_set()
58 ret = da903x_write(led->master, DA9030_LED1_CONTROL + offset, in da903x_led_set()
62 val = led->flags & ~0x80; in da903x_led_set()
64 ret = da903x_write(led->master, DA9030_MISC_CONTROL_A, val); in da903x_led_set()
68 offset = DA9034_LED_OFFSET(led->id); in da903x_led_set()
70 val |= (led->flags & DA9034_LED_RAMP) ? 0x80 : 0; in da903x_led_set()
71 ret = da903x_write(led in da903x_led_set()
86 struct da903x_led *led; da903x_led_probe() local
126 struct da903x_led *led = platform_get_drvdata(pdev); da903x_led_remove() local
[all...]
H A Dleds-mt6323.c140 * @led: the array that contains the state of individual
149 struct mt6323_led *led[MAX_SUPPORTED_LEDS]; member
155 struct mt6323_led *led = container_of(cdev, struct mt6323_led, cdev); in mt6323_led_hw_brightness() local
156 struct mt6323_leds *leds = led->parent; in mt6323_led_hw_brightness()
173 ret = regmap_update_bits(regmap, ISINK_CON(regs->isink_con[2], led->id), in mt6323_led_hw_brightness()
180 struct mt6323_led *led = container_of(cdev, struct mt6323_led, cdev); in mt6323_led_hw_off() local
181 struct mt6323_leds *leds = led->parent; in mt6323_led_hw_off()
187 status = ISINK_CH_EN(led->id); in mt6323_led_hw_off()
189 ISINK_CH_EN_MASK(led->id), ~status); in mt6323_led_hw_off()
195 RG_ISINK_CK_PDN_MASK(led in mt6323_led_hw_off()
206 struct mt6323_led *led = container_of(cdev, struct mt6323_led, cdev); mt6323_get_led_hw_brightness() local
238 struct mt6323_led *led = container_of(cdev, struct mt6323_led, cdev); mt6323_led_hw_on() local
293 struct mt6323_led *led = container_of(cdev, struct mt6323_led, cdev); mt6323_led_set_blink() local
362 struct mt6323_led *led = container_of(cdev, struct mt6323_led, cdev); mt6323_led_set_brightness() local
391 struct mt6323_led *led = container_of(cdev, struct mt6323_led, cdev); mtk_wled_hw_on() local
425 struct mt6323_led *led = container_of(cdev, struct mt6323_led, cdev); mtk_wled_hw_off() local
456 struct mt6323_led *led = container_of(cdev, struct mt6323_led, cdev); mt6323_get_wled_brightness() local
476 struct mt6323_led *led = container_of(cdev, struct mt6323_led, cdev); mt6323_wled_set_brightness() local
503 struct mt6323_led *led = container_of(cdev, struct mt6323_led, cdev); mt6323_led_set_dt_default() local
532 struct mt6323_led *led; mt6323_led_probe() local
[all...]
/linux/drivers/leds/flash/
H A Dleds-aat1290.c13 #include <linux/led-class-flash.h>
21 #include <media/v4l2-flash-led-class.h>
95 static void aat1290_as2cwire_write(struct aat1290_led *led, int addr, int value) in aat1290_as2cwire_write() argument
99 gpiod_direction_output(led->gpio_fl_en, 0); in aat1290_as2cwire_write()
100 gpiod_direction_output(led->gpio_en_set, 0); in aat1290_as2cwire_write()
107 gpiod_direction_output(led->gpio_en_set, 0); in aat1290_as2cwire_write()
109 gpiod_direction_output(led->gpio_en_set, 1); in aat1290_as2cwire_write()
117 gpiod_direction_output(led->gpio_en_set, 0); in aat1290_as2cwire_write()
119 gpiod_direction_output(led->gpio_en_set, 1); in aat1290_as2cwire_write()
125 static void aat1290_set_flash_safety_timer(struct aat1290_led *led, in aat1290_set_flash_safety_timer() argument
143 struct aat1290_led *led = fled_cdev_to_led(fled_cdev); aat1290_led_brightness_set() local
174 struct aat1290_led *led = fled_cdev_to_led(fled_cdev); aat1290_led_flash_strobe_set() local
214 aat1290_led_parse_dt(struct aat1290_led * led,struct aat1290_led_config_data * cfg,struct device_node ** sub_node) aat1290_led_parse_dt() argument
287 aat1290_led_validate_mm_current(struct aat1290_led * led,struct aat1290_led_config_data * cfg) aat1290_led_validate_mm_current() argument
304 init_mm_current_scale(struct aat1290_led * led,struct aat1290_led_config_data * cfg) init_mm_current_scale() argument
327 aat1290_led_get_configuration(struct aat1290_led * led,struct aat1290_led_config_data * cfg,struct device_node ** sub_node) aat1290_led_get_configuration() argument
354 aat1290_init_flash_timeout(struct aat1290_led * led,struct aat1290_led_config_data * cfg) aat1290_init_flash_timeout() argument
374 struct aat1290_led *led = fled_cdev_to_led(fled_cdev); aat1290_intensity_to_brightness() local
388 struct aat1290_led *led = fled_cdev_to_led(fled_cdev); aat1290_brightness_to_intensity() local
396 struct aat1290_led *led = fled_cdev_to_led(v4l2_flash->fled_cdev); aat1290_led_external_strobe_set() local
417 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
442 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
459 struct aat1290_led *led; aat1290_led_probe() local
523 struct aat1290_led *led = platform_get_drvdata(pdev); aat1290_led_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
700 max77693_align_iout_current(struct max77693_led_device * led,u32 * iout,u32 min,u32 max,u32 step) max77693_align_iout_current() argument
723 max77693_led_validate_configuration(struct max77693_led_device * led,struct max77693_led_config_data * cfg) max77693_led_validate_configuration() argument
759 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
791 struct max77693_led_device *led = sub_led_to_led(sub_led); max77693_init_flash_settings() local
821 struct max77693_led_device *led = sub_led_to_led(sub_led); max77693_led_external_strobe_set() local
841 struct max77693_led_device *led = sub_led_to_led(sub_led); max77693_init_v4l2_flash_config() local
881 struct max77693_led_device *led = sub_led_to_led(sub_led); max77693_init_fled_cdev() local
911 struct max77693_led_device *led = sub_led_to_led(sub_led); max77693_register_led() local
944 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-mt6360.c8 #include <linux/led-class-flash.h>
9 #include <linux/led-class-multicolor.h>
15 #include <media/v4l2-flash-led-class.h>
101 struct mt6360_led *led = container_of(mccdev, struct mt6360_led, mc); in mt6360_mc_brightness_set() local
102 struct mt6360_priv *priv = led->priv; in mt6360_mc_brightness_set()
135 struct mt6360_led *led = container_of(lcdev, struct mt6360_led, isnk); in mt6360_isnk_brightness_set() local
136 struct mt6360_priv *priv = led->priv; in mt6360_isnk_brightness_set()
137 u32 enable_mask = MT6360_ISNK_ENMASK(led->led_no); in mt6360_isnk_brightness_set()
138 u32 val = level ? MT6360_ISNK_ENMASK(led->led_no) : 0; in mt6360_isnk_brightness_set()
143 ret = regmap_update_bits(priv->regmap, MT6360_REG_ISNK(led in mt6360_isnk_brightness_set()
159 struct mt6360_led *led = mt6360_torch_brightness_set() local
223 struct mt6360_led *led = _mt6360_flash_brightness_set() local
236 struct mt6360_led *led = mt6360_strobe_set() local
312 struct mt6360_led *led = mt6360_strobe_get() local
325 struct mt6360_led *led = mt6360_timeout_set() local
342 struct mt6360_led *led = mt6360_fault_get() local
394 mt6360_isnk_init_default_state(struct mt6360_led * led) mt6360_isnk_init_default_state() argument
427 mt6360_flash_init_default_state(struct mt6360_led * led) mt6360_flash_init_default_state() argument
472 struct mt6360_led *led = container_of(flash, struct mt6360_led, flash); mt6360_flash_external_strobe_set() local
498 mt6360_init_v4l2_flash_config(struct mt6360_led * led,struct v4l2_flash_config * config) mt6360_init_v4l2_flash_config() argument
520 mt6360_init_v4l2_flash_config(struct mt6360_led * led,struct v4l2_flash_config * config) mt6360_init_v4l2_flash_config() argument
526 mt6360_led_register(struct device * parent,struct mt6360_led * led,struct led_init_data * init_data) mt6360_led_register() argument
623 mt6360_init_isnk_properties(struct mt6360_led * led,struct led_init_data * init_data) mt6360_init_isnk_properties() argument
704 mt6360_init_flash_properties(struct mt6360_led * led,struct led_init_data * init_data) mt6360_init_flash_properties() argument
777 struct mt6360_led *led = priv->leds + i; mt6360_v4l2_flash_release() local
814 struct mt6360_led *led = priv->leds + i; mt6360_led_probe() local
[all...]
/linux/drivers/gpu/drm/nouveau/
H A Dnouveau_led.c37 nouveau_led_get_brightness(struct led_classdev *led) in nouveau_led_get_brightness() argument
39 struct drm_device *drm_dev = container_of(led, struct nouveau_led, led)->dev; in nouveau_led_get_brightness()
54 nouveau_led_set_brightness(struct led_classdev *led, enum led_brightness value) in nouveau_led_set_brightness() argument
56 struct drm_device *drm_dev = container_of(led, struct nouveau_led, led)->dev; in nouveau_led_set_brightness()
68 * - A: nvidia never puts the logo led to any other PWM controller in nouveau_led_set_brightness()
92 drm->led = kzalloc_obj(*drm->led); in nouveau_led_init()
93 if (!drm->led) in nouveau_led_init()
[all...]
/linux/drivers/net/wireless/broadcom/b43/
H A Dleds.c48 struct b43_led *led) in b43_led_update() argument
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()
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...]
/linux/drivers/hid/
H A Dhid-gt683r.c3 * MSI GT683R led driver
65 struct gt683r_led *led = hid_get_drvdata(hdev); in gt683r_brightness_set() local
68 if (led_cdev == &led->led_devs[i]) in gt683r_brightness_set()
73 led->brightnesses[i] = brightness; in gt683r_brightness_set()
74 schedule_work(&led->work); in gt683r_brightness_set()
84 struct gt683r_led *led = hid_get_drvdata(hdev); in mode_show() local
86 if (led->mode == GT683R_LED_NORMAL) in mode_show()
88 else if (led->mode == GT683R_LED_AUDIO) in mode_show()
102 struct gt683r_led *led = hid_get_drvdata(hdev); in mode_store() local
108 mutex_lock(&led in mode_store()
123 gt683r_led_snd_msg(struct gt683r_led * led,u8 * msg) gt683r_led_snd_msg() argument
140 gt683r_leds_set(struct gt683r_led * led,u8 leds) gt683r_leds_set() argument
159 gt683r_mode_set(struct gt683r_led * led,u8 mode) gt683r_mode_set() argument
184 struct gt683r_led *led = container_of(work, struct gt683r_led, work); gt683r_led_work() local
230 struct gt683r_led *led; gt683r_led_probe() local
291 struct gt683r_led *led = hid_get_drvdata(hdev); gt683r_led_remove() local
[all...]
H A Dhid-picolcd_leds.c37 if (!data->led[0]) in picolcd_leds_set()
64 if (led_cdev != data->led[i]) in picolcd_led_set_brightness()
89 if (led_cdev == data->led[i]) { in picolcd_led_get_brightness()
99 struct led_classdev *led; in picolcd_init_leds() local
113 led = kzalloc(sizeof(struct led_classdev)+name_sz, GFP_KERNEL); in picolcd_init_leds()
114 if (!led) { in picolcd_init_leds()
119 name = (void *)(&led[1]); in picolcd_init_leds()
121 led->name = name; in picolcd_init_leds()
122 led->brightness = 0; in picolcd_init_leds()
123 led->max_brightness = 1; in picolcd_init_leds()
[all …]
/linux/drivers/net/wireless/ralink/rt2x00/
H A Drt2x00leds.c21 struct rt2x00_led *led = &rt2x00dev->led_qual; in rt2x00leds_led_quality() local
24 if ((led->type != LED_TYPE_QUALITY) || !(led->flags & LED_REGISTERED)) in rt2x00leds_led_quality()
56 if (brightness != led->led_dev.brightness) { in rt2x00leds_led_quality()
57 led->led_dev.brightness_set(&led->led_dev, brightness); in rt2x00leds_led_quality()
58 led->led_dev.brightness = brightness; in rt2x00leds_led_quality()
62 static void rt2x00led_led_simple(struct rt2x00_led *led, bool enabled) in rt2x00led_led_simple() argument
66 if (!(led->flags & LED_REGISTERED)) in rt2x00led_led_simple()
69 led->led_dev.brightness_set(&led->led_dev, brightness); in rt2x00led_led_simple()
70 led->led_dev.brightness = brightness; in rt2x00led_led_simple()
92 struct rt2x00_led *led, in rt2x00leds_register_led() argument
[all …]
/linux/drivers/leds/blink/
H A Dleds-bcm63138.c94 struct bcm63138_led *led, in bcm63138_leds_set_flash_rate() argument
97 int reg_offset = (led->pin >> fls((BCM63138_LEDS_PER_REG - 1))) * 4; in bcm63138_leds_set_flash_rate()
98 int shift = (led->pin & (BCM63138_LEDS_PER_REG - 1)) * BCM63138_LED_BITS; in bcm63138_leds_set_flash_rate()
105 struct bcm63138_led *led, in bcm63138_leds_set_bright() argument
108 int reg_offset = (led->pin >> fls((BCM63138_LEDS_PER_REG - 1))) * 4; in bcm63138_leds_set_bright()
109 int shift = (led->pin & (BCM63138_LEDS_PER_REG - 1)) * BCM63138_LED_BITS; in bcm63138_leds_set_bright()
116 struct bcm63138_led *led, in bcm63138_leds_enable_led() argument
119 u32 bit = BIT(led->pin); in bcm63138_leds_enable_led()
131 struct bcm63138_led *led = container_of(led_cdev, struct bcm63138_led, cdev); in bcm63138_leds_brightness_set() local
132 struct bcm63138_leds *leds = led in bcm63138_leds_brightness_set()
147 struct bcm63138_led *led = container_of(led_cdev, struct bcm63138_led, cdev); bcm63138_leds_blink_set() local
202 struct bcm63138_led *led; bcm63138_leds_create_led() local
[all...]

12345678910>>...37