This series improves the tegra-pwm driver. There are a few problems left though: - if the PWM is configured to a 100% duty cycle it writes bit 24 which is either bogus or needs a comment. - clock handling is broken: If pwm_disable() is called without calling pwm_enable() before, this triggers a warning in clk_disable(). This also might trigger a HW fault as the register is accessed without enabling the clock first. - The calculation of period and duty_cycle is imprecise as it divides by the result of a division and it discards relevant bits from pc->clk_rate without rounding. (I bet there are more problems, I only checked quickly trying to implement .get_state(), but I gave up.) I didn't address these because I have neither any hardware to test nor documentation. So this series is only compile tested. Best regards Uwe Uwe Kleine-König (6): pwm: tegra: Drop an if block with an always false condition pwm: tegra: Don't modify HW state in .remove callback pwm: tegra: Don't needlessly enable and disable the clock in .remove() pwm: tegra: Assert reset only after the PWM was unregistered pwm: tegra: Implement .apply callback pwm: tegra: unfold legacy callbacks into tegra_pwm_apply() drivers/pwm/pwm-tegra.c | 246 ++++++++++++++++++---------------------- 1 file changed, 112 insertions(+), 134 deletions(-) -- 2.30.2