Files
linux/drivers/pwm
Fabrice Gasnier 6534865953 pwm: stm32-lp: Add check in case requested period cannot be achieved
[ Upstream commit c91e3234c6 ]

LPTimer can use a 32KHz clock for counting. It depends on clock tree
configuration. In such a case, PWM output frequency range is limited.
Although unlikely, nothing prevents user from requesting a PWM frequency
above counting clock (32KHz for instance):
- This causes (prd - 1) = 0xffff to be written in ARR register later in
the apply() routine.
This results in badly configured PWM period (and also duty_cycle).
Add a check to report an error is such a case.

Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-10-11 18:21:17 +02:00
..
2018-08-20 11:36:07 +02:00
2018-03-26 15:57:08 +02:00
2018-04-30 10:40:57 +02:00
2017-04-06 17:45:03 +02:00
2017-11-15 10:38:37 +01:00
2018-07-09 18:59:14 +02:00
2018-07-12 09:03:06 +02:00
2017-01-19 00:38:17 +01:00
2018-04-30 10:40:57 +02:00
2017-08-21 08:11:24 +02:00