Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp2284309lqb; Mon, 27 May 2024 14:30:13 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX0DEHOVcVdE3oyGCVMnDeK31B3QT++BH2QtU6Pz6043M9tKTqdVGD9ge6tZpOHqB9XZaBtnMy5tL1RjC3FlCB8xcVWlA15TnrZ+ZCOTQ== X-Google-Smtp-Source: AGHT+IFfuuhcGShHEL4kYqN2Tb4ZmKLX699JvkLYRdRh3Ss6Q3na9skjVNZWiqSiqNf+gytvilOq X-Received: by 2002:a05:6a00:8a89:b0:6f9:9643:6123 with SMTP id d2e1a72fcca58-6f99643616cmr7219899b3a.32.1716845413360; Mon, 27 May 2024 14:30:13 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716845413; cv=pass; d=google.com; s=arc-20160816; b=Nua4ynfofhbjMpq0yNdaSJ0FXfGCUd12XPJ7EsYSZUQXAGV37+XO6FtHEYIpV/5Bjg knvWGC0yOQlEziqfphHc25FsEdBBwNgYq8rPmenRswmOxXleJXa2u8GLTT0JI3EPr2JR Tdto9qMvP4YZO4RFgqxd+jYSsmATu18jcpoiDObagG56v61CYi/b/b+v+IcSwxTivPqb TGk5cnB2JoGu8frSgt7XE/Fkd0Ol1aezwQk6je9AaDtkPKWRXzGK3ag/olFbI/lGY08E l3pkzGu3WZ3Qkl9uzBixMd6YIZinaI0wZZdKWQPB1xPedan7/J/Yc5E1jOeAokVaboNN I6Nw== 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=z7aMt8lpfvYPczt5cwX+na7WMHaLGVG5OdTmQLvj1BI=; b=T2rhmEaWvHG37ulJA+VO/JTsV1+WtQPxMjCcfbpq15Vcu6YyIl1REvTj8dAqU3zaz6 UFrccj2YnkKhCRg6E/wYrpyZ5DmCzg8r6YJK9/Zrwf7v2Xt86RfMxDNmykskVvmnJNq/ 0rF664CE7XDgw9bTa+Mf1JEOeDVArqBBvpeRirY1DFmhPwzHqPVrDN7M8xodHra7268U k8HxhP5jt29HAn4sVjgY7wOVxGaNzQsbrGG7touTteheWvJnan/BrLCVyrrrIQaHFoZu 4eTX2fB607TYCFjQaV1XeArbOUzkKW3pCA6Hl5NnUMF6WAwOPlb6fh9fOCZyS28Towx3 OfnA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-191456-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-191456-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 41be03b00d2f7-6822b13e0f8si7210862a12.867.2024.05.27.14.30.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 14:30:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-191456-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-191456-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-191456-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id D333D283C53 for ; Mon, 27 May 2024 21:29:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B8854169AC8; Mon, 27 May 2024 21:28:01 +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 00FE4168C20 for ; Mon, 27 May 2024 21:27:58 +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=1716845281; cv=none; b=bTh9ybRujM7uCoqeraTL/DQbNmAPrasNdX5Sr4bSiJHXSu++xUL6u/E5NY++rMwM6VsGD2J/xOBD1/NxhOda+BxfGavGDEOcYgpgZTLb0hbdmCvnURyjsfcwfHGSB3+mjeF0J2tlKaCt8zXO739Irwz1WgGQC1QG8EjXinEaLHc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716845281; c=relaxed/simple; bh=KYoxAAK6S+GIuN2E48DvdIJyuBlhCt1h5mEc1k8V3xc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=m7wtDiKKFFxpDZrvQL4/es4LG9NCfv8jNxv0LV0Q+Zwl7zOhd4+zgrBSkiURAYigiG5QzjLy4HomohKUd5pAi22MQVHxgAV3baFeymjWbQqRNnHt75p/T2FqObckwM+SrET7Yxn4G7IwOgGggV9BZnffPlKhwCTb+amYEhfcS8s= 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 fgw20.mail.saunalahti.fi (Halon) with ESMTP id fb61ed36-1c6f-11ef-8d39-005056bd6ce9; Tue, 28 May 2024 00:27:55 +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 08/11] pinctrl: ingenic: Convert to use func member Date: Tue, 28 May 2024 00:24:43 +0300 Message-ID: <20240527212742.1432960-9-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/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