Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pwm: sti: Fix capture for st,pwm-num-chan < st,capture-num-chan
[ Upstream commit 5f62383 ] The driver only used the number of pwm channels to set the pwm_chip's npwm member. The result is that if there are more capture channels than PWM channels specified in the device tree, only a part of the capture channel is usable. Fix that by passing the bigger channel count to the pwm framework. This makes it possible that the .apply() callback is called with .hwpwm >= pwm_num_devs, catch that case and return an error code. Fixes: c97267a ("pwm: sti: Add PWM capture callback") Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Uwe Kleine-König <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
- Loading branch information