From patchwork Tue Feb 28 13:55:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13154934 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [85.220.165.71]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2CA04323D for ; Tue, 28 Feb 2023 13:55:24 +0000 (UTC) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pX0Rt-0007wv-33; Tue, 28 Feb 2023 14:55:21 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pX0Rr-000sdC-Si; Tue, 28 Feb 2023 14:55:19 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pX0Rr-0011dg-0Q; Tue, 28 Feb 2023 14:55:19 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Thierry Reding , Munehisa Kamata , Benson Leung Cc: Guenter Roeck , linux-pwm@vger.kernel.org, chrome-platform@lists.linux.dev, linux-kernel@vger.kernel.org, kernel@pengutronix.de Subject: [PATCH 2/4] pwm: cros-ec: Explicitly set .polarity in .get_state() Date: Tue, 28 Feb 2023 14:55:06 +0100 Message-Id: <20230228135508.1798428-3-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230228135508.1798428-1-u.kleine-koenig@pengutronix.de> References: <20230228135508.1798428-1-u.kleine-koenig@pengutronix.de> Precedence: bulk X-Mailing-List: chrome-platform@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=749; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=IAtiCGV0wRa2U+/PppANZkZKRqaD1N3SRiIodPKqHTk=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBj/gevfhS7IyOpnmkoKmE420NdX4odBQ8eZG4d2 I2ybrXNvZCJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCY/4HrwAKCRDB/BR4rcrs Ceq2B/9uCvaS+h95L+nfKjNahQfxtSyvPKw84Bl5AdHl2eN8Dy3mvqKAj725tx3O8JoslREBw4/ k1yU9cCbtDN000837fApwnhAo5parWgJLsStdKIuE8ddcjtwTFLlku5s7gtUkPT/DxCAb7pE9Wz jsltzncD+SOAQAJi2mZqE1GYrVMBTqUDc5JtB1RW/Z0H4/jq00y1p4T9i8Xxhy4N8LpYeax+Xnu gYp9kfIyT/KWyGBhbndnN+QCxFC8kgs03aonHEF8uflNO3hVQwOAnRJFqN3tLWwBnvZpZJaKOEf nuL3FO6V8tuHZwwslunaK8Ex15qdmjfaNLhFqXxRhVXOpWF1 X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: chrome-platform@lists.linux.dev The driver only supports normal polarity. Complete the implementation of .get_state() by setting .polarity accordingly. Signed-off-by: Uwe Kleine-König Reviewed-by: Guenter Roeck --- 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