[PATCH v3] pwm: meson: modify and simplify calculation in meson_pwm_get_state
Martin Blumenstingl
martin.blumenstingl at googlemail.com
Mon May 8 12:44:50 PDT 2023
On Tue, May 2, 2023 at 10:33 PM Heiner Kallweit <hkallweit1 at gmail.com> wrote:
>
> 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 <u.kleine-koenig at pengutronix.de>
> Cc: stable at vger.kernel.org
> Signed-off-by: Heiner Kallweit <hkallweit1 at gmail.com>
Acked-by: Martin Blumenstingl <martin.blumenstingl at googlemail.com>
More information about the linux-arm-kernel
mailing list