[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210913192816.1225025-4-robh@kernel.org>
Date: Mon, 13 Sep 2021 14:28:11 -0500
From: Rob Herring <robh@...nel.org>
To: Linus Walleij <linus.walleij@...aro.org>,
Stephen Boyd <sboyd@...nel.org>, Pavel Machek <pavel@....cz>
Cc: Liviu Dudau <liviu.dudau@....com>,
Sudeep Holla <sudeep.holla@....com>,
Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
linux-arm-kernel@...ts.infradead.org, linux-clk@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-leds@...r.kernel.org
Subject: [PATCH v2 3/8] leds: syscon: Support 'reg' in addition to 'offset' for register address
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@...aro.org>
Cc: Pavel Machek <pavel@....cz>
Cc: linux-leds@...r.kernel.org
Signed-off-by: Rob Herring <robh@...nel.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 7eddb8ecb44e..44e79cdf5c39 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.30.2
Powered by blists - more mailing lists