Message ID | 20231129161459.1002323-10-andriy.shevchenko@linux.intel.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a5a7:0:b0:403:3b70:6f57 with SMTP id d7csp448950vqn; Wed, 29 Nov 2023 08:15:43 -0800 (PST) X-Google-Smtp-Source: AGHT+IHisYoifr/Jg0YDfIeVCXGS/BuQEtfBm88NglukZA44F7d8yvC5dIV8U8HoZXAlUL80dRG0 X-Received: by 2002:a05:6808:14d1:b0:3b2:e469:904c with SMTP id f17-20020a05680814d100b003b2e469904cmr24254469oiw.28.1701274543115; Wed, 29 Nov 2023 08:15:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701274543; cv=none; d=google.com; s=arc-20160816; b=PZ6aacq3QFBz9YIXXqqbC/aWtxQjV5WowjMafcUyFycoV3Z58gMFwCJ0grKDizaIy6 EJNFvswSFx2tJ4BpWt0hz7gQ6gBmxWc+uKlIXVYvRvR9/J86etdty8pYjVujfD5Q1OZC hO6suPwO1wacL5fH7ba83zAQGxRC0xP5t6ZNY18SIe8LqOQCLwvWgbM7SOo4RLZQASaY QnQY2JDCL1MleYqMuFZSe3PEYZfFe1/MHXk6mSsxlxbYbCcfglh1DmNFAucqd/Uzba2E QvKW4gtUYeaRZQREtdYCeK3PEjjAGSC4eab3lC9spLbXUVEdnj1elin13to1gZ0YY2bU /rVQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=9TzWvOIsd72cmqfqE1B58EzmtMdPGePhdwGf/0CIcbY=; fh=p5qGgOuQ1qdHRKXQ3E7ZkEX+heMqfz4xi8z6J8C0/aQ=; b=tctxIopghZpad5dkm6FHV8vM5Bqvg6nKHH9gvfJz/we9lAmaT5Y59LB4UJvSbsJUyJ YWntI6B541qEYD9iznhNNQNlwmhSmk61lHYyp0axQzuviR0Bf9E5qGwRo/2At5P1GM0m 2Qvfo7OgjkA6KRS2MODlpUfbwPOG2JrOgBsY0T9eFJdcKDbHsheD8qNW8x2sBzcfiJIw WxTpRzQtMgVQALxzlpBmPkFNYhp+OMC/zGofo7sVA7UN9BH6kPgE7emt2uEMJwWQBENP VmCQveD8ZrNeiVNcEP04YvPtSAjPcIYTX2MyvPS9SB9BbH6HzzyeZihhlpCBcaSVwyP0 8Elg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=EXLfvps7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id b19-20020a63d313000000b00577f4d85fdbsi15075967pgg.548.2023.11.29.08.15.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 08:15:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=EXLfvps7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 71818802FBB7; Wed, 29 Nov 2023 08:15:41 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233029AbjK2QP0 (ORCPT <rfc822;toshivichauhan@gmail.com> + 99 others); Wed, 29 Nov 2023 11:15:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46272 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231954AbjK2QPQ (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 29 Nov 2023 11:15:16 -0500 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C4C7BD7F; Wed, 29 Nov 2023 08:15:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1701274522; x=1732810522; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=CyMweha2ZvuLisSoPmNJvwBvM8UVF+24ES7V+e13w7A=; b=EXLfvps7okryyK0OrkPJYnLlTqq0X0a6yFK7ocjhy00/7A7jlnvGcwAd tlWzYlRdrH8t1XkLl8adWdjgXEYn/UpKMxs8rMeVoDQ7YmkgKj1KKxuRM 5So9kIMXVoHxURNUKPQdGX1poFzBarxjT+eY7vZrdPmrYjW6vM2+Y/dvG 4PhENLnczVMvS2Pk7VTSqfyL7SP8NuEe/QJwKLSzf0Xdyyqggi2IKg/Rr jsIJxX47mWs9ciqhwGeqhMf4mKgccE2GRfSlXoTaduUlfzDXfBybwbOcY cJQN1UYx6CTIXx5qnTMOKyy2thk5lahac6RMBZKUzieiopT1wF/IH8d9L A==; X-IronPort-AV: E=McAfee;i="6600,9927,10909"; a="373372633" X-IronPort-AV: E=Sophos;i="6.04,235,1695711600"; d="scan'208";a="373372633" 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:21 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10909"; a="892498872" X-IronPort-AV: E=Sophos;i="6.04,235,1695711600"; d="scan'208";a="892498872" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga004.jf.intel.com with ESMTP; 29 Nov 2023 08:15:12 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id ADF58A9A; Wed, 29 Nov 2023 18:15:01 +0200 (EET) From: Andy Shevchenko <andriy.shevchenko@linux.intel.com> To: Linus Walleij <linus.walleij@linaro.org>, Bartosz Golaszewski <bartosz.golaszewski@linaro.org>, Andy Shevchenko <andriy.shevchenko@linux.intel.com>, Rasmus Villemoes <linux@rasmusvillemoes.dk>, =?utf-8?q?Jonathan_Neusch?= =?utf-8?q?=C3=A4fer?= <j.neuschaefer@gmx.net>, Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>, =?utf-8?q?Uwe_Kleine-?= =?utf-8?q?K=C3=B6nig?= <u.kleine-koenig@pengutronix.de>, Geert Uytterhoeven <geert+renesas@glider.be>, Biju Das <biju.das.jz@bp.renesas.com>, Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>, Jianlong Huang <jianlong.huang@starfivetech.com>, 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 <rjui@broadcom.com>, Scott Branden <sbranden@broadcom.com>, Broadcom internal kernel review list <bcm-kernel-feedback-list@broadcom.com>, Dong Aisheng <aisheng.dong@nxp.com>, Fabio Estevam <festevam@gmail.com>, Shawn Guo <shawnguo@kernel.org>, Jacky Bai <ping.bai@nxp.com>, Pengutronix Kernel Team <kernel@pengutronix.de>, Sascha Hauer <s.hauer@pengutronix.de>, NXP Linux Team <linux-imx@nxp.com>, Sean Wang <sean.wang@kernel.org>, Paul Cercueil <paul@crapouillou.net>, Lakshmi Sowjanya D <lakshmi.sowjanya.d@intel.com>, Bjorn Andersson <andersson@kernel.org>, Andy Gross <agross@kernel.org>, Konrad Dybcio <konrad.dybcio@linaro.org>, Emil Renner Berthing <kernel@esmil.dk>, Hal Feng <hal.feng@starfivetech.com> Subject: [PATCH v4 09/23] pinctrl: nuvoton: Convert to use struct pingroup and PINCTRL_PINGROUP() Date: Wed, 29 Nov 2023 18:06:32 +0200 Message-ID: <20231129161459.1002323-10-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1.gbec44491f096 In-Reply-To: <20231129161459.1002323-1-andriy.shevchenko@linux.intel.com> References: <20231129161459.1002323-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 29 Nov 2023 08:15:41 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783915655173796040 X-GMAIL-MSGID: 1783915655173796040 |
Series |
pinctrl: Convert struct group_desc to use struct pingroup
|
|
Commit Message
Andy Shevchenko
Nov. 29, 2023, 4:06 p.m. UTC
The pin control header provides struct pingroup and PINCTRL_PINGROUP() macro. Utilize them instead of open coded variants in the driver. Reviewed-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> --- drivers/pinctrl/nuvoton/pinctrl-wpcm450.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/pinctrl/nuvoton/pinctrl-wpcm450.c b/drivers/pinctrl/nuvoton/pinctrl-wpcm450.c index 0cff44b07b29..4589900244c7 100644 --- a/drivers/pinctrl/nuvoton/pinctrl-wpcm450.c +++ b/drivers/pinctrl/nuvoton/pinctrl-wpcm450.c @@ -474,9 +474,8 @@ enum { #undef WPCM450_GRP }; -static struct group_desc wpcm450_groups[] = { -#define WPCM450_GRP(x) { .name = #x, .pins = x ## _pins, \ - .num_pins = ARRAY_SIZE(x ## _pins) } +static struct pingroup wpcm450_groups[] = { +#define WPCM450_GRP(x) PINCTRL_PINGROUP(#x, x ## _pins, ARRAY_SIZE(x ## _pins)) WPCM450_GRPS #undef WPCM450_GRP }; @@ -852,7 +851,7 @@ static int wpcm450_get_group_pins(struct pinctrl_dev *pctldev, const unsigned int **pins, unsigned int *npins) { - *npins = wpcm450_groups[selector].num_pins; + *npins = wpcm450_groups[selector].npins; *pins = wpcm450_groups[selector].pins; return 0; @@ -901,7 +900,7 @@ static int wpcm450_pinmux_set_mux(struct pinctrl_dev *pctldev, struct wpcm450_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); wpcm450_setfunc(pctrl->gcr_regmap, wpcm450_groups[group].pins, - wpcm450_groups[group].num_pins, function); + wpcm450_groups[group].npins, function); return 0; }