Home
last modified time | relevance | path

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

123

/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-gpio.c143 int num_leds; member
144 struct gpio_led_data leds[] __counted_by(num_leds);
159 priv->num_leds = count; in gpio_leds_create()
199 priv->num_leds = used; in gpio_leds_create()
263 if (pdata && pdata->num_leds) { in gpio_led_probe()
264 priv = devm_kzalloc(dev, struct_size(priv, leds, pdata->num_leds), GFP_KERNEL); in gpio_led_probe()
268 priv->num_leds = pdata->num_leds; in gpio_led_probe()
269 for (i = 0; i < priv->num_leds; i++) { in gpio_led_probe()
305 for (i = 0; i < priv->num_leds; i++) { in gpio_led_shutdown()
H A Dleds-pca9532.c38 u8 num_leds; member
81 .num_leds = 2,
84 .num_leds = 8,
87 .num_leds = 16,
90 .num_leds = 4,
126 for (i = 0; i < data->chip_info->num_leds; i++) { in pca9532_calcpwm()
150 u8 maxleds = data->chip_info->num_leds; in pca9532_setpwm()
166 u8 maxleds = data->chip_info->num_leds; in pca9532_setled()
209 for (i = 0; i < data->chip_info->num_leds; i++) { in pca9532_update_hw_blink()
286 u8 maxleds = data->chip_info->num_leds; in pca9532_input_work()
[all …]
H A Dleds-lm36274.c41 int num_leds; member
57 for (i = 0; i < chip->num_leds; i++) in lm36274_init()
88 chip->num_leds = fwnode_property_count_u32(child, "led-sources"); in lm36274_parse_dt()
89 if (chip->num_leds <= 0) { in lm36274_parse_dt()
95 chip->led_sources, chip->num_leds); in lm36274_parse_dt()
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.c94 u32 num_leds; member
95 struct sun50i_a100_ledc_led leds[] __counted_by(num_leds);
397 u32 num_leds = 0; in sun50i_a100_ledc_probe() local
417 num_leds++; in sun50i_a100_ledc_probe()
420 if (!num_leds) in sun50i_a100_ledc_probe()
423 priv = devm_kzalloc(dev, struct_size(priv, leds, num_leds), GFP_KERNEL); in sun50i_a100_ledc_probe()
429 priv->num_leds = num_leds; in sun50i_a100_ledc_probe()
535 dev_info(dev, "Registered %u LEDs\n", num_leds); in sun50i_a100_ledc_probe()
544 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-pca995x.c42 unsigned int num_leds; member
48 .num_leds = 16,
54 .num_leds = 16,
60 .num_leds = 24,
H A Dleds-lm3697.c66 int num_leds; member
252 led->num_leds = fwnode_property_count_u32(child, "led-sources"); in lm3697_probe_dt()
253 if (led->num_leds > LM3697_MAX_LED_STRINGS) { in lm3697_probe_dt()
260 led->num_leds); in lm3697_probe_dt()
266 for (j = 0; j < led->num_leds; j++) in lm3697_probe_dt()
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-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()
H A Dleds-lm3532.c140 int num_leds; member
428 for (i = 0; i < led->num_leds; i++) { in lm3532_init_registers()
638 led->num_leds = fwnode_property_count_u32(child, "led-sources"); in lm3532_parse_node()
639 if (led->num_leds > LM3532_MAX_LED_STRINGS) { in lm3532_parse_node()
646 led->num_leds); in lm3532_parse_node()
H A Dleds-an30259a.c74 int num_leds; member
234 chip->num_leds = i; in an30259a_dt_init()
302 for (i = 0; i < chip->num_leds; i++) { in an30259a_probe()
H A Dleds-pca955x.c141 int num_leds; member
571 pdata->num_leds = chip->bits; in pca955x_get_pdata()
619 if (pdata->num_leds != chip->bits) { in pca955x_probe()
622 pdata->num_leds, chip->bits); in pca955x_probe()
/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.c91 int num_leds; member
105 unsigned int num_leds; member
376 if (IS_ENABLED(CONFIG_LEDS_CLASS) && priv->num_leds) in cap11xx_set_sleep()
417 struct cap11xx_priv *priv, int num_leds) in cap11xx_init_leds() argument
424 if (!num_leds || !cnt) in cap11xx_init_leds()
427 if (cnt > num_leds) in cap11xx_init_leds()
461 if (error != 0 || reg >= num_leds) in cap11xx_init_leds()
471 priv->num_leds++; in cap11xx_init_leds()
479 struct cap11xx_priv *priv, int num_leds) in cap11xx_init_leds() argument
576 error = cap11xx_init_leds(dev, priv, cap->num_leds); in cap11xx_i2c_probe()
[all …]
/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/arch/arm/mach-orion5x/
H A Dboard-d2net.c66 .num_leds = ARRAY_SIZE(d2net_leds),
/linux/drivers/platform/x86/intel/atomisp2/
H A Dled.c29 .num_leds = ARRAY_SIZE(atomisp2_leds),
/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/include/linux/platform_data/
H A Dadp8860.h128 int num_leds; member
/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()
/linux/arch/sh/boards/mach-rsk/
H A Ddevices-rsk7203.c75 .num_leds = ARRAY_SIZE(rsk7203_gpio_leds),

123