pwm: bcm2835: Dynamically allocate base
authorFlorian Fainelli <f.fainelli@gmail.com>
Mon, 3 Feb 2020 21:35:35 +0000 (13:35 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Apr 2020 14:31:14 +0000 (16:31 +0200)
commit597cb12c6a927f527c40c1875969a2497f8d2207
tree2e8c4d4b35a0cd922223306ec917372b379628c2
parent0b03af5905fcd982ca3abc8ed321a442d7d05171
pwm: bcm2835: Dynamically allocate base

[ Upstream commit 2c25b07e5ec119cab609e41407a1fb3fa61442f5 ]

The newer 2711 and 7211 chips have two PWM controllers and failure to
dynamically allocate the PWM base would prevent the second PWM
controller instance being probed for succeeding with an -EEXIST error
from alloc_pwms().

Fixes: e5a06dc5ac1f ("pwm: Add BCM2835 PWM driver")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/pwm/pwm-bcm2835.c