Home
last modified time | relevance | path

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

12

/linux/drivers/input/
H A Dinput-leds.c52 unsigned int num_leds; member
53 struct input_led leds[] __counted_by(num_leds);
95 unsigned int num_leds; in input_leds_connect() local
100 num_leds = input_leds_get_count(dev); in input_leds_connect()
101 if (!num_leds) in input_leds_connect()
104 leds = kzalloc_flex(*leds, leds, num_leds); in input_leds_connect()
108 leds->num_leds = num_leds; in input_leds_connect()
181 for (i = 0; i < leds->num_leds; i++) { in input_leds_disconnect()
/linux/drivers/input/keyboard/
H A Dcap11xx.c74 int num_leds; member
90 unsigned int num_leds; member
380 if (IS_ENABLED(CONFIG_LEDS_CLASS) && priv->num_leds) in cap11xx_set_sleep()
427 struct cap11xx_priv *priv, int num_leds) in cap11xx_init_leds() argument
435 if (!num_leds || !cnt) in cap11xx_init_leds()
438 if (cnt > num_leds) in cap11xx_init_leds()
450 GENMASK(min(num_leds, 8) - 1, 0), 0); in cap11xx_init_leds()
454 if (num_leds > 8) { in cap11xx_init_leds()
457 GENMASK(num_leds - 8 - 1, 0), 0); in cap11xx_init_leds()
483 if (error != 0 || reg >= num_leds) in cap11xx_init_leds()
[all …]
/linux/drivers/leds/
H A Dleds-mc13783.c39 int num_leds; member
136 pdata->num_leds = of_get_available_child_count(parent); in mc13xxx_led_probe_dt()
138 pdata->led = devm_kcalloc(dev, pdata->num_leds, sizeof(*pdata->led), in mc13xxx_led_probe_dt()
160 pdata->num_leds = i; in mc13xxx_led_probe_dt()
200 leds->num_leds = pdata->num_leds; in mc13xxx_led_probe()
202 if ((leds->num_leds < 1) || in mc13xxx_led_probe()
203 (leds->num_leds > (devtype->led_max - devtype->led_min + 1))) { in mc13xxx_led_probe()
204 dev_err(dev, "Invalid LED count %d\n", leds->num_leds); in mc13xxx_led_probe()
208 leds->led = devm_kcalloc(dev, leds->num_leds, sizeof(*leds->led), in mc13xxx_led_probe()
220 for (i = 0; i < leds->num_leds; i++) { in mc13xxx_led_probe()
[all …]
H A Dleds-lp50xx.c191 u8 num_leds; member
203 .num_leds = LP5009_MAX_LED_MODULES * LP50XX_LEDS_PER_MODULE,
214 .num_leds = LP5012_MAX_LED_MODULES * LP50XX_LEDS_PER_MODULE,
225 .num_leds = LP5018_MAX_LED_MODULES * LP50XX_LEDS_PER_MODULE,
236 .num_leds = LP5024_MAX_LED_MODULES * LP50XX_LEDS_PER_MODULE,
247 .num_leds = LP5030_MAX_LED_MODULES * LP50XX_LEDS_PER_MODULE,
258 .num_leds = LP5036_MAX_LED_MODULES * LP50XX_LEDS_PER_MODULE,
349 static int lp50xx_set_banks(struct lp50xx *priv, u32 led_banks[], int num_leds) in lp50xx_set_banks() argument
356 for (i = 0; i < num_leds; i++) in lp50xx_set_banks()
416 struct lp50xx_led *led, int num_leds) in lp50xx_probe_leds() argument
[all …]
H A Dleds-gpio.c142 int num_leds; member
143 struct gpio_led_data leds[] __counted_by(num_leds);
158 priv->num_leds = count; in gpio_leds_create()
198 priv->num_leds = used; in gpio_leds_create()
262 if (pdata && pdata->num_leds) { in gpio_led_probe()
263 priv = devm_kzalloc(dev, struct_size(priv, leds, pdata->num_leds), GFP_KERNEL); in gpio_led_probe()
267 priv->num_leds = pdata->num_leds; in gpio_led_probe()
268 for (i = 0; i < priv->num_leds; i++) { in gpio_led_probe()
304 for (i = 0; i < priv->num_leds; i++) { in gpio_led_shutdown()
H A Dleds-lm36274.c40 int num_leds; member
56 for (i = 0; i < chip->num_leds; i++) in lm36274_init()
87 chip->num_leds = fwnode_property_count_u32(child, "led-sources"); in lm36274_parse_dt()
88 if (chip->num_leds <= 0) { in lm36274_parse_dt()
94 chip->led_sources, chip->num_leds); in lm36274_parse_dt()
H A Dleds-is31fl319x.c105 int num_leds; member
211 for (i = 0; i < is31->cdef->num_leds; i++) { in is31fl3190_brightness_set()
265 for (i = 0; i < is31->cdef->num_leds; i++) { in is31fl3196_brightness_set()
307 .num_leds = 1,
318 .num_leds = 3,
329 .num_leds = 6,
340 .num_leds = 9,
411 if (!count || count > is31->cdef->num_leds) in is31fl319x_parse_fw()
414 is31->cdef->num_leds); in is31fl319x_parse_fw()
424 if (reg < 1 || reg > is31->cdef->num_leds) in is31fl319x_parse_fw()
[all …]
H A Dleds-max77650.c68 int rv, num_leds; in max77650_led_probe() local
82 num_leds = device_get_child_node_count(dev); in max77650_led_probe()
83 if (!num_leds || num_leds > MAX77650_LED_NUM_LEDS) in max77650_led_probe()
H A Dleds-sun50i-a100.c93 u32 num_leds; member
94 struct sun50i_a100_ledc_led leds[] __counted_by(num_leds);
396 u32 num_leds = 0; in sun50i_a100_ledc_probe() local
416 num_leds++; in sun50i_a100_ledc_probe()
419 if (!num_leds) in sun50i_a100_ledc_probe()
422 priv = devm_kzalloc(dev, struct_size(priv, leds, num_leds), GFP_KERNEL); in sun50i_a100_ledc_probe()
428 priv->num_leds = num_leds; in sun50i_a100_ledc_probe()
534 dev_info(dev, "Registered %u LEDs\n", num_leds); in sun50i_a100_ledc_probe()
543 for (u32 i = 0; i < priv->num_leds; i++) in sun50i_a100_ledc_remove()
H A Dleds-adp5520.c104 if (pdata->num_leds > ADP5520_01_MAXLEDS) { in adp5520_led_probe()
110 led = devm_kcalloc(&pdev->dev, pdata->num_leds, sizeof(*led), in adp5520_led_probe()
121 for (i = 0; i < pdata->num_leds; ++i) { in adp5520_led_probe()
177 for (i = 0; i < pdata->num_leds; i++) { in adp5520_led_remove()
H A Dleds-gpio-register.c29 if (!pdata->num_leds) in gpio_led_register_device()
33 pdata->num_leds * sizeof(*pdata->leds), GFP_KERNEL); in gpio_led_register_device()
H A Dleds-pca995x.c41 unsigned int num_leds; member
47 .num_leds = 16,
53 .num_leds = 16,
59 .num_leds = 24,
H A Dleds-lm3697.c65 int num_leds; member
251 led->num_leds = fwnode_property_count_u32(child, "led-sources"); in lm3697_probe_dt()
252 if (led->num_leds > LM3697_MAX_LED_STRINGS) { in lm3697_probe_dt()
259 led->num_leds); in lm3697_probe_dt()
265 for (j = 0; j < led->num_leds; j++) in lm3697_probe_dt()
H A Dleds-aw200xx.c119 u32 num_leds; member
122 struct aw200xx_led leds[] __counted_by(num_leds);
433 chip->num_leds--; in aw200xx_probe_fw()
440 chip->num_leds--; in aw200xx_probe_fw()
452 chip->num_leds--; in aw200xx_probe_fw()
475 if (!chip->num_leds) in aw200xx_probe_fw()
561 chip->num_leds = count; in aw200xx_probe()
H A Dleds-da9052.c112 pled->num_leds, sizeof(struct da9052_led), in da9052_led_probe()
119 for (i = 0; i < pled->num_leds; i++) { in da9052_led_probe()
171 for (i = 0; i < pled->num_leds; i++) { in da9052_led_remove()
H A Dleds-aw2013.c69 int num_leds; member
84 for (i = 0; i < chip->num_leds; i++) { in aw2013_chip_init()
147 for (i = 0; i < chip->num_leds; i++) in aw2013_chip_in_use()
316 chip->num_leds = i; in aw2013_probe_dt()
/linux/drivers/hid/
H A Dhid-led.c75 int num_leds; member
257 .num_leds = 1,
360 .num_leds = 1,
370 .num_leds = 1,
381 .num_leds = 2,
392 .num_leds = 1,
403 .num_leds = 6,
415 if (config->num_leds > 1) in hidled_init_led()
482 ldev->rgb = devm_kcalloc(&hdev->dev, ldev->config->num_leds, in hidled_probe()
493 for (i = 0; i < ldev->config->num_leds; i++) { in hidled_probe()
/linux/drivers/mfd/
H A Dlm3533-core.c437 if (!pdata->leds || pdata->num_leds == 0) in lm3533_device_led_init()
440 if (pdata->num_leds > ARRAY_SIZE(lm3533_led_devs)) in lm3533_device_led_init()
441 pdata->num_leds = ARRAY_SIZE(lm3533_led_devs); in lm3533_device_led_init()
443 for (i = 0; i < pdata->num_leds; ++i) { in lm3533_device_led_init()
449 pdata->num_leds, NULL, 0, NULL); in lm3533_device_led_init()
/linux/drivers/platform/x86/intel/atomisp2/
H A Dled.c28 .num_leds = ARRAY_SIZE(atomisp2_leds),
/linux/include/linux/platform_data/
H A Dadp8860.h128 int num_leds; member
H A Dadp8870.h144 int num_leds; member
/linux/arch/sh/boards/mach-rsk/
H A Ddevices-rsk7203.c75 .num_leds = ARRAY_SIZE(rsk7203_gpio_leds),
/linux/include/linux/mfd/
H A Dlm3533.h82 int num_leds; member
/linux/drivers/leds/flash/
H A Dleds-sy7802.c105 int num_leds; member
106 struct sy7802_led leds[] __counted_by(num_leds);
469 chip->num_leds = count; in sy7802_probe()
/linux/arch/mips/bcm47xx/
H A Dleds.c573 bcm47xx_leds_pdata.num_leds = ARRAY_SIZE(dev_leds); \
579 bcm47xx_leds_pdata_extra.num_leds = ARRAY_SIZE(dev_leds); \
831 if (bcm47xx_leds_pdata_extra.num_leds) in bcm47xx_leds_register()

12