[PATCH v2 1/5] gpio: mvebu: fix pwm .get_state period calculation

Uwe Kleine-König u.kleine-koenig at pengutronix.de
Wed Jan 13 04:27:34 EST 2021


On Wed, Jan 13, 2021 at 11:22:41AM +0200, Baruch Siach wrote:
> The period is the sum of on and off values. That is, calculate period as
> 
>   ($on + $off) / clkrate
> 
> instead of
> 
>   $off / clkrate - $on / clkrate
> 
> that makes no sense.
> 
> Reported-by: Russell King <linux at armlinux.org.uk>
> Fixes: 757642f9a584e ("gpio: mvebu: Add limited PWM support")
> Signed-off-by: Baruch Siach <baruch at tkos.co.il>

Reviewed-by: Uwe Kleine-König <u.kleine-koenig at pengutronix.de>

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20210113/f21a5ef5/attachment.sig>


More information about the linux-arm-kernel mailing list