]> git.baikalelectronics.ru Git - kernel.git/commit
pwm: lp3943: Dynamically allocate PWM chip base
authorLokesh Vutla <lokeshvutla@ti.com>
Fri, 30 Oct 2020 13:41:35 +0000 (19:11 +0530)
committerThierry Reding <thierry.reding@gmail.com>
Thu, 17 Dec 2020 13:18:55 +0000 (14:18 +0100)
commited6f290e701b421dd0fe89b86b21947ac195973d
tree061f4fe2196d37f260e63ed7f5e6af2bd6748da6
parentda5950401ac41ca3ca1504d98b4fb7723d03c853
pwm: lp3943: Dynamically allocate PWM chip base

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: ef0e3f68b1f0 ("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>
drivers/pwm/pwm-lp3943.c