leds: aw200xx: Improve autodim calculation method
authorGeorge Stark <gnstark@salutedevices.com>
Sat, 25 Nov 2023 20:05:16 +0000 (23:05 +0300)
committerLee Jones <lee@kernel.org>
Wed, 13 Dec 2023 11:29:00 +0000 (11:29 +0000)
commit150bca53652d8dcef9714d0873a86e129391f1e6
treeeb1bc19387e9de8612a2e608aed2254e4e328813
parent96b43a108bd689159486e97cb5a8b0170fa46657
leds: aw200xx: Improve autodim calculation method

It is highly recommended to leverage the DIV_ROUND_UP() function as a
more refined and mathematically precise alternative to employing a
coarse division method.

Signed-off-by: George Stark <gnstark@salutedevices.com>
Signed-off-by: Dmitry Rokosov <ddrokosov@salutedevices.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20231125200519.1750-9-ddrokosov@salutedevices.com
Signed-off-by: Lee Jones <lee@kernel.org>
drivers/leds/leds-aw200xx.c