Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp565844rdh; Thu, 23 Nov 2023 11:35:44 -0800 (PST) X-Google-Smtp-Source: AGHT+IEt6w6BsOPQZo1svlTSFuSyT+laj2tz5mLSfd5mCT8xFEbQcGVZqrVBQB8S8o9BYozNznBC X-Received: by 2002:a05:6a21:168c:b0:186:4430:5d16 with SMTP id np12-20020a056a21168c00b0018644305d16mr611997pzb.61.1700768144704; Thu, 23 Nov 2023 11:35:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700768144; cv=none; d=google.com; s=arc-20160816; b=frJtihV2SGADIf3n3SK4kmuSrCg0EFkuPYBQJjJoCC3DKuGl4L7w0kQnYBuqfIg/S5 NMlwAZoHBPlvMjA84YRUMCPCA6brBi5U3vp1hsS+FgMsPkx5JimodX3VZz2Bb2w77PUK gPodU7xsFlbuvaoT2dGN6o9J6LQuk/qja27xf0PEoKE8vquj4weieS1VWhFKlIRtY7is rg9oTQBYZJfrNXMfPace4HE1VTjpyzpXHkz3lbTSb1cNc+BcyPtdJJrx9Xd/W7WIFtxR +sUXuWlZtWnJFsWviRuXqEpx6n+RIB7IjWEg1xNBvyKc0Sv/iboIfIjS+slcbkWTHK3q hVhA== 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=gauYIwgl2Vu7iNIyMHA7tBF5RnqpARB6Suyvu6qyhu4=; fh=o6/j60XBkz0cs1N8PQkcSMZ4tgCM5mUF5G/ULMywbv8=; b=LWHmwceQAdocG4PnvxzHqP5tEejHYcVIbELNpOf39wKWsghVqPSonNGDJpWrYkAF6x SBPTgxb08sDoENfOoFx5i3Bu4iPVnJQpRsLMdnRbD4B5X/7vNbezdel+xVBmrSrzffd8 4Kmfa04111DTUjqz1uBp5Zf17YqyHbqZ+msgPRENXg/0pCi19aIMREhHl497SmVnDjHA x0FLs1OQRz3A6d5WBU/nIFFcHviHboJLAcdoy0gIYmbPCQlQXHHSeBysg+f5LlQAS0kk mjDVzghl1k29NBIwj22RTH0LAiIVfWVYH8ZWdZyHYtiusv3x3jdY6wcEhYw9Ms35TVEd Xd7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=IfbKtuBI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id e25-20020a656899000000b005be10ed80d9si1897051pgt.177.2023.11.23.11.35.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 11:35:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=IfbKtuBI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (Postfix) with ESMTP id 82A7680A1A73; Thu, 23 Nov 2023 11:35:41 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231166AbjKWTfM (ORCPT + 99 others); Thu, 23 Nov 2023 14:35:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47934 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231222AbjKWTea (ORCPT ); Thu, 23 Nov 2023 14:34:30 -0500 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9322B10D9; Thu, 23 Nov 2023 11:34:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1700768069; x=1732304069; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=gV4qvzwrDTaHf4ixLMxBh2Hur2d7tzECkc7jI+eVgVw=; b=IfbKtuBI8nW1JnUkLXbCGVbHHx/o5wef0qRpnwYVSTnnTMNbgDdaOqdI KqlHJs9l3Ioie+KWMBxHGSeEu6f3pTmIceKiPCsvuU1Qrask7ilssI4iX AyrYYTYhXByUM5gGTEd70iNGxfN98qCLdxfMIBxiP54P00e/Lh7Erprlf yoxNzkoYJjzA64hUguywvBtLbyS5g92A2mNqs8nrZRUCgyywhzGlBU78o SEk5PTIsodA6h2dscCy5BNFu2z4v9cfuabEzE54lWa3bJ+E/R1a5dYwgW 41YmR89fqt0IbnO99+OR3cN9iF9gH4nEFFkOuh7LqCZ5aDZKLMo/DhR2d A==; X-IronPort-AV: E=McAfee;i="6600,9927,10902"; a="372482257" X-IronPort-AV: E=Sophos;i="6.04,222,1695711600"; d="scan'208";a="372482257" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Nov 2023 11:34:25 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10902"; a="833506177" X-IronPort-AV: E=Sophos;i="6.04,222,1695711600"; d="scan'208";a="833506177" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga008.fm.intel.com with ESMTP; 23 Nov 2023 11:34:17 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 9290AA0C; Thu, 23 Nov 2023 21:33:59 +0200 (EET) From: Andy Shevchenko To: Linus Walleij , Bartosz Golaszewski , Andy Shevchenko , Rasmus Villemoes , =?UTF-8?q?Jonathan=20Neusch=C3=A4fer?= , Krzysztof Kozlowski , =?UTF-8?q?Uwe=20Kleine-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 , Andy Gross , Bjorn Andersson , Konrad Dybcio , Emil Renner Berthing , Hal Feng Subject: [PATCH v2 19/21] pinctrl: renesas: Convert to use grp member Date: Thu, 23 Nov 2023 21:31:47 +0200 Message-ID: <20231123193355.3400852-20-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1.gbec44491f096 In-Reply-To: <20231123193355.3400852-1-andriy.shevchenko@linux.intel.com> References: <20231123193355.3400852-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Thu, 23 Nov 2023 11:35:41 -0800 (PST) Convert drivers to use grp member embedded in struct group_desc. Signed-off-by: Andy Shevchenko --- 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 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/pinctrl/renesas/pinctrl-rza1.c b/drivers/pinctrl/renesas/pinctrl-rza1.c index ab334de89b69..b03f22c54ca8 100644 --- a/drivers/pinctrl/renesas/pinctrl-rza1.c +++ b/drivers/pinctrl/renesas/pinctrl-rza1.c @@ -1131,7 +1131,7 @@ static int rza1_set_mux(struct pinctrl_dev *pctldev, unsigned int selector, return -EINVAL; mux_confs = (struct rza1_mux_conf *)func->data; - for (i = 0; i < grp->num_pins; ++i) { + for (i = 0; i < grp->grp.npins; ++i) { int ret; ret = rza1_pin_mux_single(rza1_pctl, &mux_confs[i]); diff --git a/drivers/pinctrl/renesas/pinctrl-rza2.c b/drivers/pinctrl/renesas/pinctrl-rza2.c index 990b96d45967..af689d7c117f 100644 --- a/drivers/pinctrl/renesas/pinctrl-rza2.c +++ b/drivers/pinctrl/renesas/pinctrl-rza2.c @@ -447,15 +447,15 @@ static int rza2_set_mux(struct pinctrl_dev *pctldev, unsigned int selector, psel_val = func->data; - for (i = 0; i < grp->num_pins; ++i) { + for (i = 0; i < grp->grp.npins; ++i) { dev_dbg(priv->dev, "Setting P%c_%d to PSEL=%d\n", - port_names[RZA2_PIN_ID_TO_PORT(grp->pins[i])], - RZA2_PIN_ID_TO_PIN(grp->pins[i]), + port_names[RZA2_PIN_ID_TO_PORT(grp->grp.pins[i])], + RZA2_PIN_ID_TO_PIN(grp->grp.pins[i]), psel_val[i]); rza2_set_pin_function( priv->base, - RZA2_PIN_ID_TO_PORT(grp->pins[i]), - RZA2_PIN_ID_TO_PIN(grp->pins[i]), + RZA2_PIN_ID_TO_PORT(grp->grp.pins[i]), + RZA2_PIN_ID_TO_PIN(grp->grp.pins[i]), psel_val[i]); } diff --git a/drivers/pinctrl/renesas/pinctrl-rzg2l.c b/drivers/pinctrl/renesas/pinctrl-rzg2l.c index 9de350ad7e7d..504e8716fc32 100644 --- a/drivers/pinctrl/renesas/pinctrl-rzg2l.c +++ b/drivers/pinctrl/renesas/pinctrl-rzg2l.c @@ -273,7 +273,7 @@ static int rzg2l_pinctrl_set_mux(struct pinctrl_dev *pctldev, struct function_desc *func; unsigned int i, *psel_val; struct group_desc *group; - int *pins; + const int *pins; func = pinmux_generic_get_function(pctldev, func_selector); if (!func) @@ -283,9 +283,9 @@ static int rzg2l_pinctrl_set_mux(struct pinctrl_dev *pctldev, return -EINVAL; psel_val = func->data; - pins = group->pins; + pins = group->grp.pins; - for (i = 0; i < group->num_pins; i++) { + for (i = 0; i < group->grp.npins; i++) { unsigned int *pin_data = pctrl->desc.pins[pins[i]].drv_data; u32 off = RZG2L_PIN_CFG_TO_PORT_OFFSET(*pin_data); u32 pin = RZG2L_PIN_ID_TO_PIN(pins[i]); diff --git a/drivers/pinctrl/renesas/pinctrl-rzv2m.c b/drivers/pinctrl/renesas/pinctrl-rzv2m.c index 21d7d5ac8c4a..eb66e306b8c8 100644 --- a/drivers/pinctrl/renesas/pinctrl-rzv2m.c +++ b/drivers/pinctrl/renesas/pinctrl-rzv2m.c @@ -165,7 +165,7 @@ static int rzv2m_pinctrl_set_mux(struct pinctrl_dev *pctldev, struct function_desc *func; unsigned int i, *psel_val; struct group_desc *group; - int *pins; + const int *pins; func = pinmux_generic_get_function(pctldev, func_selector); if (!func) @@ -175,9 +175,9 @@ static int rzv2m_pinctrl_set_mux(struct pinctrl_dev *pctldev, return -EINVAL; psel_val = func->data; - pins = group->pins; + pins = group->grp.pins; - for (i = 0; i < group->num_pins; i++) { + for (i = 0; i < group->grp.npins; i++) { dev_dbg(pctrl->dev, "port:%u pin: %u PSEL:%u\n", RZV2M_PIN_ID_TO_PORT(pins[i]), RZV2M_PIN_ID_TO_PIN(pins[i]), psel_val[i]); -- 2.43.0.rc1.1.gbec44491f096