linux-stable/drivers/leds/rgb
Bjorn Andersson b05d39466b leds: qcom-lpg: Fix PWM period limits
The introduction of high resolution PWM support changed the order of the
operations in the calculation of min and max period. The result in both
divisions is in most cases a truncation to 0, which limits the period to
the range of [0, 0].

Both numerators (and denominators) are within 64 bits, so the whole
expression can be put directly into the div64_u64, instead of doing it
partially.

Fixes: b00d2ed376 ("leds: rgb: leds-qcom-lpg: Add support for high resolution PWM")
Reviewed-by: Caleb Connolly <caleb.connolly@linaro.org>
Tested-by: Steev Klimaszewski <steev@kali.org>
Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com>
Acked-by: Lee Jones <lee@kernel.org>
Tested-by: Johan Hovold <johan+linaro@kernel.org>
Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8550-QRD
Link: https://lore.kernel.org/r/20230515162604.649203-1-quic_bjorande@quicinc.com
Signed-off-by: Johan Hovold <johan@kernel.org>
2023-06-03 17:00:28 +02:00
..
Kconfig leds: rgb: mt6370: Correct config name to select in LEDS_MT6370_RGB 2023-03-30 13:42:56 +01:00
leds-mt6370-rgb.c leds: rgb: mt6370: Fix implicit declaration for FIELD_GET 2023-03-23 14:54:14 +00:00
leds-pwm-multicolor.c leds: pwm-multicolor: Simplify an error message 2023-04-20 12:32:14 +01:00
leds-qcom-lpg.c leds: qcom-lpg: Fix PWM period limits 2023-06-03 17:00:28 +02:00
Makefile leds: rgb: mt6370: Add MediaTek MT6370 current sink type LED Indicator support 2023-03-23 14:54:02 +00:00