Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp1162503lqb; Thu, 30 May 2024 02:02:31 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXIL26nzTAHhhhq/pa0YGvtF5HhdfiIoi1c3PZBYNBH38NOavVsZI8F56/2vw1I2tIw8O8e8VhwGzJAtrcCP8jJ1doo0Ik5eqchjrfq2Q== X-Google-Smtp-Source: AGHT+IG2yvCRTstzYSmx5VGviH6cxy2Sx/fS7snaJ96tIvoOZofTh8kOtAKm6mrk0oEZ4+r1td+Y X-Received: by 2002:a17:906:150b:b0:a63:49d4:d5c5 with SMTP id a640c23a62f3a-a65f0bd8131mr111323166b.23.1717059751080; Thu, 30 May 2024 02:02:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717059751; cv=pass; d=google.com; s=arc-20160816; b=VTYxSlr2LKVOm8UDZsh6QtL1eCvuuTEa68JLkBUfWwymhffmCoZswJiwMBSw5BFVTb 8t3bq1Wk3c7vhfIth/cImE/cWAfJ+gAdccoLoMTZhO6g1rpJbaimBZZMg0loo5jtQ3yC aUTJgFq8IodfjZALzU6x4JG2e52Zj1CbAHwNePpmuHJOnNeIBTFUuZCPPU/0dnCCecR/ AB6AXKL896gwu0zocFj0N8HKBNMpseQFndCtHlgkb1MdF/dC6fRwVPzhEkSCznwkLnOp fj3VzSKmZx1GU3y9ChpWFoIwpf+8Ru24yEK3OCb7pJzJhRuWOp2ys6Ntr01hB52zxtL/ TEdQ== 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=B6sn0pIWwwSnfY8AGhWWYQzwnQKI9fY7QhhOOQ0QLcw=; fh=65bVKmnTFATSk9bGG8ZGO/Zm5BvxobMQO14oyJZlvZg=; b=KukhrJP9sBtxEiHp8jGZxkNg4fBsjNzUUg+8TkpyLqhHRqe1BYKCAzJtMUfAqWbYu+ wIH4dnCD+3w/fq2NwiOoRkkPvNtV9WtUJpskbq6+xx+Xzavh952DNQAZNM3GoshEZtJR zf2nxkXXYL8B9JjhxggWX11Vs/8dsqXrRGB7UwXYHD8kUcUhYJLHj4nloUB37EtYZ9ZY QAvV2LuBAq5VNwAJIT4M9kh8SEshwzQvj0r2wwCheqLxOj2ZbsBoa0Zmx2jeG0s62Zky osqmJ9UHU8LFxhMkYHU3sNvtnP1sOVavpaMK5ibOnosSSwxoYZKhfFXe4qqg7AuET7qW rZDg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-195121-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-195121-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-5786cb43e05si6460391a12.436.2024.05.30.02.02.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 May 2024 02:02:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-195121-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-195121-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-195121-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 97B451F2456C for ; Thu, 30 May 2024 09:02:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 40715185099; Thu, 30 May 2024 08:58:39 +0000 (UTC) Received: from fgw20-7.mail.saunalahti.fi (fgw20-7.mail.saunalahti.fi [62.142.5.81]) (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 3B8AC18508D for ; Thu, 30 May 2024 08:58:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=62.142.5.81 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717059518; cv=none; b=PB5r/mOQ5Y9qv5d5wxxTgCik3gq6NgTIVqmCCVNotM0QV3ty+5pRGUYyN2Rc7hqzQfFaQDfMeo7WdvA13MEnb/ZJ6HfIS5jFmsxTk09ppWSviqOcL9DKrAU00avgyn50xV5VixKBJg68KoV9nfAlANJjQLDhGddqcX/elz8tFGg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717059518; c=relaxed/simple; bh=KYoxAAK6S+GIuN2E48DvdIJyuBlhCt1h5mEc1k8V3xc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=XWA/VqgVKhecVL6T6hDKLLwCAR69JBnDrHfiIpb4QOzZTzrIwAfQWwiUVvp7S7Kzx3twwlZKqn1ErStFtByA6Ob1PdohsW7TUkrXhReLbB/e7ISAFE10zHgXjEPDuotWDRCz3bnpmWcNLFKgLL1Tx3UCBGVihcT5ngy9bkVXCTw= 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.81 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 fgw20.mail.saunalahti.fi (Halon) with ESMTP id be284b31-1e62-11ef-8d3e-005056bd6ce9; Thu, 30 May 2024 11:58:11 +0300 (EEST) From: Andy Shevchenko To: Andy Shevchenko , Linus Walleij , AngeloGioacchino Del Regno , Daniel Golle , 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 , Paul Cercueil , Lakshmi Sowjanya D , Andy Shevchenko Subject: [PATCH v3 08/11] pinctrl: ingenic: Convert to use func member Date: Thu, 30 May 2024 11:55:17 +0300 Message-ID: <20240530085745.1539925-9-andy.shevchenko@gmail.com> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240530085745.1539925-1-andy.shevchenko@gmail.com> References: <20240530085745.1539925-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/pinctrl-ingenic.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/drivers/pinctrl/pinctrl-ingenic.c b/drivers/pinctrl/pinctrl-ingenic.c index 959b9ea83a66..31703737731b 100644 --- a/drivers/pinctrl/pinctrl-ingenic.c +++ b/drivers/pinctrl/pinctrl-ingenic.c @@ -96,9 +96,7 @@ #define INGENIC_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, \ } @@ -3769,7 +3767,7 @@ static int ingenic_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); mode = (uintptr_t)grp->data; if (mode <= 3) { @@ -4317,14 +4315,14 @@ static int __init ingenic_pinctrl_probe(struct platform_device *pdev) } for (i = 0; i < chip_info->num_functions; i++) { - const struct function_desc *func = &chip_info->functions[i]; + const struct function_desc *function = &chip_info->functions[i]; + const struct pinfunction *func = &function->func; err = pinmux_generic_add_function(jzpc->pctl, func->name, - func->group_names, func->num_group_names, - func->data); + func->groups, func->ngroups, + function->data); if (err < 0) { - dev_err(dev, "Failed to register function %s\n", - func->name); + dev_err(dev, "Failed to register function %s\n", func->name); return err; } } -- 2.45.1