Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Rob Herring and committed by
Lee Jones
a82cc9b8 ee8bfb47

+2 -1
+2 -1
drivers/leds/leds-syscon.c
··· 81 81 82 82 sled->map = map; 83 83 84 - if (of_property_read_u32(np, "offset", &sled->offset)) 84 + if (of_property_read_u32(np, "reg", &sled->offset) && 85 + of_property_read_u32(np, "offset", &sled->offset)) 85 86 return -EINVAL; 86 87 if (of_property_read_u32(np, "mask", &sled->mask)) 87 88 return -EINVAL;