pwm: qpnp: Allocate the base for pwm chip automatically
Currently we're setting the base of a pwm chip with the channel number while adding the pwm chip. Generic pwm driver maintains a single bitmap for the channels from multiple devices. If there are multiple PWM hardware blocks with the same channel number, this causes a probe failure for the second device as that base is allocated already for the first device. Fix that by setting the base to be allocated automatically. Change-Id: If533ab0e70b5e32adac9ab53efdb6cd30edacadb Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
This commit is contained in:
parent
d5fc7ff608
commit
907b090a5a
|
@ -1910,7 +1910,7 @@ static int qpnp_pwm_probe(struct spmi_device *spmi)
|
|||
|
||||
pwm_chip->chip.dev = &spmi->dev;
|
||||
pwm_chip->chip.ops = &qpnp_pwm_ops;
|
||||
pwm_chip->chip.base = pwm_chip->channel_id;
|
||||
pwm_chip->chip.base = -1;
|
||||
pwm_chip->chip.npwm = 1;
|
||||
|
||||
rc = pwmchip_add(&pwm_chip->chip);
|
||||
|
|
Loading…
Reference in New Issue