Skip to content

Commit 2c25b07

Browse files
ffainellithierryreding
authored andcommitted
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: e5a06dc ("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]>
1 parent 5df5a57 commit 2c25b07

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/pwm/pwm-bcm2835.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ static int bcm2835_pwm_probe(struct platform_device *pdev)
166166

167167
pc->chip.dev = &pdev->dev;
168168
pc->chip.ops = &bcm2835_pwm_ops;
169+
pc->chip.base = -1;
169170
pc->chip.npwm = 2;
170171
pc->chip.of_xlate = of_pwm_xlate_with_flags;
171172
pc->chip.of_pwm_n_cells = 3;

0 commit comments

Comments
 (0)