diff options
author | Rob Herring <robh@kernel.org> | 2023-10-25 14:06:19 -0500 |
---|---|---|
committer | Lee Jones <lee@kernel.org> | 2023-12-13 11:28:26 +0000 |
commit | a82cc9b8debfa3e71098a71bece2a696cc1d9624 (patch) | |
tree | 30259d37286ea0804d3ade9979899c2452a4f552 | |
parent | ee8bfb47222a5cc59dee345b7369c5f2068e78cd (diff) |
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'.
Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20231025190619.881090-2-robh@kernel.org
Signed-off-by: Lee Jones <lee@kernel.org>
-rw-r--r-- | drivers/leds/leds-syscon.c | 3 |
1 files changed, 2 insertions, 1 deletions
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; |