zephyr/drivers/led
Simon Guinot a4645908ee drivers: led_pwm: fix overflow in set_brightness
The set_brightness function of the led_pwm driver uses a default PWM
period (defined in the pwms DT property) to compute a pulse passed to
the pwm_set_pulse_dt function. If this default period is greater than
2^32/100 nanoseconds (about 43 milliseconds) then the calculation may
overflow.

This patch prevents this overflow by running the pulse computation under
a cast with a larger type (uint64_t).

Reported-by: Scott Worley <scott.worley@microchip.com>
Signed-off-by: Simon Guinot <simon.guinot@seagate.com>
2023-07-18 10:45:05 +00:00
..
CMakeLists.txt drivers: led: npm1300: nPM1300 LED driver 2023-06-23 08:55:13 +00:00
ht16k33.c
is31fl3216a.c drivers: led: Add lumissil is31fl3216a driver 2023-06-19 11:02:36 +02:00
Kconfig drivers: led: npm1300: nPM1300 LED driver 2023-06-23 08:55:13 +00:00
Kconfig.gpio
Kconfig.ht16k33
Kconfig.is31fl3216a drivers: led: Add lumissil is31fl3216a driver 2023-06-19 11:02:36 +02:00
Kconfig.lp503x
Kconfig.lp3943
Kconfig.lp5562
Kconfig.lp5569 drivers: led: Add lp5569 led controller driver 2023-06-19 09:17:52 +01:00
Kconfig.npm1300 drivers: led: npm1300: nPM1300 LED driver 2023-06-23 08:55:13 +00:00
Kconfig.pca9633
Kconfig.pwm
Kconfig.tlc59108
Kconfig.xec
led_context.h
led_gpio.c
led_handlers.c
led_mchp_xec.c
led_npm1300.c drivers: led: npm1300: nPM1300 LED driver 2023-06-23 08:55:13 +00:00
led_pwm.c drivers: led_pwm: fix overflow in set_brightness 2023-07-18 10:45:05 +00:00
led_shell.c drivers: led: shell: Correct command help of set_brightness 2023-04-24 16:29:30 +02:00
lp503x.c
lp3943.c
lp5562.c
lp5569.c drivers: led: add power management for ti lp5569 2023-06-19 09:17:52 +01:00
pca9633.c
tlc59108.c