Home
last modified time | relevance | path

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

/Linux-v6.6/drivers/leds/rgb/
Dleds-pwm-multicolor.c26 struct led_classdev_mc mc_cdev; member
34 struct led_classdev_mc *mc_cdev = lcdev_to_mccdev(cdev); in led_pwm_mc_set() local
35 struct pwm_mc_led *priv = container_of(mc_cdev, struct pwm_mc_led, mc_cdev); in led_pwm_mc_set()
40 led_mc_calc_color_components(mc_cdev, brightness); in led_pwm_mc_set()
44 for (i = 0; i < mc_cdev->num_colors; i++) { in led_pwm_mc_set()
46 duty *= mc_cdev->subled_info[i].brightness; in led_pwm_mc_set()
68 struct mc_subled *subled = priv->mc_cdev.subled_info; in iterate_subleds()
76 pwmled = &priv->leds[priv->mc_cdev.num_colors]; in iterate_subleds()
91 subled[priv->mc_cdev.num_colors].color_index = color; in iterate_subleds()
92 priv->mc_cdev.num_colors++; in iterate_subleds()
[all …]
Dleds-group-multicolor.c24 struct led_classdev_mc mc_cdev; member
30 struct led_classdev_mc *mc_cdev = lcdev_to_mccdev(cdev); in leds_gmc_set() local
31 struct leds_multicolor *priv = container_of(mc_cdev, struct leds_multicolor, mc_cdev); in leds_gmc_set()
32 const unsigned int group_max_brightness = mc_cdev->led_cdev.max_brightness; in leds_gmc_set()
35 for (i = 0; i < mc_cdev->num_colors; i++) { in leds_gmc_set()
38 unsigned int intensity = mc_cdev->subled_info[i].intensity; in leds_gmc_set()
104 priv->mc_cdev.subled_info = subled; in leds_gmc_probe()
116 cdev = &priv->mc_cdev.led_cdev; in leds_gmc_probe()
121 priv->mc_cdev.num_colors = count; in leds_gmc_probe()
124 ret = devm_led_classdev_multicolor_register_ext(dev, &priv->mc_cdev, &init_data); in leds_gmc_probe()
/Linux-v6.6/drivers/leds/
Dleds-turris-omnia.c31 struct led_classdev_mc mc_cdev; member
36 #define to_omnia_led(l) container_of(l, struct omnia_led, mc_cdev)
47 struct led_classdev_mc *mc_cdev = lcdev_to_mccdev(cdev); in omnia_led_brightness_set_blocking() local
49 struct omnia_led *led = to_omnia_led(mc_cdev); in omnia_led_brightness_set_blocking()
55 led_mc_calc_color_components(&led->mc_cdev, brightness); in omnia_led_brightness_set_blocking()
59 buf[2] = mc_cdev->subled_info[0].brightness; in omnia_led_brightness_set_blocking()
60 buf[3] = mc_cdev->subled_info[1].brightness; in omnia_led_brightness_set_blocking()
61 buf[4] = mc_cdev->subled_info[2].brightness; in omnia_led_brightness_set_blocking()
107 led->mc_cdev.subled_info = led->subled_info; in omnia_led_register()
108 led->mc_cdev.num_colors = OMNIA_LED_NUM_CHANNELS; in omnia_led_register()
[all …]
Dleds-lp50xx.c266 struct led_classdev_mc mc_cdev; member
299 static struct lp50xx_led *mcled_cdev_to_led(struct led_classdev_mc *mc_cdev) in mcled_cdev_to_led() argument
301 return container_of(mc_cdev, struct lp50xx_led, mc_cdev); in mcled_cdev_to_led()
328 for (i = 0; i < led->mc_cdev.num_colors; i++) { in lp50xx_brightness_set()
502 led->mc_cdev.num_colors = num_colors; in lp50xx_probe_dt()
503 led->mc_cdev.subled_info = mc_led_info; in lp50xx_probe_dt()
504 led_cdev = &led->mc_cdev.led_cdev; in lp50xx_probe_dt()
508 &led->mc_cdev, in lp50xx_probe_dt()
Dleds-lp55xx-common.c38 static struct lp55xx_led *mcled_cdev_to_led(struct led_classdev_mc *mc_cdev) in mcled_cdev_to_led() argument
40 return container_of(mc_cdev, struct lp55xx_led, mc_cdev); in mcled_cdev_to_led()
145 led_mc_calc_color_components(&led->mc_cdev, brightness); in lp55xx_set_mc_brightness()
196 led_cdev = &led->mc_cdev.led_cdev; in lp55xx_init_led()
199 led->mc_cdev.num_colors = pdata->led_config[chan].num_colors; in lp55xx_init_led()
200 for (i = 0; i < led->mc_cdev.num_colors; i++) { in lp55xx_init_led()
207 led->mc_cdev.subled_info = mc_led_info; in lp55xx_init_led()
225 ret = devm_led_classdev_multicolor_register(dev, &led->mc_cdev); in lp55xx_init_led()
Dleds-lp5521.c358 for (i = 0; i < led->mc_cdev.num_colors; i++) { in lp5521_multicolor_brightness()
361 led->mc_cdev.subled_info[i].channel, in lp5521_multicolor_brightness()
362 led->mc_cdev.subled_info[i].brightness); in lp5521_multicolor_brightness()
Dleds-lp55xx-common.h178 struct led_classdev_mc mc_cdev; member
Dleds-lp5523.c809 for (i = 0; i < led->mc_cdev.num_colors; i++) { in lp5523_multicolor_brightness()
812 led->mc_cdev.subled_info[i].channel, in lp5523_multicolor_brightness()
813 led->mc_cdev.subled_info[i].brightness); in lp5523_multicolor_brightness()
/Linux-v6.6/drivers/hid/
Dhid-playstation.c1130 struct led_classdev_mc *mc_cdev = lcdev_to_mccdev(cdev); in dualsense_lightbar_set_brightness() local
1131 struct dualsense *ds = container_of(mc_cdev, struct dualsense, lightbar); in dualsense_lightbar_set_brightness()
1134 led_mc_calc_color_components(mc_cdev, brightness); in dualsense_lightbar_set_brightness()
1135 red = mc_cdev->subled_info[0].brightness; in dualsense_lightbar_set_brightness()
1136 green = mc_cdev->subled_info[1].brightness; in dualsense_lightbar_set_brightness()
1137 blue = mc_cdev->subled_info[2].brightness; in dualsense_lightbar_set_brightness()