[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230228135508.1798428-3-u.kleine-koenig@pengutronix.de>
Date: Tue, 28 Feb 2023 14:55:06 +0100
From: Uwe Kleine-König
<u.kleine-koenig@...gutronix.de>
To: Thierry Reding <thierry.reding@...il.com>,
Munehisa Kamata <kamatam@...zon.com>,
Benson Leung <bleung@...omium.org>
Cc: Guenter Roeck <groeck@...omium.org>, linux-pwm@...r.kernel.org,
chrome-platform@...ts.linux.dev, linux-kernel@...r.kernel.org,
kernel@...gutronix.de
Subject: [PATCH 2/4] 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.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
---
drivers/pwm/pwm-cros-ec.c | 1 +
1 file changed, 1 insertion(+)
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
--
2.39.1
Powered by blists - more mailing lists