]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
pwm: tiehrpwm: Enable pwmchip's parent device before setting configuration
authorGokul Praveen <g-praveen@ti.com>
Wed, 21 Jan 2026 06:11:34 +0000 (11:41 +0530)
committerUwe Kleine-König <ukleinek@kernel.org>
Wed, 21 Jan 2026 17:41:46 +0000 (18:41 +0100)
commit75e7ed52ac7c1da90f304dcda2906636404df921
tree2fa48916b1482d895400a6ca2556c8c8ac746730
parentdcce06fb729e672fb2cc1e921dad2e91284e13e0
pwm: tiehrpwm: Enable pwmchip's parent device before setting configuration

The period and duty cycle configurations on J7200 and J784S4 SoCs
does not get reflected after setting them using sysfs nodes.
This is because at the end of ehrpwm_pwm_config function,
the put_sync function is called which resets the hardware.

Hold the PWM controller out of low-power mode during .apply() to
make sure it accepts the writes to its registers.

This renders the calls to pm_runtime_get_sync() and
pm_runtime_put_sync() in ehrpwm_pwm_config() into no-ops, so
these can be dropped.

Fixes: 5f027d9b83db ("pwm: tiehrpwm: Implement .apply() callback")
Signed-off-by: Gokul Praveen <g-praveen@ti.com>
Suggested-by: Uwe Kleine-König <ukleinek@kernel.org>
Link: https://patch.msgid.link/20260121061134.15466-1-g-praveen@ti.com
Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org>
drivers/pwm/pwm-tiehrpwm.c