Revert "Revert "pwm: sprd: Explicitly set .polarity in .get_state()""

This reverts commit 46e1414454.

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 <gregkh@google.com>
This commit is contained in:
Greg Kroah-Hartman 2023-04-26 12:15:25 +00:00 committed by Carlos Llamas
parent fa46734e23
commit 0dff4eccbe

View File

@ -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)