aboutsummaryrefslogtreecommitdiff
path: root/scripts/generate_rust_analyzer.py
diff options
context:
space:
mode:
authorHeiner Kallweit <[email protected]>2023-05-24 21:47:43 +0200
committerThierry Reding <[email protected]>2023-06-23 15:37:35 +0200
commit6b9352f3f8a1a35faf0efc1ad1807ee303467796 (patch)
treee79542b887cf26512dc9eefef2c1e5b2e8c6b850 /scripts/generate_rust_analyzer.py
parent5442c33f218b1aabbe699db978e407317a231d10 (diff)
pwm: meson: modify and simplify calculation in meson_pwm_get_state
I don't see a reason why we should treat the case lo < hi differently and return 0 as period and duty_cycle. The current logic was added with c375bcbaabdb ("pwm: meson: Read the full hardware state in meson_pwm_get_state()"), Martin as original author doesn't remember why it was implemented this way back then. So let's handle it as normal use case and also remove the optimization for lo == 0. I think the improved readability is worth it. Fixes: c375bcbaabdb ("pwm: meson: Read the full hardware state in meson_pwm_get_state()") Reviewed-by: Uwe Kleine-König <[email protected]> Reviewed-by: Dmitry Rokosov <[email protected]> Acked-by: Martin Blumenstingl <[email protected]> Cc: [email protected] Signed-off-by: Heiner Kallweit <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
Diffstat (limited to 'scripts/generate_rust_analyzer.py')
0 files changed, 0 insertions, 0 deletions