Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp4180940rdb; Mon, 11 Dec 2023 11:04:45 -0800 (PST) X-Google-Smtp-Source: AGHT+IE39psr9W4tX7df94Mitqq2HUdq94oQ21ibYzMNrOnRUYjiNsBNPbKgVEYF+U5QmDWAJHL2 X-Received: by 2002:a17:90b:1950:b0:286:73b5:b388 with SMTP id nk16-20020a17090b195000b0028673b5b388mr2284466pjb.38.1702321485441; Mon, 11 Dec 2023 11:04:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702321485; cv=none; d=google.com; s=arc-20160816; b=qrvunAqjMyCV7uqZSdDTrAEoyNtCuzQ6KlnTQA8F8OIS3oOZKUt3ye7VAt9Yx1WCMq 56K7ShFYQNrZ8h/ElTSRIP+zMu2UGfYCT/AVzklFp2CAstmohMW0ro0b/gH2nEp95IaI XmoBMv7Wob7aqWOy9t6KH3T42Ezy6oXrGgf9LpjOKuvoJouyXDaAXZOTXmMsyInwSW/w aAvip7t3mM6yE+mBhLJr3whiB/197/Ad7wuja2Tb5JqL4XNYr2LItcDBsF3o/8crJPlL TnstPS0bwy0050mXlq8mzlHBKFlqwmO2ll528we7vyMjK9jQM2g7sgDH/5hQ8kn9FS1s F2ew== 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=f1OZZcXaUJrEug5ykRsYsdCHq/5OCKuul8E2dpi8fgs=; fh=uj0Z2SyYowlbgQPZGFjUvktLAqf7tvIwEfCWEzCNe+c=; b=fTBKhUI0A8AiVsBH075XrHpazfuN9O3R0cIbxmrFodl4VRPZ04KNkXfhyCcPCapE1d qq55x39Lqb7jKt45J+vHuPeSFdPeGThM5NigKHxSRRimooTmE/iPZjmBCXB825APn4/G SgQVoEKJStT+39HrTpCDlXeTdgKbipE6q0AEHtLEoZbNEQ7BpQBV5RPK44sSd7lk7Y+f z/rZIEsHuYFY2SKiVa2I1N4IsnjMs4uDx8Y8nYN7rwpTeApqpDS7cc/BIELVQe1TfA4g 08lPeG8wAe2qNCVGVLUuXBFy5IGdTOxeVP4i2ZMVczge+2xsvgVIBcI9tSguEXKTyN8K Bcjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=B8MzZACm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id o8-20020a17090ac70800b0028ab0c61b77si393645pjt.112.2023.12.11.11.04.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 11:04:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=B8MzZACm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (Postfix) with ESMTP id E31EA8059379; Mon, 11 Dec 2023 11:04:42 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235028AbjLKTEO (ORCPT + 99 others); Mon, 11 Dec 2023 14:04:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47894 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344445AbjLKTDn (ORCPT ); Mon, 11 Dec 2023 14:03:43 -0500 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 25B7D10B; Mon, 11 Dec 2023 11:03:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1702321423; x=1733857423; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=dl5meZK/9OQqeSluMo8zI6v5kxMv/grswCooUcDxnbw=; b=B8MzZACmW9ENGnghUSffSx/RWhP2voYL1wo5+hKymxDztamcXxp0ub+l mzz5CcP0PUivuap6fHey9k3zIu+DDOdioHu6/0ImnxHdKYr+sXRaI9hmp OT/m5QD5/iOpya/lZDA7UIWIPB+qxUyQOolD2tU7GDBVEdQxT9d6Owxto D6RDNKGF1sOqP2vxCBoHwsltxm9tZFLcqLBGrJPCWs+Vjy0oAo3FUmIkD IDu6b1B/dtBdfSXDd5uo9O3RrEpQMjJpfKoAFVUzsGq9Ef45cGq/ExW8e PVyYHnlXXc4tOcRGb316KSTawnDkAGeo/fFNe+rsWupoMSb21jWPAplzq g==; X-IronPort-AV: E=McAfee;i="6600,9927,10921"; a="379692588" X-IronPort-AV: E=Sophos;i="6.04,268,1695711600"; d="scan'208";a="379692588" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Dec 2023 11:03:40 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10921"; a="946445109" X-IronPort-AV: E=Sophos;i="6.04,268,1695711600"; d="scan'208";a="946445109" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga005.jf.intel.com with ESMTP; 11 Dec 2023 11:03:33 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id DF69A30D; Mon, 11 Dec 2023 21:03:23 +0200 (EET) From: Andy Shevchenko To: Linus Walleij , Bartosz Golaszewski , Andy Shevchenko , Geert Uytterhoeven , Rasmus Villemoes , 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, linux-mips@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 , Emil Renner Berthing , Hal Feng Subject: [PATCH v5 11/13] pinctrl: renesas: Convert to use grp member Date: Mon, 11 Dec 2023 20:58:04 +0200 Message-ID: <20231211190321.307330-12-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1.gbec44491f096 In-Reply-To: <20231211190321.307330-1-andriy.shevchenko@linux.intel.com> References: <20231211190321.307330-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 agentk.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 (agentk.vger.email [0.0.0.0]); Mon, 11 Dec 2023 11:04:43 -0800 (PST) Convert drivers to use grp member embedded in struct group_desc, because other members will be removed to avoid duplication and desynchronisation of the generic pin group description. 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 | 4 ++-- drivers/pinctrl/renesas/pinctrl-rzv2m.c | 4 ++-- 4 files changed, 10 insertions(+), 10 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 68fcc2a4efbc..f01aa51b00c4 100644 --- a/drivers/pinctrl/renesas/pinctrl-rzg2l.c +++ b/drivers/pinctrl/renesas/pinctrl-rzg2l.c @@ -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 eb304fab1796..0767a5ac23e0 100644 --- a/drivers/pinctrl/renesas/pinctrl-rzv2m.c +++ b/drivers/pinctrl/renesas/pinctrl-rzv2m.c @@ -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