Message ID | 20230629134722.3908637-2-astrid.rost@axis.com |
---|---|
State | New |
Headers | show |
Series | [v1,1/2] led: leds-lp50xx: Add max-brightness as in leds-pwm | expand |
diff --git a/drivers/leds/leds-lp50xx.c b/drivers/leds/leds-lp50xx.c index 28d6b39fa72d..1cb54c0524a1 100644 --- a/drivers/leds/leds-lp50xx.c +++ b/drivers/leds/leds-lp50xx.c @@ -502,6 +502,8 @@ static int lp50xx_probe_dt(struct lp50xx *priv) led->mc_cdev.num_colors = num_colors; led->mc_cdev.subled_info = mc_led_info; led_cdev = &led->mc_cdev.led_cdev; + fwnode_property_read_u32(child, "max-brightness", + &led_cdev->max_brightness); led_cdev->brightness_set_blocking = lp50xx_brightness_set; ret = devm_led_classdev_multicolor_register_ext(priv->dev,
Add max-brightness in order to reduce the current on the connected LEDs. Normally, the maximum brightness is determined by the hardware, and this property is not required. This property is used to set a software limit. It could happen that an LED is made so bright that it gets damaged or causes damage due to restrictions in a specific system, such as mounting conditions. Signed-off-by: Astrid Rost <astrid.rost@axis.com> --- drivers/leds/leds-lp50xx.c | 2 ++ 1 file changed, 2 insertions(+)