From patchwork Tue Feb 28 13:55:04 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: 5942 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp3031632wrd; Tue, 28 Feb 2023 06:05:17 -0800 (PST) X-Google-Smtp-Source: AK7set9/uW1/piqDRxWo83Nfooj/xhmTDHQ77+DXJq3AWOFlOgczthvTQSbm+RCon5KOuLSHVVV3 X-Received: by 2002:a17:902:d2ca:b0:19a:ad90:4223 with SMTP id n10-20020a170902d2ca00b0019aad904223mr3307678plc.48.1677593117387; Tue, 28 Feb 2023 06:05:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677593117; cv=none; d=google.com; s=arc-20160816; b=KEyd5t5oReRwVfx3MtlJ6x1hPdddSvywFkDT/G4n0jl6UEHggO4to6UT9+s9nglD0x CeZiLFUDUDg9crCzy9BAjG6HnJicr5FLFyDvGGm6ebu4LCEr1yDUOXs4G9Ju01QNhLoe V6+e/t3c7XhuRoX2SupIdDXj833r/K0ExC47XA5x+DpCcWe74n50nZ7APPONjFxjRq52 9Ra7w9Bpagl40CU+hPoGTKf/aFXg7thWZODxIiFS15z8L/VH/HyaHPwO8cnPr55/y+yG RH9UV2CxvQjyLdLv6/iDw2Y7Sic0M7EvwTSucu8Bn6bPgRYlXoVE4wu4CaT3RS1LXLCX JoPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=1Zgn2Fj4PwZKxVrG2AUYsB4L5cyh8WXFBLjskzxzEeI=; b=j5vlEjCerx+PNNpnE7xEZ4+nTwavq+xkzN/ieF9uTjqF1MC1p/OHjE3jl2OV+bQRta +04zS8XLB5l6HAyyn4QLaNJdH//61UMpADQyNFtmnAS/fMtaUWG2RaakFdjhvta+/VV/ Z44j3HdyDeWqal+AdaRyJ4wJeSpH2vhKalGDPmP6yM6KT+186rsvhNqPA2Ypt8jO6atw CdMA1omM15UZE6+p1cKHSPcPdlmPPPYuOSEEMD+Lpeg8/GelhLbcZRFZrwjlUC714DBP +IcVbQJQqDwFLqHh869xrGj//laJJf7rrjNa45RaPc9uVemdxn2qEY6A3K/btBoyU3Sz 4mhA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ka15-20020a170903334f00b0019a733629absi8972302plb.397.2023.02.28.06.04.59; Tue, 28 Feb 2023 06:05:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229730AbjB1N4P (ORCPT + 99 others); Tue, 28 Feb 2023 08:56:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57904 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229773AbjB1N4N (ORCPT ); Tue, 28 Feb 2023 08:56:13 -0500 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B97C0303E9 for ; Tue, 28 Feb 2023 05:55:57 -0800 (PST) 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 1pX0Ru-0007wl-GP; Tue, 28 Feb 2023 14:55:22 +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-000sd0-3M; 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 1pX0Rq-0011da-Ek; Tue, 28 Feb 2023 14:55:18 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Thierry Reding , Munehisa Kamata , Jiancheng Xue , yuanjian , Rob Herring , Benson Leung , Orson Zhai , Baolin Wang , Chunyan Zhang Cc: linux-pwm@vger.kernel.org, linux-kernel@vger.kernel.org, Guenter Roeck , chrome-platform@lists.linux.dev, kernel@pengutronix.de Subject: [PATCH 0/4] pwm: Ensure .polarity is set in .get_state() Date: Tue, 28 Feb 2023 14:55:04 +0100 Message-Id: <20230228135508.1798428-1-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1090; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=D5QXT4W23QqOn36/ZsmmKkgICyUb+XEuSuIpME7YNSA=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBj/geoh4S9hZy9giHcQcIyD/zLdxLraMWzPpL6E YG3wJ6L6PuJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCY/4HqAAKCRDB/BR4rcrs Cd76CACaU4bAx0aQM2bGGugTAnm862V66SgIYGZoUVcr+n7ygwtZJ1hr88DRnH9vAUL8Cydh6WE 9Tcp/KSpbJX+sC4YoxnNYQ4ytu2/dNq+gXimRqH6+hxiT77B/rT0zk3yXdzgW9p8Y1+U+Si4/OK rQTjYYXwLhiR1CGLMtgDc/VTgqxl7UlS37lgwvCU2XbPUNOUoVLuJOyTHlYOWwSTSHAR6T4lCrr 90Arcd9gAdYUnbqc3oBGa3mGUigSlZZ3RVEOZxclZe5snE/aVa8thl2LI8IuPBPsG7zvosNps96 9UV4fR5ro9aUq4DZJrKokd1kkzLntxk0q/7wLxwrkf9UxaMj 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: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759083880703233036?= X-GMAIL-MSGID: =?utf-8?q?1759083880703233036?= Hello, in the context of the discussion with Munehisa Kamata about the meson driver not setting .polarity in .get_state() I checked the other drivers for the same issue. The identified drivers are fixed here. For three of them zero-initializing *state would be good enough, still I think setting the polarity explicitly is a good idea. For the hibvt driver (that supports both polarities) the change is a real improvement. Note I didn't touch the meson driver here that requires some non-trivial updates that I don't want to tackle without hardware to test. Best regards Uwe Uwe Kleine-König (4): pwm: hibvt: Explicitly set .polarity in .get_state() pwm: cros-ec: Explicitly set .polarity in .get_state() pwm: iqs620a: Explicitly set .polarity in .get_state() pwm: sprd: Explicitly set .polarity in .get_state() drivers/pwm/pwm-cros-ec.c | 1 + drivers/pwm/pwm-hibvt.c | 1 + drivers/pwm/pwm-iqs620a.c | 1 + drivers/pwm/pwm-sprd.c | 1 + 4 files changed, 4 insertions(+) base-commit: 7a77daf8223e772a225d6aa6202a5b1ae2392caf