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 <redacted>
Analyzed-by: Russell King [off-list ref]
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Reviewed-by: Uwe Kleine-König <redacted>
Thanks
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | https://www.pengutronix.de/ |