pwm: bcm2835: Fix period_ns range check
authorStefan Wahren <wahrenst@gmx.net>
Sat, 24 Aug 2019 14:09:47 +0000 (16:09 +0200)
committerThierry Reding <thierry.reding@gmail.com>
Fri, 20 Sep 2019 23:23:24 +0000 (01:23 +0200)
commit7e9713af316187f323b25ebf7eb1a8f03425e7e9
treec1ac2e079816199282863b70bcf9cebd3ec56723
parent4537e52a526698f503dcb151234414cfa46d534b
pwm: bcm2835: Fix period_ns range check

The range check for period_ns was written under assumption of a fixed
PWM clock. With clk-bcm2835 driver the PWM clock is a dynamic one.
So fix this by doing the range check on the period register value.

Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
drivers/pwm/pwm-bcm2835.c