Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp4698762rdh; Wed, 29 Nov 2023 08:17:04 -0800 (PST) X-Google-Smtp-Source: AGHT+IGvJLoAJOy4MHBFS/tHVOkb/cF/PCuzQDYuITnca45+AFROX+a1MsJEiol14tg1PbpEysgS X-Received: by 2002:a05:6a00:1acb:b0:6c6:9c3b:f0ed with SMTP id f11-20020a056a001acb00b006c69c3bf0edmr23096184pfv.7.1701274624140; Wed, 29 Nov 2023 08:17:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701274624; cv=none; d=google.com; s=arc-20160816; b=o7wFIhpfMQwsf4RD2pBabYKpgL165bRBWvwW8ROtg6NsBJPs0FqDGZCpm+2npwXg0B 2NgHM+rlkXrcEFxihx97YE2aYI+FDlfYZjGTWLty1lbWqoMFAluKOhtlypLxgDdkojUH BncDNlFughiDnBuTkmw1f7neIEXFgSblLtK5/sJmjqJk5q+9FT60YYrRbn2ngJCfPVtP X+ztYQymGbPtdsOIf6E5m/IyNio2QN2jDJOnrwW5Q9Mz6Cfa3NMkG0jmpqDx+MbJtuqs qjAl3J5asM15ibY7Xjlu9Z9mCdrPQMBEYe43xiSGSATgedYT/8FlA6fkiR+u7t0avCGk TopA== 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=mSrzI9+TQXhBZuEvVkgNgOGG8nyM1cqqKtRQdIu4wNs=; fh=p5qGgOuQ1qdHRKXQ3E7ZkEX+heMqfz4xi8z6J8C0/aQ=; b=0DaXe7louVmAmBvOqTKMIIGkR694vb047+mGPNof5hQM6C0RYmHH45k69IXBfQcJrE M+bbXKhyRnHNPfTINZ/g03Y5uRZPtiYrlidIb8HMhiCYSsEWwnrX8HW0aGAwj1IBibdA aRhhCRM9pdhvhqiVFA34Bj4Xd7TlIIug1gHOB1htpnCQLqPnAR5ab0DyJ27kw1pE5BO5 Knk4b+c6+uSu60jY3McmWai3K9lrNIpVf+iZhG0PERMgw896sT5L15s3m0CSXo1osXRh w0QUOxwOAk3VsK7AH1OYRuzkAGQtH90Y3pY/A2OC95HgdzTg+hDFsKw/oFXYUu65SCFF HH8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=hk5DepjK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 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. [23.128.96.34]) by mx.google.com with ESMTPS id s35-20020a056a0017a300b006cb6fb35b87si15046318pfg.94.2023.11.29.08.17.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 08:17:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=hk5DepjK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 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 DB921802AB2D; Wed, 29 Nov 2023 08:16:53 -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 S234583AbjK2QQ0 (ORCPT + 99 others); Wed, 29 Nov 2023 11:16:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33384 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231645AbjK2QPn (ORCPT ); Wed, 29 Nov 2023 11:15:43 -0500 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8126510C3; Wed, 29 Nov 2023 08:15:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1701274534; x=1732810534; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=RuzA+EMSZH0zB9LoBEueZwC5JX97rHRCYbbNS2Mrme8=; b=hk5DepjKqySQit5IIb6sMHwa7u9NJAkgjRIxkxpOAov0EEDYtvYh9x3R xbK/cENZbUg9nZjDvuAZwy0wOanIvXs3RRvAR6eQhfuJv+iYwqS9fqcTE XnwS67/XJl0AWwGs1THSnlsAnJk3YAgxkC9YvnEn4L10ivM4EydRx8qvg DVK3O6jrMJAeLqIN5tGAcfhp+hxaWn4tEofDI9yTVg0/JuFsNi3qIcVYR 4Cg4wjSnGWu2MkNC95l91XMG8mdmsQrOSJxKe/GQefjUNyyz1HrshxTNY 9Tb3LlGYTsh2UaTcaH+jo4EAm25UlGLcA1Iasm3ifZOboIM+mh/9UvgGt A==; X-IronPort-AV: E=McAfee;i="6600,9927,10909"; a="373372850" X-IronPort-AV: E=Sophos;i="6.04,235,1695711600"; d="scan'208";a="373372850" 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:32 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10909"; a="892498908" X-IronPort-AV: E=Sophos;i="6.04,235,1695711600"; d="scan'208";a="892498908" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga004.jf.intel.com with ESMTP; 29 Nov 2023 08:15:21 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 5EFD5C4F; Wed, 29 Nov 2023 18:15:02 +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 , Bjorn Andersson , Andy Gross , Konrad Dybcio , Emil Renner Berthing , Hal Feng Subject: [PATCH v4 20/23] pinctrl: renesas: Convert to use grp member Date: Wed, 29 Nov 2023 18:06:43 +0200 Message-ID: <20231129161459.1002323-21-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-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]); Wed, 29 Nov 2023 08:16:54 -0800 (PST) Convert drivers to use grp member embedded in struct group_desc. Reviewed-by: Geert Uytterhoeven Acked-by: Geert Uytterhoeven 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 aed59c53207c..f01aa51b00c4 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 unsigned 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..0767a5ac23e0 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 unsigned 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