mirror of
https://github.com/torvalds/linux.git
synced 2026-11-28 01:13:11 +00:00
Commit8c193f4714("pwm: tegra: Optimize period calculation") updated the period calculation in the Tegra PWM driver and now returns an error if the period requested is less than minimum period supported. This is breaking PWM support on various Tegra platforms. For example, on the Tegra210 Jetson Nano platform this is breaking the PWM fan support and probing the PWM fan driver now fails ... pwm-fan pwm-fan: Failed to configure PWM: -22 pwm-fan: probe of pwm-fan failed with error -22 The problem is that the default parent clock for the PWM on Tegra210 is a 32kHz clock and is unable to support the requested PWM period. Fix PWM support on Tegra20, Tegra30, Tegra114, Tegra124 and Tegra210 by updating the parent clock for the PWM to be the PLL_P. Fixes:8c193f4714("pwm: tegra: Optimize period calculation") Signed-off-by: Jon Hunter <[email protected]> Tested-by: Robert Eckelmann <[email protected]> # TF101 T20 Tested-by: Antoni Aloy Torrens <[email protected]> # TF101 T20 Tested-by: Svyatoslav Ryhel <[email protected]> # TF201 T30 Tested-by: Andreas Westman Dorcsak <[email protected]> # TF700T T3 Link: https://lore.kernel.org/r/[email protected] Acked-by: Uwe Kleine-König <[email protected]> Signed-off-by: Stephen Boyd <[email protected]>