Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp208944lqb; Tue, 28 May 2024 13:08:06 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWcJrFBRcPhrY2KE9GePujuDMZqQxusNZEb7GWcPbb8J4xc4pEBYP4wbxWrbT8rVob58/hzvNHR25QwwvKtE0xPoALmvukffOlNcAOWxA== X-Google-Smtp-Source: AGHT+IFO/UpVG0sC3xh4Lgb5vcPef7NGFWwfNkTelH47K9eQgc9Eg+ujxXP5u6lm3SSg33My9Ixy X-Received: by 2002:a50:d6d2:0:b0:574:ecc4:6b54 with SMTP id 4fb4d7f45d1cf-578518fe165mr14217180a12.9.1716926886222; Tue, 28 May 2024 13:08:06 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716926886; cv=pass; d=google.com; s=arc-20160816; b=BYmPykr1iJnzbnh7gJKYJh0KMRx7x9Ctcpv5e1K3X/zFCRN3i5KpAF3ajfd/fn2byi fJhQXmVniS4AHNnnax0S/Zs38coGLKvmaXCZw6j6XoN+SlZNOlwkQ5xHr92ZpNxqcIpe aBqwoCyZTNXS71JUh3+seY+7CEKJY5tM57+DbM5puZRDJTRzwAScc3kgP7UrVzERroXc +/4ALKAqS8fQiDUHVn50puEQwNCD5V6FRDNICSnfRdCJA1rZ9yHGroiOq1/rZUcjilyg KEdG9IzF1GXotcldFGRrfP/lEOdflrUNUqgf6jIfLglQgglXuo0zzeYrsIIjAvOrYqH9 Bsjg== 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=7i0PP+tNNxhEqCNt1DaWuCxUYRb0M4WDBE9BrWIvsBQ=; b=ItA/xxC3tPpqx2CkVxjhKmFGpizVECyElnzQDMcwD1bFOC71C6M4HdGyCjfS3vE4Mc LTA6bG/rWNDbGUOBJPiz4HqJEkAy/WSLhhW/1jm2M+yVr+fx4QxD81buMglqAvQSjUpk NOXMeZBexAhb7AK7/Ig7dpfeGtXRJ1G+qSo9GksGmlyOhxr1yIFVfzXUgTNL6qcvEUP/ r1MgaoYVj+KUPebgomZVAauztZo1cs9iIEPzUaVzTqJCfbvQAJ3Tb7MBRi+8jCS8A0mE B6YCFvy3ZXyMgQUmbh3ud4q3fxOisvOKSIMaZJAkdpwj9pTPOq+7AhXYXEe4aNzegkWe UuCw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-192982-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-192982-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. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-57983101f14si3973910a12.560.2024.05.28.13.08.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 May 2024 13:08:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-192982-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-192982-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-192982-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 785251F295F4 for ; Tue, 28 May 2024 19:51:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A934817837F; Tue, 28 May 2024 19:50:11 +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 5E7CB17B41A for ; Tue, 28 May 2024 19:50:09 +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=1716925811; cv=none; b=q79Rlae7ZzHIYOSKmnCcl47X5ZYoQ5fY17tKXjIgVvBPfk8Hc9Qvap/Qj3yLYZM1kQMufSpcPh/ehrH4iJKYnF95w7Fwn9qfwJ/dfu8ikn38bHx+7e7J9yelh3g1QqXuyA9GEsP+871bmE+j/CJ0jfchhc3l7ZHIYmKZgc1ZbF0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716925811; c=relaxed/simple; bh=KYoxAAK6S+GIuN2E48DvdIJyuBlhCt1h5mEc1k8V3xc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=NlzUiKj9aCCONNGhDriuLl84Bktce+TM4htkvx8QiScGObeli5/KudseW6xWev8hLznVRtaqZ7CHk6OVJzCpPASI3zLjCodw/Tl9FStv1L+Zt32JuWGhomVRyPZEJp3Ise+9o8VIpzaoIDnNIljm8eHKxhtYmww7zhlDdfnZQu4= 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 fgw21.mail.saunalahti.fi (Halon) with ESMTP id 7a1a2509-1d2b-11ef-aaf5-005056bdd08f; Tue, 28 May 2024 22:50:04 +0300 (EEST) From: Andy Shevchenko To: Andy Shevchenko , Linus Walleij , 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 , AngeloGioacchino Del Regno , Paul Cercueil , Lakshmi Sowjanya D , Andy Shevchenko Subject: [PATCH v2 08/11] pinctrl: ingenic: Convert to use func member Date: Tue, 28 May 2024 22:44:59 +0300 Message-ID: <20240528194951.1489887-9-andy.shevchenko@gmail.com> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240528194951.1489887-1-andy.shevchenko@gmail.com> References: <20240528194951.1489887-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