diff options
author | Uwe Kleine-König <[email protected]> | 2023-03-22 22:45:41 +0100 |
---|---|---|
committer | Thierry Reding <[email protected]> | 2023-03-23 14:44:41 +0100 |
commit | 30006b77c7e130e01d1ab2148cc8abf73dfcc4bf (patch) | |
tree | 28cb0aba81d7336aa17c8ff9936dbe6e85f65b44 | |
parent | 6f57937980142715e927697a6ffd2050f38ed6f6 (diff) |
pwm: cros-ec: Explicitly set .polarity in .get_state()
The driver only supports normal polarity. Complete the implementation of
.get_state() by setting .polarity accordingly.
Reviewed-by: Guenter Roeck <[email protected]>
Fixes: 1f0d3bb02785 ("pwm: Add ChromeOS EC PWM driver")
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Uwe Kleine-König <[email protected]>
Signed-off-by: Thierry Reding <[email protected]>
-rw-r--r-- | drivers/pwm/pwm-cros-ec.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/pwm/pwm-cros-ec.c b/drivers/pwm/pwm-cros-ec.c index 86df6702cb83..ad18b0ebe3f1 100644 --- a/drivers/pwm/pwm-cros-ec.c +++ b/drivers/pwm/pwm-cros-ec.c @@ -198,6 +198,7 @@ static int cros_ec_pwm_get_state(struct pwm_chip *chip, struct pwm_device *pwm, state->enabled = (ret > 0); state->period = EC_PWM_MAX_DUTY; + state->polarity = PWM_POLARITY_NORMAL; /* * Note that "disabled" and "duty cycle == 0" are treated the same. If |