Thread (7 messages) 7 messages, 3 authors, 2021-01-26

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

From: Uwe Kleine-König <hidden>
Date: 2021-01-20 17:34:04
Also in: linux-arm-kernel, linux-pwm

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/ |

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help