7.3-stable review patch. If anyone has any objections, please let me know. ------------------ From: Alexander Sverdlin [ Upstream commit e74b9a7ee50071aad25d3989bf985292f90b0c6e ] Both channels share one period register, so ehrpwm_pwm_config() rejects a period differing from the sibling's period_cycles[]. That value was cleared only in .free(), not in .disable(), so a stopped channel kept blocking the sibling from switching to a new frequency. Clear it in .disable() too. Testcase: cd /sys/class/pwm/pwmchip0; echo 0 > export; echo 1 > export for p in pwm0 pwm1; do echo 1000000 > $p/period; echo 500000 > $p/duty_cycle echo 1 > $p/enable; echo 0 > $p/enable; echo 2000000 > $p/period done echo 1 > pwm0/enable # before: -EINVAL, after: succeeds Fixes: 01b2d4536f02 ("pwm: pwm-tiehrpwm: Fix conflicting channel period setting") Cc: stable@vger.kernel.org Signed-off-by: Alexander Sverdlin Link: https://patch.msgid.link/20260929120806.2790355-1-alexander.sverdlin@siemens.com Signed-off-by: Uwe Kleine-König Signed-off-by: Sasha Levin --- drivers/pwm/pwm-tiehrpwm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/pwm/pwm-tiehrpwm.c b/drivers/pwm/pwm-tiehrpwm.c index 3a53489f0b982..e3407d0a1f7fe 100644 --- a/drivers/pwm/pwm-tiehrpwm.c +++ b/drivers/pwm/pwm-tiehrpwm.c @@ -358,6 +358,9 @@ static void ehrpwm_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm) /* Disable clock on PWM disable */ pm_runtime_put_sync(pwmchip_parent(chip)); + + /* A disabled channel must not constrain the sibling's period */ + pc->period_cycles[pwm->hwpwm] = 0; } static void ehrpwm_pwm_free(struct pwm_chip *chip, struct pwm_device *pwm) -- 2.53.0