Home
last modified time | relevance | path

Searched refs:led_dat (Results 1 – 9 of 9) sorted by relevance

/Linux-v4.19/drivers/leds/
Dleds-ns2.c54 static int ns2_led_get_mode(struct ns2_led_data *led_dat, in ns2_led_get_mode() argument
62 cmd_level = gpio_get_value_cansleep(led_dat->cmd); in ns2_led_get_mode()
63 slow_level = gpio_get_value_cansleep(led_dat->slow); in ns2_led_get_mode()
65 for (i = 0; i < led_dat->num_modes; i++) { in ns2_led_get_mode()
66 if (cmd_level == led_dat->modval[i].cmd_level && in ns2_led_get_mode()
67 slow_level == led_dat->modval[i].slow_level) { in ns2_led_get_mode()
68 *mode = led_dat->modval[i].mode; in ns2_led_get_mode()
77 static void ns2_led_set_mode(struct ns2_led_data *led_dat, in ns2_led_set_mode() argument
84 for (i = 0; i < led_dat->num_modes; i++) in ns2_led_set_mode()
85 if (mode == led_dat->modval[i].mode) { in ns2_led_set_mode()
[all …]
Dleds-gpio.c41 struct gpio_led_data *led_dat = cdev_to_gpio_led_data(led_cdev); in gpio_led_set() local
49 if (led_dat->blinking) { in gpio_led_set()
50 led_dat->platform_gpio_blink_set(led_dat->gpiod, level, in gpio_led_set()
52 led_dat->blinking = 0; in gpio_led_set()
54 if (led_dat->can_sleep) in gpio_led_set()
55 gpiod_set_value_cansleep(led_dat->gpiod, level); in gpio_led_set()
57 gpiod_set_value(led_dat->gpiod, level); in gpio_led_set()
71 struct gpio_led_data *led_dat = cdev_to_gpio_led_data(led_cdev); in gpio_blink_set() local
73 led_dat->blinking = 1; in gpio_blink_set()
74 return led_dat->platform_gpio_blink_set(led_dat->gpiod, GPIO_LED_BLINK, in gpio_blink_set()
[all …]
Dleds-netxbig.c148 struct netxbig_led_data *led_dat = in netxbig_led_blink_set() local
156 led_dat->timer, led_dat->num_timer); in netxbig_led_blink_set()
160 mode_val = led_dat->mode_val[mode]; in netxbig_led_blink_set()
164 spin_lock_irq(&led_dat->lock); in netxbig_led_blink_set()
166 gpio_ext_set_value(led_dat->gpio_ext, led_dat->mode_addr, mode_val); in netxbig_led_blink_set()
167 led_dat->mode = mode; in netxbig_led_blink_set()
169 spin_unlock_irq(&led_dat->lock); in netxbig_led_blink_set()
177 struct netxbig_led_data *led_dat = in netxbig_led_set() local
184 spin_lock_irqsave(&led_dat->lock, flags); in netxbig_led_set()
190 if (led_dat->sata) in netxbig_led_set()
[all …]
Dleds-adp5520.c96 struct adp5520_led *led, *led_dat; in adp5520_led_probe() local
124 led_dat = &led[i]; in adp5520_led_probe()
126 led_dat->cdev.name = cur_led->name; in adp5520_led_probe()
127 led_dat->cdev.default_trigger = cur_led->default_trigger; in adp5520_led_probe()
128 led_dat->cdev.brightness_set_blocking = adp5520_led_set; in adp5520_led_probe()
129 led_dat->cdev.brightness = LED_OFF; in adp5520_led_probe()
132 led_dat->flags = cur_led->flags; in adp5520_led_probe()
134 led_dat->flags = i + 1; in adp5520_led_probe()
136 led_dat->id = led_dat->flags & ADP5520_FLAG_LED_MASK; in adp5520_led_probe()
138 led_dat->master = pdev->dev.parent; in adp5520_led_probe()
[all …]
Dleds-pwm.c38 static void __led_pwm_set(struct led_pwm_data *led_dat) in __led_pwm_set() argument
40 int new_duty = led_dat->duty; in __led_pwm_set()
42 pwm_config(led_dat->pwm, new_duty, led_dat->period); in __led_pwm_set()
45 pwm_disable(led_dat->pwm); in __led_pwm_set()
47 pwm_enable(led_dat->pwm); in __led_pwm_set()
53 struct led_pwm_data *led_dat = in led_pwm_set() local
55 unsigned int max = led_dat->cdev.max_brightness; in led_pwm_set()
56 unsigned long long duty = led_dat->period; in led_pwm_set()
61 if (led_dat->active_low) in led_pwm_set()
62 duty = led_dat->period - duty; in led_pwm_set()
[all …]
Dleds-lt3593.c24 struct lt3593_led_data *led_dat = in lt3593_led_set() local
38 gpiod_set_value_cansleep(led_dat->gpiod, 0); in lt3593_led_set()
45 gpiod_set_value_cansleep(led_dat->gpiod, 0); in lt3593_led_set()
47 gpiod_set_value_cansleep(led_dat->gpiod, 1); in lt3593_led_set()
51 gpiod_set_value_cansleep(led_dat->gpiod, 1); in lt3593_led_set()
54 gpiod_set_value_cansleep(led_dat->gpiod, 0); in lt3593_led_set()
56 gpiod_set_value_cansleep(led_dat->gpiod, 1); in lt3593_led_set()
/Linux-v4.19/drivers/video/backlight/
Dadp8860_bl.c222 struct adp8860_led *led, *led_dat; in adp8860_led_probe() local
244 led_dat = &led[i]; in adp8860_led_probe()
246 led_dat->id = cur_led->flags & ADP8860_FLAG_LED_MASK; in adp8860_led_probe()
248 if (led_dat->id > 7 || led_dat->id < 1) { in adp8860_led_probe()
250 led_dat->id); in adp8860_led_probe()
255 if (pdata->bl_led_assign & (1 << (led_dat->id - 1))) { in adp8860_led_probe()
257 led_dat->id); in adp8860_led_probe()
262 led_dat->cdev.name = cur_led->name; in adp8860_led_probe()
263 led_dat->cdev.default_trigger = cur_led->default_trigger; in adp8860_led_probe()
264 led_dat->cdev.brightness_set = adp8860_led_set; in adp8860_led_probe()
[all …]
Dadp8870_bl.c245 struct adp8870_led *led, *led_dat; in adp8870_led_probe() local
270 led_dat = &led[i]; in adp8870_led_probe()
272 led_dat->id = cur_led->flags & ADP8870_FLAG_LED_MASK; in adp8870_led_probe()
274 if (led_dat->id > 7 || led_dat->id < 1) { in adp8870_led_probe()
276 led_dat->id); in adp8870_led_probe()
281 if (pdata->bl_led_assign & (1 << (led_dat->id - 1))) { in adp8870_led_probe()
283 led_dat->id); in adp8870_led_probe()
288 led_dat->cdev.name = cur_led->name; in adp8870_led_probe()
289 led_dat->cdev.default_trigger = cur_led->default_trigger; in adp8870_led_probe()
290 led_dat->cdev.brightness_set = adp8870_led_set; in adp8870_led_probe()
[all …]
/Linux-v4.19/arch/mips/txx9/rbtx4939/
Dsetup.c201 struct rbtx4939_led_data *led_dat = in rbtx4939_led_brightness_set() local
203 unsigned int num = led_dat->num; in rbtx4939_led_brightness_set()
228 struct rbtx4939_led_data *led_dat = &leds_data[i]; in rbtx4939_led_probe() local
230 led_dat->num = i; in rbtx4939_led_probe()
231 led_dat->cdev.brightness_set = rbtx4939_led_brightness_set; in rbtx4939_led_probe()
232 sprintf(led_dat->name, "rbtx4939:amber:%u", i); in rbtx4939_led_probe()
233 led_dat->cdev.name = led_dat->name; in rbtx4939_led_probe()
235 led_dat->cdev.default_trigger = default_triggers[i]; in rbtx4939_led_probe()
236 rc = led_classdev_register(&pdev->dev, &led_dat->cdev); in rbtx4939_led_probe()
239 led_dat->cdev.brightness_set(&led_dat->cdev, 0); in rbtx4939_led_probe()