leds: lm3692x: Make sure we don't exceed the maximum LED current
authorGuido Günther <agx@sigxcpu.org>
Mon, 6 Jan 2020 15:48:50 +0000 (16:48 +0100)
committerPavel <pavel@ucw.cz>
Tue, 7 Jan 2020 13:08:38 +0000 (14:08 +0100)
commitdf7083b57331da0222380392d8d0d8b39972bef9
treea3bcd00e666d143379ea065ea73000f9f68d1f46
parent3e0801b62a30f5c83df0b7c75afce50061401e30
leds: lm3692x: Make sure we don't exceed the maximum LED current

The current is given by the formular from page 12 of
https://www.ti.com/lit/ds/symlink/lm36922.pdf. We use this to limit the
led's max_brightness using the led-max-microamp DT property.

The formula for the lm36923 is identical according to the data sheet.

Signed-off-by: Guido Günther <agx@sigxcpu.org>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Pavel Machek <pavel@ucw.cz>
drivers/leds/leds-lm3692x.c