diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2023-03-23 00:45:41 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-04-13 17:55:18 +0300 |
commit | 8a3a6a0aca8c92533792bc37a1040aa72941665a (patch) | |
tree | 24e679a9ffc366f83ea2281e9c0c72e303cb0eb3 /drivers/pwm | |
parent | 98ba763cc91c8e0117ccc28e300640eee52f9b44 (diff) | |
download | linux-8a3a6a0aca8c92533792bc37a1040aa72941665a.tar.xz |
pwm: cros-ec: Explicitly set .polarity in .get_state()
[ Upstream commit 30006b77c7e130e01d1ab2148cc8abf73dfcc4bf ]
The driver only supports normal polarity. Complete the implementation of
.get_state() by setting .polarity accordingly.
Reviewed-by: Guenter Roeck <groeck@chromium.org>
Fixes: 1f0d3bb02785 ("pwm: Add ChromeOS EC PWM driver")
Link: https://lore.kernel.org/r/20230228135508.1798428-3-u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/pwm')
-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 11684edc0620..e55bc36ed497 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 |