Commit a82cc9b8 authored by Rob Herring's avatar Rob Herring Committed by Lee Jones

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: default avatarRob Herring <robh@kernel.org>
Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20231025190619.881090-2-robh@kernel.orgSigned-off-by: default avatarLee Jones <lee@kernel.org>
parent ee8bfb47
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment