Baruch Siach 0b68d02b6a gpio: mvebu: improve handling of pwm zero on/off values
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@pengutronix.de>
Analyzed-by: Russell King <linux@armlinux.org.uk>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
2021-02-15 11:43:30 +01:00
..
2020-07-20 15:34:59 +02:00
2020-07-23 15:03:25 +02:00
2020-01-15 11:24:19 +01:00
2019-09-03 16:04:19 +02:00
2020-12-09 15:17:24 +01:00
2019-11-07 09:27:48 +01:00
2020-12-09 15:17:24 +01:00
2021-02-15 11:43:28 +01:00
2019-11-07 09:27:48 +01:00
2019-12-09 10:40:18 +01:00
2020-12-09 15:17:24 +01:00
2020-12-09 15:17:24 +01:00
2021-02-15 11:43:29 +01:00
2020-12-06 00:13:17 +01:00