Re: [PATCH v5 4/4] gpio: mvebu: improve handling of pwm zero on/off values

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jan 20, 2021 at 06:16:28PM +0200, Baruch Siach wrote:
> Hardware appears to treat zero value as 2^32. Take advantage of this
> fact to support on/off values of up to UINT_MAX+1 == 2^32. Adjust both
> .apply and .get_state to handle zero as a special case.
> 
> Rounded up division result in .get_state can't be zero, since the
> dividend is now larger than 0. Remove check for this case.
> 
> Reported-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx>
> Analyzed-by: Russell King <linux@xxxxxxxxxxxxxxx>
> Signed-off-by: Baruch Siach <baruch@xxxxxxxxxx>

Reviewed-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx>

Thanks
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux