* [PATCH v1 1/3] leds: lm3532: Switch to use fwnode_property_count_uXX()
@ 2019-07-23 20:14 Andy Shevchenko
2019-07-23 20:14 ` [PATCH v1 2/3] leds: lm36274: " Andy Shevchenko
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Andy Shevchenko @ 2019-07-23 20:14 UTC (permalink / raw)
To: Jacek Anaszewski, Pavel Machek, linux-leds, Dan Murphy; +Cc: Andy Shevchenko
Use fwnode_property_count_uXX() directly, that makes code neater.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/leds/leds-lm3532.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/leds/leds-lm3532.c b/drivers/leds/leds-lm3532.c
index 180895b83b88..646100724971 100644
--- a/drivers/leds/leds-lm3532.c
+++ b/drivers/leds/leds-lm3532.c
@@ -549,10 +549,7 @@ static int lm3532_parse_node(struct lm3532_data *priv)
lm3532_als_configure(priv, led);
}
- led->num_leds = fwnode_property_read_u32_array(child,
- "led-sources",
- NULL, 0);
-
+ led->num_leds = fwnode_property_count_u32(child, "led-sources");
if (led->num_leds > LM3532_MAX_LED_STRINGS) {
dev_err(&priv->client->dev, "To many LED string defined\n");
continue;
--
2.20.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v1 2/3] leds: lm36274: Switch to use fwnode_property_count_uXX()
2019-07-23 20:14 [PATCH v1 1/3] leds: lm3532: Switch to use fwnode_property_count_uXX() Andy Shevchenko
@ 2019-07-23 20:14 ` Andy Shevchenko
2019-07-24 15:19 ` Dan Murphy
2019-07-23 20:14 ` [PATCH v1 3/3] leds: lm3697: " Andy Shevchenko
` (2 subsequent siblings)
3 siblings, 1 reply; 7+ messages in thread
From: Andy Shevchenko @ 2019-07-23 20:14 UTC (permalink / raw)
To: Jacek Anaszewski, Pavel Machek, linux-leds, Dan Murphy; +Cc: Andy Shevchenko
Use fwnode_property_count_uXX() directly, that makes code neater.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/leds/leds-lm36274.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/leds/leds-lm36274.c b/drivers/leds/leds-lm36274.c
index ed9dc857ec8f..836b60c9a2b8 100644
--- a/drivers/leds/leds-lm36274.c
+++ b/drivers/leds/leds-lm36274.c
@@ -90,9 +90,7 @@ static int lm36274_parse_dt(struct lm36274 *lm36274_data)
snprintf(label, sizeof(label),
"%s:%s", lm36274_data->pdev->name, name);
- lm36274_data->num_leds = fwnode_property_read_u32_array(child,
- "led-sources",
- NULL, 0);
+ lm36274_data->num_leds = fwnode_property_count_u32(child, "led-sources");
if (lm36274_data->num_leds <= 0)
return -ENODEV;
--
2.20.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v1 3/3] leds: lm3697: Switch to use fwnode_property_count_uXX()
2019-07-23 20:14 [PATCH v1 1/3] leds: lm3532: Switch to use fwnode_property_count_uXX() Andy Shevchenko
2019-07-23 20:14 ` [PATCH v1 2/3] leds: lm36274: " Andy Shevchenko
@ 2019-07-23 20:14 ` Andy Shevchenko
2019-07-24 15:20 ` Dan Murphy
2019-07-24 15:19 ` [PATCH v1 1/3] leds: lm3532: " Dan Murphy
2019-07-24 21:03 ` Jacek Anaszewski
3 siblings, 1 reply; 7+ messages in thread
From: Andy Shevchenko @ 2019-07-23 20:14 UTC (permalink / raw)
To: Jacek Anaszewski, Pavel Machek, linux-leds, Dan Murphy; +Cc: Andy Shevchenko
Use fwnode_property_count_uXX() directly, that makes code neater.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/leds/leds-lm3697.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/leds/leds-lm3697.c b/drivers/leds/leds-lm3697.c
index 54e0e35df824..b71711aff8a3 100644
--- a/drivers/leds/leds-lm3697.c
+++ b/drivers/leds/leds-lm3697.c
@@ -244,10 +244,7 @@ static int lm3697_probe_dt(struct lm3697 *priv)
led->lmu_data.lsb_brightness_reg = LM3697_CTRL_A_BRT_LSB +
led->control_bank * 2;
- led->num_leds = fwnode_property_read_u32_array(child,
- "led-sources",
- NULL, 0);
-
+ led->num_leds = fwnode_property_count_u32(child, "led-sources");
if (led->num_leds > LM3697_MAX_LED_STRINGS) {
dev_err(&priv->client->dev, "To many LED strings defined\n");
continue;
--
2.20.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v1 1/3] leds: lm3532: Switch to use fwnode_property_count_uXX()
2019-07-23 20:14 [PATCH v1 1/3] leds: lm3532: Switch to use fwnode_property_count_uXX() Andy Shevchenko
2019-07-23 20:14 ` [PATCH v1 2/3] leds: lm36274: " Andy Shevchenko
2019-07-23 20:14 ` [PATCH v1 3/3] leds: lm3697: " Andy Shevchenko
@ 2019-07-24 15:19 ` Dan Murphy
2019-07-24 21:03 ` Jacek Anaszewski
3 siblings, 0 replies; 7+ messages in thread
From: Dan Murphy @ 2019-07-24 15:19 UTC (permalink / raw)
To: Andy Shevchenko, Jacek Anaszewski, Pavel Machek, linux-leds
Andy
On 7/23/19 3:14 PM, Andy Shevchenko wrote:
> Use fwnode_property_count_uXX() directly, that makes code neater.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Thanks for the update with the new call
Acked-by: Dan Murphy <dmurphy@ti.com>
> ---
> drivers/leds/leds-lm3532.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/leds/leds-lm3532.c b/drivers/leds/leds-lm3532.c
> index 180895b83b88..646100724971 100644
> --- a/drivers/leds/leds-lm3532.c
> +++ b/drivers/leds/leds-lm3532.c
> @@ -549,10 +549,7 @@ static int lm3532_parse_node(struct lm3532_data *priv)
> lm3532_als_configure(priv, led);
> }
>
> - led->num_leds = fwnode_property_read_u32_array(child,
> - "led-sources",
> - NULL, 0);
> -
> + led->num_leds = fwnode_property_count_u32(child, "led-sources");
> if (led->num_leds > LM3532_MAX_LED_STRINGS) {
> dev_err(&priv->client->dev, "To many LED string defined\n");
> continue;
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v1 2/3] leds: lm36274: Switch to use fwnode_property_count_uXX()
2019-07-23 20:14 ` [PATCH v1 2/3] leds: lm36274: " Andy Shevchenko
@ 2019-07-24 15:19 ` Dan Murphy
0 siblings, 0 replies; 7+ messages in thread
From: Dan Murphy @ 2019-07-24 15:19 UTC (permalink / raw)
To: Andy Shevchenko, Jacek Anaszewski, Pavel Machek, linux-leds
Andy
On 7/23/19 3:14 PM, Andy Shevchenko wrote:
> Use fwnode_property_count_uXX() directly, that makes code neater.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Thanks for the update
Acked-by: Dan Murphy <dmurphy@ti.com>
> ---
> drivers/leds/leds-lm36274.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/leds/leds-lm36274.c b/drivers/leds/leds-lm36274.c
> index ed9dc857ec8f..836b60c9a2b8 100644
> --- a/drivers/leds/leds-lm36274.c
> +++ b/drivers/leds/leds-lm36274.c
> @@ -90,9 +90,7 @@ static int lm36274_parse_dt(struct lm36274 *lm36274_data)
> snprintf(label, sizeof(label),
> "%s:%s", lm36274_data->pdev->name, name);
>
> - lm36274_data->num_leds = fwnode_property_read_u32_array(child,
> - "led-sources",
> - NULL, 0);
> + lm36274_data->num_leds = fwnode_property_count_u32(child, "led-sources");
> if (lm36274_data->num_leds <= 0)
> return -ENODEV;
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v1 3/3] leds: lm3697: Switch to use fwnode_property_count_uXX()
2019-07-23 20:14 ` [PATCH v1 3/3] leds: lm3697: " Andy Shevchenko
@ 2019-07-24 15:20 ` Dan Murphy
0 siblings, 0 replies; 7+ messages in thread
From: Dan Murphy @ 2019-07-24 15:20 UTC (permalink / raw)
To: Andy Shevchenko, Jacek Anaszewski, Pavel Machek, linux-leds
Andy
On 7/23/19 3:14 PM, Andy Shevchenko wrote:
> Use fwnode_property_count_uXX() directly, that makes code neater.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Dan Murphy <dmurphy@ti.com>
> ---
> drivers/leds/leds-lm3697.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/leds/leds-lm3697.c b/drivers/leds/leds-lm3697.c
> index 54e0e35df824..b71711aff8a3 100644
> --- a/drivers/leds/leds-lm3697.c
> +++ b/drivers/leds/leds-lm3697.c
> @@ -244,10 +244,7 @@ static int lm3697_probe_dt(struct lm3697 *priv)
> led->lmu_data.lsb_brightness_reg = LM3697_CTRL_A_BRT_LSB +
> led->control_bank * 2;
>
> - led->num_leds = fwnode_property_read_u32_array(child,
> - "led-sources",
> - NULL, 0);
> -
> + led->num_leds = fwnode_property_count_u32(child, "led-sources");
> if (led->num_leds > LM3697_MAX_LED_STRINGS) {
> dev_err(&priv->client->dev, "To many LED strings defined\n");
> continue;
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v1 1/3] leds: lm3532: Switch to use fwnode_property_count_uXX()
2019-07-23 20:14 [PATCH v1 1/3] leds: lm3532: Switch to use fwnode_property_count_uXX() Andy Shevchenko
` (2 preceding siblings ...)
2019-07-24 15:19 ` [PATCH v1 1/3] leds: lm3532: " Dan Murphy
@ 2019-07-24 21:03 ` Jacek Anaszewski
3 siblings, 0 replies; 7+ messages in thread
From: Jacek Anaszewski @ 2019-07-24 21:03 UTC (permalink / raw)
To: Andy Shevchenko, Pavel Machek, linux-leds, Dan Murphy
Hi Andy,
Thank you for the patch set.
Patches 1-3 applied.
On 7/23/19 10:14 PM, Andy Shevchenko wrote:
> Use fwnode_property_count_uXX() directly, that makes code neater.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
> drivers/leds/leds-lm3532.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/leds/leds-lm3532.c b/drivers/leds/leds-lm3532.c
> index 180895b83b88..646100724971 100644
> --- a/drivers/leds/leds-lm3532.c
> +++ b/drivers/leds/leds-lm3532.c
> @@ -549,10 +549,7 @@ static int lm3532_parse_node(struct lm3532_data *priv)
> lm3532_als_configure(priv, led);
> }
>
> - led->num_leds = fwnode_property_read_u32_array(child,
> - "led-sources",
> - NULL, 0);
> -
> + led->num_leds = fwnode_property_count_u32(child, "led-sources");
> if (led->num_leds > LM3532_MAX_LED_STRINGS) {
> dev_err(&priv->client->dev, "To many LED string defined\n");
> continue;
>
--
Best regards,
Jacek Anaszewski
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2019-07-24 21:03 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-23 20:14 [PATCH v1 1/3] leds: lm3532: Switch to use fwnode_property_count_uXX() Andy Shevchenko
2019-07-23 20:14 ` [PATCH v1 2/3] leds: lm36274: " Andy Shevchenko
2019-07-24 15:19 ` Dan Murphy
2019-07-23 20:14 ` [PATCH v1 3/3] leds: lm3697: " Andy Shevchenko
2019-07-24 15:20 ` Dan Murphy
2019-07-24 15:19 ` [PATCH v1 1/3] leds: lm3532: " Dan Murphy
2019-07-24 21:03 ` Jacek Anaszewski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).