summaryrefslogtreecommitdiff
path: root/drivers/pwm/pwm-hibvt.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pwm/pwm-hibvt.c')
-rw-r--r--drivers/pwm/pwm-hibvt.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/pwm/pwm-hibvt.c b/drivers/pwm/pwm-hibvt.c
index 12c05c155cab..1b9274c5ad87 100644
--- a/drivers/pwm/pwm-hibvt.c
+++ b/drivers/pwm/pwm-hibvt.c
@@ -146,6 +146,7 @@ static int hibvt_pwm_get_state(struct pwm_chip *chip, struct pwm_device *pwm,
value = readl(base + PWM_CTRL_ADDR(pwm->hwpwm));
state->enabled = (PWM_ENABLE_MASK & value);
+ state->polarity = (PWM_POLARITY_MASK & value) ? PWM_POLARITY_INVERSED : PWM_POLARITY_NORMAL;
return 0;
}