diff options
author | Florian Fainelli <[email protected]> | 2020-02-03 13:35:35 -0800 |
---|---|---|
committer | Thierry Reding <[email protected]> | 2020-03-30 16:55:25 +0200 |
commit | 2c25b07e5ec119cab609e41407a1fb3fa61442f5 (patch) | |
tree | 7da0aa45ce8e46da48ad475e0964508c19d48a14 /drivers/pwm/pwm-bcm2835.c | |
parent | 5df5a577a6b4e92c74931e19c2b1f5820c834171 (diff) |
pwm: bcm2835: Dynamically allocate base
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 <[email protected]>
Acked-by: Uwe Kleine-König <[email protected]>
Reviewed-by: Nicolas Saenz Julienne <[email protected]>
Signed-off-by: Thierry Reding <[email protected]>
Diffstat (limited to 'drivers/pwm/pwm-bcm2835.c')
-rw-r--r-- | drivers/pwm/pwm-bcm2835.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/pwm/pwm-bcm2835.c b/drivers/pwm/pwm-bcm2835.c index 91e24f01b54e..d78f86f8e462 100644 --- a/drivers/pwm/pwm-bcm2835.c +++ b/drivers/pwm/pwm-bcm2835.c @@ -166,6 +166,7 @@ static int bcm2835_pwm_probe(struct platform_device *pdev) pc->chip.dev = &pdev->dev; pc->chip.ops = &bcm2835_pwm_ops; + pc->chip.base = -1; pc->chip.npwm = 2; pc->chip.of_xlate = of_pwm_xlate_with_flags; pc->chip.of_pwm_n_cells = 3; |