From patchwork Wed Nov 29 16:06:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 13473114 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2F5FAC4167B for ; Wed, 29 Nov 2023 16:15:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:MIME-Version:Message-ID:Date:Subject:Cc:To:From:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=WrgYKo9ovA3Ms6uyhnWjl7Yg+ofNO5aTAG+eIS3CBX8=; b=ky3hF+QsBCw3Z8257tkqkQBk+d RY3mDGOjOaanq0pdsfkiLSB4OqipipUujgbLFVT9bjxYiNNzgVmFwZ4vpVV12zXAc/4jBfUYbYk99 PVPCnTsrCaUJn4VEuogPlzgDVsuqC2KebwLm1+QoINqNiySl5puoCf6ySkoyue+GQLAs8RujbR28e i4cb8wG/8mwnx7Q7rVvi38bmNV6kFjWl2EQ61l5UBtnUCqxlB/4G6VzFgL5sqL44+42LZBiY3aaYY wqwKiwjU008i1jMFqcfpP/SgleHmzhO7vDcrC7ua+D17OuzpcG+/LPnhP8yqaBQaXIDLMTQIMzNNa +qUA2cxQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r8NE3-008qHI-0E; Wed, 29 Nov 2023 16:15:47 +0000 Received: from mgamail.intel.com ([192.55.52.151]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r8NDZ-008q0T-1A; Wed, 29 Nov 2023 16:15:19 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1701274517; x=1732810517; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=4rJwzaKl6Nti620s0yITOjM1A5IvNX/6uM1qfPh4kAQ=; b=NVoG4sFK4r3rCcirlh8mryrDIhUmnMYl+R7gl/6VZfhH1GxbESPP6tnS aj/DWk4GkhzoFzBX6V2FwfKyb5t3xTahMWkXkKxrW1W140hNZfEz8LXCv yiOPVsWc6ugDAIgj0vsr89I9qr3DS95z3zzPNAeEzq7KvBoSvITnJOKpm R0rDKZXlCbpV5E946eEA22h1UuELEKnocOJmogE560N0gkrnkYVm7ILka 4qGF3AZ5pXUPNbZ5Aw7Jz8pQeFFwKruR++EzmwWRqcnZXckQ9GE07xhRu EuxXFbrDR5ndH12BO1p48olT88JWnOUr+atO9SHHHB0CHfoMwHRwA+NbV g==; X-IronPort-AV: E=McAfee;i="6600,9927,10909"; a="373372531" X-IronPort-AV: E=Sophos;i="6.04,235,1695711600"; d="scan'208";a="373372531" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Nov 2023 08:15:12 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10909"; a="892498851" X-IronPort-AV: E=Sophos;i="6.04,235,1695711600"; d="scan'208";a="892498851" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga004.jf.intel.com with ESMTP; 29 Nov 2023 08:15:02 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 1F65D4D4; Wed, 29 Nov 2023 18:15:00 +0200 (EET) From: Andy Shevchenko To: Linus Walleij , Bartosz Golaszewski , Andy Shevchenko , Rasmus Villemoes , =?utf-8?q?Jonathan_Neusch?= =?utf-8?q?=C3=A4fer?= , Krzysztof Kozlowski , =?utf-8?q?Uwe_Kleine-?= =?utf-8?q?K=C3=B6nig?= , Geert Uytterhoeven , Biju Das , Claudiu Beznea , Jianlong Huang , linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, openbmc@lists.ozlabs.org, linux-mips@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-renesas-soc@vger.kernel.org Cc: Ray Jui , Scott Branden , Broadcom internal kernel review list , Dong Aisheng , Fabio Estevam , Shawn Guo , Jacky Bai , Pengutronix Kernel Team , Sascha Hauer , NXP Linux Team , Sean Wang , Paul Cercueil , Lakshmi Sowjanya D , Bjorn Andersson , Andy Gross , Konrad Dybcio , Emil Renner Berthing , Hal Feng Subject: [PATCH v4 00/23] pinctrl: Convert struct group_desc to use struct pingroup Date: Wed, 29 Nov 2023 18:06:23 +0200 Message-ID: <20231129161459.1002323-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1.gbec44491f096 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231129_081517_417654_497B8CA9 X-CRM114-Status: GOOD ( 14.44 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org The struct group_desc has a lot of duplication with struct pingroup. Deduplicate that by embeddind the latter in the former and convert users. Linus, assuming everything is fine, I can push this to my tree. Or you can apply it (assumming all CIs and people are happy with the series). NB. It seems to me that GCC 7.x has an issue when compound literal is being assigned to a constant object. I believe it's a false positive (at least I can't reproduce this with recent GCC and LLVM and hence I haven't touched the code in order to address this. NB. This series contains previously sent patches for Qualcomm and Nuvoton. Here the updated version for Qualcomm that splits previous patch to two and fixes compilation warnings. NB. The function_desc is in plan to follow the similar deduplication. In v4: - made pins also unsigned in struct group_desc (Geert) - made local pins variable unsigned in renesas drivers (Geert) - collected more tags (Paul, Geert) v3: https://lore.kernel.org/r/20231128200155.438722-1-andriy.shevchenko@linux.intel.com In v3: - fixed reported bug in equilibrium code (LKP) - collected tags (Emil, Florian, Paul) v2: https://lore.kernel.org/r/20231123193355.3400852-1-andriy.shevchenko@linux.intel.com In v2: - added a few patches to fix multiple compile-time errors (LKP) - added tag (Jonathan) v1: https://lore.kernel.org/r/20231122164040.2262742-1-andriy.shevchenko@linux.intel.com Andy Shevchenko (23): pinctrl: qcom: lpass-lpi: Replace kernel.h with what is being used pinctrl: qcom: lpass-lpi: Remove unused member in struct lpi_pingroup pinctrl: equilibrium: Unshadow error code of of_property_count_u32_elems() pinctrl: equilibrium: Use temporary variable to hold pins pinctrl: imx: Use temporary variable to hold pins pinctrl: core: Make pins const unsigned int pointer in struct group_desc pinctrl: equilibrium: Convert to use struct pingroup pinctrl: keembay: Convert to use struct pingroup pinctrl: nuvoton: Convert to use struct pingroup and PINCTRL_PINGROUP() pinctrl: core: Add a convenient define PINCTRL_GROUP_DESC() pinctrl: ingenic: Make use of PINCTRL_GROUP_DESC() pinctrl: mediatek: Make use of PINCTRL_GROUP_DESC() pinctrl: core: Embed struct pingroup into struct group_desc pinctrl: bcm: Convert to use grp member pinctrl: equilibrium: Convert to use grp member pinctrl: imx: Convert to use grp member pinctrl: ingenic: Convert to use grp member pinctrl: keembay: Convert to use grp member pinctrl: mediatek: Convert to use grp member pinctrl: renesas: Convert to use grp member pinctrl: starfive: Convert to use grp member pinctrl: core: Remove unused members from struct group_desc pinctrl: Convert unsigned to unsigned int drivers/pinctrl/bcm/pinctrl-ns.c | 4 +- drivers/pinctrl/core.c | 41 ++++++++--------- drivers/pinctrl/core.h | 33 ++++++++------ drivers/pinctrl/devicetree.c | 8 ++-- drivers/pinctrl/freescale/pinctrl-imx.c | 44 +++++++++---------- drivers/pinctrl/mediatek/pinctrl-moore.c | 13 +++--- drivers/pinctrl/mediatek/pinctrl-moore.h | 7 +-- drivers/pinctrl/mediatek/pinctrl-paris.h | 7 +-- drivers/pinctrl/nuvoton/pinctrl-wpcm450.c | 9 ++-- drivers/pinctrl/pinconf-generic.c | 16 +++---- drivers/pinctrl/pinconf.c | 14 +++--- drivers/pinctrl/pinconf.h | 10 ++--- drivers/pinctrl/pinctrl-equilibrium.c | 42 +++++++++--------- drivers/pinctrl/pinctrl-ingenic.c | 27 +++++------- drivers/pinctrl/pinctrl-keembay.c | 6 +-- drivers/pinctrl/pinctrl-utils.c | 26 +++++------ drivers/pinctrl/pinctrl-utils.h | 18 ++++---- drivers/pinctrl/pinmux.c | 36 +++++++-------- drivers/pinctrl/pinmux.h | 20 ++++----- drivers/pinctrl/qcom/pinctrl-lpass-lpi.h | 6 +-- .../pinctrl/qcom/pinctrl-sc7280-lpass-lpi.c | 16 ------- .../pinctrl/qcom/pinctrl-sc8280xp-lpass-lpi.c | 20 --------- .../pinctrl/qcom/pinctrl-sm6115-lpass-lpi.c | 20 --------- .../pinctrl/qcom/pinctrl-sm8250-lpass-lpi.c | 15 ------- .../pinctrl/qcom/pinctrl-sm8350-lpass-lpi.c | 16 ------- .../pinctrl/qcom/pinctrl-sm8450-lpass-lpi.c | 24 ---------- .../pinctrl/qcom/pinctrl-sm8550-lpass-lpi.c | 24 ---------- .../pinctrl/qcom/pinctrl-sm8650-lpass-lpi.c | 24 ---------- drivers/pinctrl/renesas/pinctrl-rza1.c | 2 +- drivers/pinctrl/renesas/pinctrl-rza2.c | 10 ++--- drivers/pinctrl/renesas/pinctrl-rzg2l.c | 6 +-- drivers/pinctrl/renesas/pinctrl-rzv2m.c | 6 +-- .../starfive/pinctrl-starfive-jh7100.c | 8 ++-- .../starfive/pinctrl-starfive-jh7110.c | 8 ++-- include/linux/pinctrl/machine.h | 6 +-- include/linux/pinctrl/pinconf-generic.h | 10 ++--- include/linux/pinctrl/pinconf.h | 16 +++---- include/linux/pinctrl/pinctrl.h | 24 +++++----- include/linux/pinctrl/pinmux.h | 22 +++++----- 39 files changed, 242 insertions(+), 422 deletions(-)