lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231025190619.881090-2-robh@kernel.org>
Date:   Wed, 25 Oct 2023 14:06:19 -0500
From:   Rob Herring <robh@...nel.org>
To:     Pavel Machek <pavel@....cz>, Lee Jones <lee@...nel.org>
Cc:     Linus Walleij <linus.walleij@...aro.org>,
        linux-leds@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [RESEND PATCH v2] 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>
---
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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ