From 0dff4eccbe5c97e5e0b606296cdf74be6072f768 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 26 Apr 2023 12:15:25 +0000 Subject: [PATCH] Revert "Revert "pwm: sprd: Explicitly set .polarity in .get_state()"" This reverts commit 46e141445414caf17ff2279b61068dd85c19db16. It was perserving the ABI, but that is not needed anymore at this point in time. Change-Id: I935958cfe8d7e01c7469818609534cfd0e9ba6de Signed-off-by: Greg Kroah-Hartman --- drivers/pwm/pwm-sprd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/pwm/pwm-sprd.c b/drivers/pwm/pwm-sprd.c index bda8bc5af976..87d5cb7f67d6 100644 --- a/drivers/pwm/pwm-sprd.c +++ b/drivers/pwm/pwm-sprd.c @@ -109,6 +109,7 @@ static int sprd_pwm_get_state(struct pwm_chip *chip, struct pwm_device *pwm, duty = val & SPRD_PWM_DUTY_MSK; tmp = (prescale + 1) * NSEC_PER_SEC * duty; state->duty_cycle = DIV_ROUND_CLOSEST_ULL(tmp, chn->clk_rate); + state->polarity = PWM_POLARITY_NORMAL; /* Disable PWM clocks if the PWM channel is not in enable state. */ if (!state->enabled)