linux-leds.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Linus Walleij <linus.walleij@linaro.org>,
	Stephen Boyd <sboyd@kernel.org>, Pavel Machek <pavel@ucw.cz>
Cc: Liviu Dudau <liviu.dudau@arm.com>,
	Sudeep Holla <sudeep.holla@arm.com>,
	Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
	linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-leds@vger.kernel.org
Subject: [PATCH 3/8] leds: syscon: Support 'reg' in addition to 'offset' for register address
Date: Thu,  9 Sep 2021 16:31:13 -0500	[thread overview]
Message-ID: <20210909213118.1087083-4-robh@kernel.org> (raw)
In-Reply-To: <20210909213118.1087083-1-robh@kernel.org>

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>
---
 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


  parent reply	other threads:[~2021-09-09 21:31 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-09 21:31 [PATCH 0/8] Arm boards syscon 'unit_address_format' clean-ups Rob Herring
2021-09-09 21:31 ` [PATCH 1/8] dt-bindings: leds: Convert register-bit-led binding to DT schema Rob Herring
2021-09-09 21:31 ` [PATCH 2/8] dt-bindings: leds: register-bit-led: Use 'reg' instead of 'offset' Rob Herring
2021-09-09 21:31 ` Rob Herring [this message]
2021-09-09 21:31 ` [PATCH 4/8] dt-bindings: clock: arm,syscon-icst: Use 'reg' instead of 'vco-offset' for VCO register address Rob Herring
2021-09-10 13:11   ` Rob Herring
2021-09-09 21:31 ` [PATCH 5/8] clk: versatile: clk-icst: Support 'reg' in addition to 'vco-offset' for " Rob Herring
2021-09-09 21:31 ` [PATCH 6/8] ARM: dts: arm: Update register-bit-led nodes 'reg' and node names Rob Herring
2021-09-14  8:25   ` Sudeep Holla
2021-09-17 23:41   ` Linus Walleij
2021-09-09 21:31 ` [PATCH 7/8] ARM: dts: arm: Update ICST clock " Rob Herring
2021-09-09 21:31 ` [PATCH 8/8] kbuild: Enable dtc 'unit_address_format' warning by default Rob Herring
2021-09-10  0:27   ` Masahiro Yamada

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210909213118.1087083-4-robh@kernel.org \
    --to=robh@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=liviu.dudau@arm.com \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=pavel@ucw.cz \
    --cc=sboyd@kernel.org \
    --cc=sudeep.holla@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).