/linux/drivers/leds/ |
H A D | leds-mc13783.c | 39 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 D | leds-gpio.c | 143 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 D | leds-pca9532.c | 38 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 D | leds-lp50xx.c | 186 u8 num_leds; member 198 .num_leds = LP5009_MAX_LED_MODULES * LP50XX_LEDS_PER_MODULE, 209 .num_leds = LP5012_MAX_LED_MODULES * LP50XX_LEDS_PER_MODULE, 220 .num_leds = LP5018_MAX_LED_MODULES * LP50XX_LEDS_PER_MODULE, 231 .num_leds = LP5024_MAX_LED_MODULES * LP50XX_LEDS_PER_MODULE, 242 .num_leds = LP5030_MAX_LED_MODULES * LP50XX_LEDS_PER_MODULE, 253 .num_leds = LP5036_MAX_LED_MODULES * LP50XX_LEDS_PER_MODULE, 390 struct lp50xx_led *led, int num_leds) in lp50xx_probe_leds() argument 396 if (num_leds > 1) { in lp50xx_probe_leds() 397 if (num_leds > priv->chip_info->max_modules) { in lp50xx_probe_leds() [all …]
|
H A D | leds-is31fl319x.c | 106 int num_leds; member 212 for (i = 0; i < is31->cdef->num_leds; i++) { in is31fl3190_brightness_set() 266 for (i = 0; i < is31->cdef->num_leds; i++) { in is31fl3196_brightness_set() 308 .num_leds = 1, 319 .num_leds = 3, 330 .num_leds = 6, 341 .num_leds = 9, 412 if (!count || count > is31->cdef->num_leds) in is31fl319x_parse_fw() 415 is31->cdef->num_leds); in is31fl319x_parse_fw() 425 if (reg < 1 || reg > is31->cdef->num_leds) in is31fl319x_parse_fw() [all …]
|
H A D | leds-lm36274.c | 41 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 D | leds-max77650.c | 68 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 D | leds-sun50i-a100.c | 94 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 D | leds-netxbig.c | 59 int num_leds; member 430 int num_leds = 0; in netxbig_leds_get_of_pdata() local 495 num_leds = of_get_available_child_count(np); in netxbig_leds_get_of_pdata() 496 if (!num_leds) { in netxbig_leds_get_of_pdata() 502 leds = devm_kcalloc(dev, num_leds, sizeof(*leds), GFP_KERNEL); in netxbig_leds_get_of_pdata() 581 pdata->num_leds = num_leds; in netxbig_leds_get_of_pdata() 611 pdata->num_leds, sizeof(*leds_data), in netxbig_led_probe() 616 for (i = 0; i < pdata->num_leds; i++) { in netxbig_led_probe()
|
H A D | leds-pca995x.c | 42 unsigned int num_leds; member 48 .num_leds = 16, 54 .num_leds = 16, 60 .num_leds = 24,
|
H A D | leds-adp5520.c | 104 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 D | leds-lm3697.c | 66 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 D | leds-gpio-register.c | 29 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 D | leds-aw200xx.c | 120 u32 num_leds; member 123 struct aw200xx_led leds[] __counted_by(num_leds); 434 chip->num_leds--; in aw200xx_probe_fw() 441 chip->num_leds--; in aw200xx_probe_fw() 453 chip->num_leds--; in aw200xx_probe_fw() 476 if (!chip->num_leds) in aw200xx_probe_fw() 562 chip->num_leds = count; in aw200xx_probe()
|
H A D | leds-da9052.c | 112 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 D | leds-pwm.c | 36 int num_leds; member 83 struct led_pwm_data *led_data = &priv->leds[priv->num_leds]; in led_pwm_add() 151 priv->num_leds++; in led_pwm_add()
|
H A D | leds-is31fl32xx.c | 45 unsigned int num_leds; member 355 for (i = 0; i < priv->num_leds; i++) { in is31fl32xx_find_led_data() 371 &priv->leds[priv->num_leds]; in is31fl32xx_parse_dt() 400 priv->num_leds++; in is31fl32xx_parse_dt()
|
H A D | leds-aw2013.c | 69 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 D | leds-lm3532.c | 140 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 D | leds-an30259a.c | 74 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()
|
/linux/drivers/input/ |
H A D | input-leds.c | 52 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(struct_size(leds, leds, num_leds), GFP_KERNEL); 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 D | cap11xx.c | 91 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 D | hid-led.c | 75 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/leds/rgb/ |
H A D | leds-ktd202x.c | 102 unsigned long num_leds; member 103 struct ktd202x_led leds[] __counted_by(num_leds); 153 for (i = 0; i < chip->num_leds; i++) { in ktd202x_chip_in_use() 397 if (!num_channels || num_channels > chip->num_leds) in ktd202x_setup_led_rgb() 410 if (ret != 0 || reg >= chip->num_leds) { in ktd202x_setup_led_rgb() 447 if (ret != 0 || reg >= chip->num_leds) { in ktd202x_setup_led_single() 503 if (!count || count > chip->num_leds) in ktd202x_probe_fw() 561 chip->num_leds = (unsigned long)i2c_get_match_data(client); in ktd202x_probe()
|
/linux/drivers/mfd/ |
H A D | lm3533-core.c | 437 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()
|