Home
last modified time | relevance | path

Searched refs:num_leds (Results 1 – 25 of 116) sorted by relevance

12345

/Linux-v4.19/drivers/leds/
Dleds-ns2.c261 int num_leds = 0; in ns2_leds_get_of_pdata() local
263 num_leds = of_get_child_count(np); in ns2_leds_get_of_pdata()
264 if (!num_leds) in ns2_leds_get_of_pdata()
267 leds = devm_kcalloc(dev, num_leds, sizeof(struct ns2_led), in ns2_leds_get_of_pdata()
327 pdata->num_leds = num_leds; in ns2_leds_get_of_pdata()
340 int num_leds; member
344 static inline int sizeof_ns2_led_priv(int num_leds) in sizeof_ns2_led_priv() argument
347 (sizeof(struct ns2_led_data) * num_leds); in sizeof_ns2_led_priv()
375 sizeof_ns2_led_priv(pdata->num_leds), GFP_KERNEL); in ns2_led_probe()
378 priv->num_leds = pdata->num_leds; in ns2_led_probe()
[all …]
Dleds-gpio.c148 int num_leds; member
152 static inline int sizeof_gpio_leds_priv(int num_leds) in sizeof_gpio_leds_priv() argument
155 (sizeof(struct gpio_led_data) * num_leds); in sizeof_gpio_leds_priv()
174 struct gpio_led_data *led_dat = &priv->leds[priv->num_leds]; in gpio_leds_create()
221 priv->num_leds++; in gpio_leds_create()
240 if (pdata && pdata->num_leds) { in gpio_led_probe()
242 sizeof_gpio_leds_priv(pdata->num_leds), in gpio_led_probe()
247 priv->num_leds = pdata->num_leds; in gpio_led_probe()
248 for (i = 0; i < priv->num_leds; i++) { in gpio_led_probe()
271 for (i = 0; i < priv->num_leds; i++) { in gpio_led_shutdown()
Dleds-mc13783.c41 int num_leds; member
137 pdata->num_leds = of_get_child_count(parent); in mc13xxx_led_probe_dt()
139 pdata->led = devm_kcalloc(dev, pdata->num_leds, sizeof(*pdata->led), in mc13xxx_led_probe_dt()
163 pdata->num_leds = i; in mc13xxx_led_probe_dt()
205 leds->num_leds = pdata->num_leds; in mc13xxx_led_probe()
207 if ((leds->num_leds < 1) || in mc13xxx_led_probe()
208 (leds->num_leds > (devtype->led_max - devtype->led_min + 1))) { in mc13xxx_led_probe()
209 dev_err(dev, "Invalid LED count %d\n", leds->num_leds); in mc13xxx_led_probe()
213 leds->led = devm_kcalloc(dev, leds->num_leds, sizeof(*leds->led), in mc13xxx_led_probe()
225 for (i = 0; i < leds->num_leds; i++) { in mc13xxx_led_probe()
[all …]
Dleds-pwm.c34 int num_leds; member
71 static inline size_t sizeof_pwm_leds_priv(int num_leds) in sizeof_pwm_leds_priv() argument
74 (sizeof(struct led_pwm_data) * num_leds); in sizeof_pwm_leds_priv()
79 while (priv->num_leds--) in led_pwm_cleanup()
80 led_classdev_unregister(&priv->leds[priv->num_leds].cdev); in led_pwm_cleanup()
86 struct led_pwm_data *led_data = &priv->leds[priv->num_leds]; in led_pwm_add()
124 priv->num_leds++; in led_pwm_add()
170 count = pdata->num_leds; in led_pwm_probe()
Dleds-is31fl319x.c81 int num_leds; member
85 .num_leds = 1,
89 .num_leds = 3,
93 .num_leds = 6,
97 .num_leds = 9,
132 for (i = 0; i < is31->cdef->num_leds; i++) { in is31fl319x_brightness_set()
227 if (!count || count > is31->cdef->num_leds) { in is31fl319x_parse_dt()
229 is31->cdef->num_leds); in is31fl319x_parse_dt()
243 if (reg < 1 || reg > is31->cdef->num_leds) { in is31fl319x_parse_dt()
382 for (i = 0; i < is31->cdef->num_leds; i++) in is31fl319x_probe()
[all …]
Dleds-pca9532.c38 u8 num_leds; member
78 .num_leds = 2,
81 .num_leds = 8,
84 .num_leds = 16,
87 .num_leds = 4,
123 for (i = 0; i < data->chip_info->num_leds; i++) { in pca9532_calcpwm()
147 u8 maxleds = data->chip_info->num_leds; in pca9532_setpwm()
163 u8 maxleds = data->chip_info->num_leds; in pca9532_setled()
249 u8 maxleds = data->chip_info->num_leds; in pca9532_input_work()
261 u8 maxleds = data->chip_info->num_leds; in pca9532_getled()
[all …]
Dleds-adp5520.c105 if (pdata->num_leds > ADP5520_01_MAXLEDS) { in adp5520_led_probe()
111 led = devm_kcalloc(&pdev->dev, pdata->num_leds, sizeof(*led), in adp5520_led_probe()
122 for (i = 0; i < pdata->num_leds; ++i) { in adp5520_led_probe()
178 for (i = 0; i < pdata->num_leds; i++) { in adp5520_led_remove()
Dleds-gpio-register.c31 if (!pdata->num_leds) in gpio_led_register_device()
35 pdata->num_leds * sizeof(*pdata->leds), GFP_KERNEL); in gpio_led_register_device()
Dleds-netxbig.c392 int num_leds = 0; in netxbig_leds_get_of_pdata() local
441 num_leds = of_get_child_count(np); in netxbig_leds_get_of_pdata()
442 if (!num_leds) { in netxbig_leds_get_of_pdata()
447 leds = devm_kcalloc(dev, num_leds, sizeof(*leds), GFP_KERNEL); in netxbig_leds_get_of_pdata()
524 pdata->num_leds = num_leds; in netxbig_leds_get_of_pdata()
564 pdata->num_leds, sizeof(*leds_data), in netxbig_led_probe()
573 for (i = 0; i < pdata->num_leds; i++) { in netxbig_led_probe()
Dleds-is31fl32xx.c50 unsigned int num_leds; member
331 static inline size_t sizeof_is31fl32xx_priv(int num_leds) in sizeof_is31fl32xx_priv() argument
334 (sizeof(struct is31fl32xx_led_data) * num_leds); in sizeof_is31fl32xx_priv()
371 for (i = 0; i < priv->num_leds; i++) { in is31fl32xx_find_led_data()
387 &priv->leds[priv->num_leds]; in is31fl32xx_parse_dt()
415 priv->num_leds++; in is31fl32xx_parse_dt()
Dleds-da9052.c117 pled->num_leds, sizeof(struct da9052_led), in da9052_led_probe()
124 for (i = 0; i < pled->num_leds; i++) { in da9052_led_probe()
176 for (i = 0; i < pled->num_leds; i++) { in da9052_led_remove()
Dleds-pca963x.c328 pdata->leds.num_leds = chip->n_leds; in pca963x_dt_init()
399 if (pdata && (pdata->leds.num_leds < 1 || in pca963x_probe()
400 pdata->leds.num_leds > chip->n_leds)) { in pca963x_probe()
431 if (pdata && i < pdata->leds.num_leds) { in pca963x_probe()
440 if (!pdata || i >= pdata->leds.num_leds || in pca963x_probe()
/Linux-v4.19/drivers/input/
Dinput-leds.c49 unsigned int num_leds; member
92 unsigned int num_leds; in input_leds_connect() local
97 num_leds = input_leds_get_count(dev); in input_leds_connect()
98 if (!num_leds) in input_leds_connect()
101 leds = kzalloc(struct_size(leds, leds, num_leds), GFP_KERNEL); in input_leds_connect()
105 leds->num_leds = num_leds; in input_leds_connect()
178 for (i = 0; i < leds->num_leds; i++) { in input_leds_disconnect()
/Linux-v4.19/arch/mips/ath79/
Ddev-leds-gpio.c19 unsigned num_leds, in ath79_register_leds_gpio() argument
27 p = kmemdup(leds, num_leds * sizeof(*p), GFP_KERNEL); in ath79_register_leds_gpio()
36 pdata.num_leds = num_leds; in ath79_register_leds_gpio()
Ddev-leds-gpio.h18 unsigned num_leds,
/Linux-v4.19/drivers/input/keyboard/
Dcap11xx.c89 int num_leds; member
98 unsigned int num_leds; member
108 [CAP1106] = { .product_id = 0x55, .num_channels = 6, .num_leds = 0 },
109 [CAP1126] = { .product_id = 0x53, .num_channels = 6, .num_leds = 2 },
110 [CAP1188] = { .product_id = 0x50, .num_channels = 8, .num_leds = 8 },
213 if (IS_ENABLED(CONFIG_LEDS_CLASS) && priv->num_leds) in cap11xx_set_sleep()
263 struct cap11xx_priv *priv, int num_leds) in cap11xx_init_leds() argument
270 if (!num_leds || !cnt) in cap11xx_init_leds()
273 if (cnt > num_leds) in cap11xx_init_leds()
307 if (error != 0 || reg >= num_leds) { in cap11xx_init_leds()
[all …]
/Linux-v4.19/drivers/hid/
Dhid-led.c78 int num_leds; member
260 .num_leds = 1,
363 .num_leds = 1,
373 .num_leds = 1,
384 .num_leds = 2,
395 .num_leds = 1,
406 .num_leds = 6,
418 if (config->num_leds > 1) in hidled_init_led()
485 ldev->rgb = devm_kcalloc(&hdev->dev, ldev->config->num_leds, in hidled_probe()
496 for (i = 0; i < ldev->config->num_leds; i++) { in hidled_probe()
/Linux-v4.19/arch/mips/ar7/
Dplatform.c510 ar7_led_data.num_leds = ARRAY_SIZE(default_leds); in detect_leds()
522 ar7_led_data.num_leds = ARRAY_SIZE(fb_fon_leds); in detect_leds()
525 ar7_led_data.num_leds = ARRAY_SIZE(fb_sl_leds); in detect_leds()
529 ar7_led_data.num_leds = ARRAY_SIZE(dsl502t_leds); in detect_leds()
532 ar7_led_data.num_leds = ARRAY_SIZE(dg834g_leds); in detect_leds()
535 ar7_led_data.num_leds = ARRAY_SIZE(titan_leds); in detect_leds()
538 ar7_led_data.num_leds = ARRAY_SIZE(gt701_leds); in detect_leds()
/Linux-v4.19/drivers/mfd/
Dlm3533-core.c443 if (!pdata->leds || pdata->num_leds == 0) in lm3533_device_led_init()
446 if (pdata->num_leds > ARRAY_SIZE(lm3533_led_devs)) in lm3533_device_led_init()
447 pdata->num_leds = ARRAY_SIZE(lm3533_led_devs); in lm3533_device_led_init()
449 for (i = 0; i < pdata->num_leds; ++i) { in lm3533_device_led_init()
455 pdata->num_leds, NULL, 0, NULL); in lm3533_device_led_init()
/Linux-v4.19/include/linux/
Dleds_pwm.h18 int num_leds; member
/Linux-v4.19/include/linux/platform_data/
Dleds-kirkwood-ns2.h34 int num_leds; member
Dleds-kirkwood-netxbig.h51 int num_leds; member
/Linux-v4.19/include/linux/mfd/
Dhtc-pasic3.h44 unsigned int num_leds; member
/Linux-v4.19/arch/arm/mach-orion5x/
Dboard-d2net.c71 .num_leds = ARRAY_SIZE(d2net_leds),
/Linux-v4.19/arch/arm/mach-pxa/
Dcsb701.c44 .num_leds = ARRAY_SIZE(csb701_leds),

12345