Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp2284134lqb; Mon, 27 May 2024 14:29:42 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVf2cirsVw1Rt/3mW9VZg3MsJ0MLNAQjTAVCmNZTRuYEpEiKQH8A86qa7q/VMA7drZ93a1cQqXLayIjhL14DLF7fXxstR6MTAk67DRDEQ== X-Google-Smtp-Source: AGHT+IFABlaJiC5qERE2b7MIuvidpA9XLEvchylEgDtiFlm5UG1tpX8EjCWP0HJDSM0fnPiXOR38 X-Received: by 2002:a05:620a:11:b0:792:bd2f:11e6 with SMTP id af79cd13be357-794ab0f85ffmr1036843385a.62.1716845381843; Mon, 27 May 2024 14:29:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716845381; cv=pass; d=google.com; s=arc-20160816; b=BUtNb1ZO9IxihBHD8UBFvpysIrFnCEYmFoabOdmyInqnbyRfifqPhKS7YQShcy4T27 l09gDxMarbB/61baJ59T8/ls/tX1mzpkFWWoCWF8XATMmMtWGkGtiXEF6C+2ojyK9j9m qQtmNG7EiwdF0lcJyWDK8ou8Qy8dh4zGtF0iDGwVbzGYTkjmJj1Dv/4MEYJGQh2D12hF 9bkLCQQCh0oX6cV5TrtD3ZfyTPcZsqvLOigzB0+Mrh2w/K2Y/X4P65bf1g1ukWCAyCf6 /ze5ARhmi+wtAudoZe99K8bZP07/dVLucZHmJQrCQjxVDaMQTaNv4DgWg8v6RnQg1qWh ns+w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=Txf0s58H6Q4NSZ3SDUwuUbpYwOluZ/B8Go6BCuuhXho=; fh=z7aMt8lpfvYPczt5cwX+na7WMHaLGVG5OdTmQLvj1BI=; b=kpGScX8MpWIYwZfXEb2o7OZ80EDVlyv+OCVvKiadL4//TzLVb9R6nGShK+45lUy3+F QrZgB92iAr1TMCNJuuEdkWp35+sCoSzUwZvvezhUxGXmdkfYlN3sVrHlWPGmBCgWa3QU LtaRYAZNrw2vs8zNkHYxKgsgVxNaDYDFvZuhND/yBDk+UEgte0ztwyJND0kPoZei4M+x cWdDxPCDpq6P3kX+Ronx9JKbml3XtSGKkjix6kAveJZujy5CeTXT1pze5Z3cCUprKM5z yNaGkGk3Kv/p+pClqRDb0KyloyGcR7PU2zIwIq06q9X8kdeXeLWFHDuhFUPcOMcpffFF Yeuw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-191460-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-191460-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id af79cd13be357-794abcab5c1si896332185a.59.2024.05.27.14.29.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 14:29:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-191460-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-191460-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-191460-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 291981C22046 for ; Mon, 27 May 2024 21:29:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D9EF616A37F; Mon, 27 May 2024 21:28:03 +0000 (UTC) Received: from fgw21-7.mail.saunalahti.fi (fgw21-7.mail.saunalahti.fi [62.142.5.82]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A5407161306 for ; Mon, 27 May 2024 21:28:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=62.142.5.82 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716845283; cv=none; b=J86aRDzQGiebnBT+8Tryvx8bztKBxIrwvWCyTUsaRsst22cqbYjAHjnbOnkIu6CwxW37lt66ra+0BQKBH1WjUAGz6ON22aid38HEVKUfbOStXiFf97ke5RAvjUQMAZNGWa6vB62IwuZzuQ0P7tOvEzarVi9mz+wtZ/zOXUeO/W4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716845283; c=relaxed/simple; bh=FrmTkfRDuYE6W4f7/PX+9pEDuWfj94rVrXbxlYtzyFs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=sQFcEqgGehmQrkU88yZK9dn76SBL+sO7I24RwQZYa/eP4HZ+jVs8UyT7kmQeMwNhaDAnOYFw7Ko8GySeXFr5DxMEZ99MFO9JGqXjFUNIkHJw1gPlmHq6wMIDbp0BhhCOuSGMpc05MttKHE8YpGIANwKxv0ov0rRWvNC7FU5VVxY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com; spf=fail smtp.mailfrom=gmail.com; arc=none smtp.client-ip=62.142.5.82 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=gmail.com Received: from localhost (88-113-26-230.elisa-laajakaista.fi [88.113.26.230]) by fgw22.mail.saunalahti.fi (Halon) with ESMTP id fc9d09c8-1c6f-11ef-8e2a-005056bdf889; Tue, 28 May 2024 00:27:57 +0300 (EEST) From: Andy Shevchenko To: Andy Shevchenko , Linus Walleij , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-mips@vger.kernel.org Cc: Dong Aisheng , Fabio Estevam , Shawn Guo , Jacky Bai , Pengutronix Kernel Team , Sascha Hauer , Sean Wang , Matthias Brugger , AngeloGioacchino Del Regno , Paul Cercueil , Lakshmi Sowjanya D , Andy Shevchenko Subject: [PATCH v1 10/11] pinctrl: mediatek: Convert to use func member Date: Tue, 28 May 2024 00:24:45 +0300 Message-ID: <20240527212742.1432960-11-andy.shevchenko@gmail.com> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240527212742.1432960-1-andy.shevchenko@gmail.com> References: <20240527212742.1432960-1-andy.shevchenko@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Convert drivers to use func member embedded in struct function_desc, because other members will be removed to avoid duplication and desynchronisation of the generic pin function description. Signed-off-by: Andy Shevchenko --- drivers/pinctrl/mediatek/pinctrl-moore.c | 10 +++++----- drivers/pinctrl/mediatek/pinctrl-moore.h | 4 +--- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/pinctrl/mediatek/pinctrl-moore.c b/drivers/pinctrl/mediatek/pinctrl-moore.c index d972584c0519..aad4891223d3 100644 --- a/drivers/pinctrl/mediatek/pinctrl-moore.c +++ b/drivers/pinctrl/mediatek/pinctrl-moore.c @@ -56,7 +56,7 @@ static int mtk_pinmux_set_mux(struct pinctrl_dev *pctldev, return -EINVAL; dev_dbg(pctldev->dev, "enable function %s group %s\n", - func->name, grp->grp.name); + func->func.name, grp->grp.name); for (i = 0; i < grp->grp.npins; i++) { const struct mtk_pin_desc *desc; @@ -620,12 +620,12 @@ static int mtk_build_functions(struct mtk_pinctrl *hw) int i, err; for (i = 0; i < hw->soc->nfuncs ; i++) { - const struct function_desc *func = hw->soc->funcs + i; + const struct function_desc *function = hw->soc->funcs + i; + const struct pinfunction *func = &function->func; err = pinmux_generic_add_function(hw->pctrl, func->name, - func->group_names, - func->num_group_names, - func->data); + func->groups, func->ngroups, + function->data); if (err < 0) { dev_err(hw->dev, "Failed to register function %s\n", func->name); diff --git a/drivers/pinctrl/mediatek/pinctrl-moore.h b/drivers/pinctrl/mediatek/pinctrl-moore.h index 5945e4fe021f..229d19561e22 100644 --- a/drivers/pinctrl/mediatek/pinctrl-moore.h +++ b/drivers/pinctrl/mediatek/pinctrl-moore.h @@ -45,9 +45,7 @@ #define PINCTRL_PIN_FUNCTION(_name_, id) \ { \ - .name = _name_, \ - .group_names = id##_groups, \ - .num_group_names = ARRAY_SIZE(id##_groups), \ + .func = PINCTRL_PINFUNCTION(_name_, id##_groups, ARRAY_SIZE(id##_groups)), \ .data = NULL, \ } -- 2.45.1