[RESEND PATCH v2] leds: syscon: Support 'reg' in addition to 'offset' for register address

Rob Herring posted 1 patch 2 years, 1 month ago
There is a newer version of this series
drivers/leds/leds-syscon.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
[RESEND PATCH v2] leds: syscon: Support 'reg' in addition to 'offset' for register address
Posted by Rob Herring 2 years, 1 month ago
The register-bit-led binding now also supports 'reg' in addition to
'offset' for the register address. Add support to the driver to get the
address from 'reg'.

Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: linux-leds@vger.kernel.org
Signed-off-by: Rob Herring <robh@kernel.org>
---
The binding change landed, but v2[1] was never applied.

[1] https://lore.kernel.org/all/20210913192816.1225025-3-robh@kernel.org/

 drivers/leds/leds-syscon.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/leds/leds-syscon.c b/drivers/leds/leds-syscon.c
index 360a376fa738..d633ad519d0c 100644
--- a/drivers/leds/leds-syscon.c
+++ b/drivers/leds/leds-syscon.c
@@ -81,7 +81,8 @@ static int syscon_led_probe(struct platform_device *pdev)
 
 	sled->map = map;
 
-	if (of_property_read_u32(np, "offset", &sled->offset))
+	if (of_property_read_u32(np, "reg", &sled->offset) &&
+	    of_property_read_u32(np, "offset", &sled->offset))
 		return -EINVAL;
 	if (of_property_read_u32(np, "mask", &sled->mask))
 		return -EINVAL;
-- 
2.42.0
Re: (subset) [RESEND PATCH v2] leds: syscon: Support 'reg' in addition to 'offset' for register address
Posted by Lee Jones 2 years ago
On Wed, 25 Oct 2023 14:06:19 -0500, Rob Herring wrote:
> The register-bit-led binding now also supports 'reg' in addition to
> 'offset' for the register address. Add support to the driver to get the
> address from 'reg'.
> 
> 

Applied, thanks!

[1/1] leds: syscon: Support 'reg' in addition to 'offset' for register address
      commit: 9add14f2aa3b7b456098819fb5e5750712db9cc5

--
Lee Jones [李琼斯]

Re: [RESEND PATCH v2] leds: syscon: Support 'reg' in addition to 'offset' for register address
Posted by Linus Walleij 2 years, 1 month ago
On Wed, Oct 25, 2023 at 9:09 PM Rob Herring <robh@kernel.org> wrote:

> The register-bit-led binding now also supports 'reg' in addition to
> 'offset' for the register address. Add support to the driver to get the
> address from 'reg'.
>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Cc: Pavel Machek <pavel@ucw.cz>
> Cc: linux-leds@vger.kernel.org
> Signed-off-by: Rob Herring <robh@kernel.org>

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij