aboutsummaryrefslogtreecommitdiff
path: root/tools/testing/selftests/net/lib/py/utils.py
diff options
context:
space:
mode:
authorBjorn Andersson <[email protected]>2023-05-15 09:26:04 -0700
committerJohan Hovold <[email protected]>2023-06-03 17:00:28 +0200
commitb05d39466ba111fc3775d5d46180b73c34ebe8f7 (patch)
tree80f36fd138a642d7f7867ff34a239a4115cfcaa1 /tools/testing/selftests/net/lib/py/utils.py
parent7877cb91f1081754a1487c144d85dc0d2e2e7fc4 (diff)
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: b00d2ed37617 ("leds: rgb: leds-qcom-lpg: Add support for high resolution PWM") Reviewed-by: Caleb Connolly <[email protected]> Tested-by: Steev Klimaszewski <[email protected]> Signed-off-by: Bjorn Andersson <[email protected]> Acked-by: Lee Jones <[email protected]> Tested-by: Johan Hovold <[email protected]> Tested-by: Neil Armstrong <[email protected]> # on SM8550-QRD Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Johan Hovold <[email protected]>
Diffstat (limited to 'tools/testing/selftests/net/lib/py/utils.py')
0 files changed, 0 insertions, 0 deletions