summaryrefslogtreecommitdiff
path: root/drivers/pwm
diff options
context:
space:
mode:
authorLokesh Vutla <lokeshvutla@ti.com>2020-10-30 19:11:35 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-12-30 11:26:05 +0100
commit5992bce16a64662bb138237889201c30901c2dcf (patch)
tree1095101bea6a8fcdbcb01cfa6b136eb6a5265875 /drivers/pwm
parent550a7b7bba74f6a03f84e74c158bc0c72dd90eb6 (diff)
pwm: lp3943: Dynamically allocate PWM chip base
[ Upstream commit 1f0f1e80fdd3aa9631f6c22cda4f8550cfcfcc3e ] When there are other PWM controllers enabled along with pwm-lp3943, pwm-lp3942 is failing to probe with -EEXIST error. This is because other PWM controllers are probed first and assigned PWM base 0 and pwm-lp3943 is requesting for 0 again. In order to avoid this, assign the chip base with -1, so that it is dynamically allocated. Fixes: af66b3c0934e ("pwm: Add LP3943 PWM driver") Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Reviewed-by: Uwe Kleine-König <u.kleine-könig@pengutronix.de> Signed-off-by: Thierry Reding <thierry.reding@gmail.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/pwm')
-rw-r--r--drivers/pwm/pwm-lp3943.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/pwm/pwm-lp3943.c b/drivers/pwm/pwm-lp3943.c
index 15b40a8bc4fb..5055ba2c6c94 100644
--- a/drivers/pwm/pwm-lp3943.c
+++ b/drivers/pwm/pwm-lp3943.c
@@ -278,6 +278,7 @@ static int lp3943_pwm_probe(struct platform_device *pdev)
lp3943_pwm->chip.dev = &pdev->dev;
lp3943_pwm->chip.ops = &lp3943_pwm_ops;
lp3943_pwm->chip.npwm = LP3943_NUM_PWMS;
+ lp3943_pwm->chip.base = -1;
platform_set_drvdata(pdev, lp3943_pwm);