diff options
Diffstat (limited to 'drivers/leds/rgb')
| -rw-r--r-- | drivers/leds/rgb/leds-ktd202x.c | 4 | ||||
| -rw-r--r-- | drivers/leds/rgb/leds-ncp5623.c | 2 | ||||
| -rw-r--r-- | drivers/leds/rgb/leds-qcom-lpg.c | 10 |
3 files changed, 7 insertions, 9 deletions
diff --git a/drivers/leds/rgb/leds-ktd202x.c b/drivers/leds/rgb/leds-ktd202x.c index 04e62faa3a00..e4f0f25a5e45 100644 --- a/drivers/leds/rgb/leds-ktd202x.c +++ b/drivers/leds/rgb/leds-ktd202x.c @@ -391,7 +391,7 @@ static int ktd202x_setup_led_rgb(struct ktd202x *chip, struct fwnode_handle *fwn int i = 0; num_channels = 0; - fwnode_for_each_available_child_node(fwnode, child) + fwnode_for_each_child_node(fwnode, child) num_channels++; if (!num_channels || num_channels > chip->num_leds) @@ -401,7 +401,7 @@ static int ktd202x_setup_led_rgb(struct ktd202x *chip, struct fwnode_handle *fwn if (!info) return -ENOMEM; - fwnode_for_each_available_child_node(fwnode, child) { + fwnode_for_each_child_node(fwnode, child) { u32 mono_color; u32 reg; int ret; diff --git a/drivers/leds/rgb/leds-ncp5623.c b/drivers/leds/rgb/leds-ncp5623.c index 7c7d44623a9e..85d6be6fff2b 100644 --- a/drivers/leds/rgb/leds-ncp5623.c +++ b/drivers/leds/rgb/leds-ncp5623.c @@ -180,7 +180,7 @@ static int ncp5623_probe(struct i2c_client *client) goto release_mc_node; } - fwnode_for_each_available_child_node(mc_node, led_node) { + fwnode_for_each_child_node(mc_node, led_node) { ret = fwnode_property_read_u32(led_node, "color", &color_index); if (ret) goto release_led_node; diff --git a/drivers/leds/rgb/leds-qcom-lpg.c b/drivers/leds/rgb/leds-qcom-lpg.c index 4f2a178e3d26..72da0bf469ad 100644 --- a/drivers/leds/rgb/leds-qcom-lpg.c +++ b/drivers/leds/rgb/leds-qcom-lpg.c @@ -2,7 +2,7 @@ /* * Copyright (c) 2017-2022 Linaro Ltd * Copyright (c) 2010-2012, The Linux Foundation. All rights reserved. - * Copyright (c) 2023-2024, Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. */ #include <linux/bits.h> #include <linux/bitfield.h> @@ -1247,8 +1247,6 @@ static int lpg_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm, lpg_apply(chan); - triled_set(lpg, chan->triled_mask, chan->enabled ? chan->triled_mask : 0); - out_unlock: mutex_unlock(&lpg->lock); @@ -1382,7 +1380,7 @@ static int lpg_add_led(struct lpg *lpg, struct device_node *np) return dev_err_probe(lpg->dev, ret, "failed to parse \"color\" of %pOF\n", np); - if (color == LED_COLOR_ID_RGB) + if (color == LED_COLOR_ID_RGB || color == LED_COLOR_ID_MULTI) num_channels = of_get_available_child_count(np); else num_channels = 1; @@ -1394,7 +1392,7 @@ static int lpg_add_led(struct lpg *lpg, struct device_node *np) led->lpg = lpg; led->num_channels = num_channels; - if (color == LED_COLOR_ID_RGB) { + if (color == LED_COLOR_ID_RGB || color == LED_COLOR_ID_MULTI) { info = devm_kcalloc(lpg->dev, num_channels, sizeof(*info), GFP_KERNEL); if (!info) return -ENOMEM; @@ -1454,7 +1452,7 @@ static int lpg_add_led(struct lpg *lpg, struct device_node *np) init_data.fwnode = of_fwnode_handle(np); - if (color == LED_COLOR_ID_RGB) + if (color == LED_COLOR_ID_RGB || color == LED_COLOR_ID_MULTI) ret = devm_led_classdev_multicolor_register_ext(lpg->dev, &led->mcdev, &init_data); else ret = devm_led_classdev_register_ext(lpg->dev, &led->cdev, &init_data); |
