From patchwork Mon May 27 21:24:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 13675893 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9BE0EC25B79 for ; Mon, 27 May 2024 21:28:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=hkNgDKKWN0CvojBqh4RFiByfx5qIZaxazx3PpfdzRT0=; b=hIWbExnGHRHuaK KXAbjOUxRcy4ggvY0hgRvpaeD7adG75uVsx+Zg4yokcEYuGOsK+u4KyVzh/iKbgpVhxO09VwyNXuI /YvBB0J+27zB44WFCmAa7suvecJQFCe/GIIcc4InTC+fQ1WIv6PYWiqUwjS/Yrg7oubLXV3VNp6zD BLhXd2Pv/KrwOdKm8nz4EmpwBSyv4q3k0QGMrPXgiDft8MG8TpOKc0egPbBGRAFA7gC9Mf1vEowSo Xuwrk2rXzDZabT6FowSh0xlNOJGE0vo//vsEwA2mY5fxnklqVSqZ/E+oGOXSs3CxwCGIjSDAsVsr0 lAl4NaEFKmgXk7M8SHiA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sBhsq-0000000GNlW-1PNP; Mon, 27 May 2024 21:27:56 +0000 Received: from fgw21-7.mail.saunalahti.fi ([62.142.5.82]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sBhsl-0000000GNhO-41wG for linux-arm-kernel@lists.infradead.org; Mon, 27 May 2024 21:27:53 +0000 Received: from localhost (88-113-26-230.elisa-laajakaista.fi [88.113.26.230]) by fgw22.mail.saunalahti.fi (Halon) with ESMTP id f5f62320-1c6f-11ef-8e2a-005056bdf889; Tue, 28 May 2024 00:27:47 +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 00/11] pinctrl: pinmux: Embed and reuse struct pinfunction Date: Tue, 28 May 2024 00:24:35 +0300 Message-ID: <20240527212742.1432960-1-andy.shevchenko@gmail.com> X-Mailer: git-send-email 2.45.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240527_142752_256794_2475B21B X-CRM114-Status: UNSURE ( 8.00 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org As promised to Linus W. there is a series that converts struct function_desc to use struct pinfunction. With this it both struct group_desc and struct function_desc will rely on the generic data types (struct pingroup and struct pinfunction respectively). I haven't compiled everything, some builds might fail. Anyway, comments, reviews, testing are all appreciated. Andy Shevchenko (11): pinctrl: berlin: Make use of struct pinfunction pinctrl: equilibrium: Make use of struct pinfunction pinctrl: ingenic: Provide a helper macro INGENIC_PIN_FUNCTION() pinctrl: mediatek: Provide a helper macro PINCTRL_PIN_FUNCTION() pinctrl: pinmux: Add a convenient define PINCTRL_FUNCTION_DESC() pinctrl: pinmux: Embed struct pinfunction into struct function_desc pinctrl: imx: Convert to use func member pinctrl: ingenic: Convert to use func member pinctrl: keembay: Convert to use func member pinctrl: mediatek: Convert to use func member pinctrl: pinmux: Remove unused members from struct function_desc drivers/pinctrl/berlin/berlin.c | 33 +- drivers/pinctrl/berlin/berlin.h | 6 - drivers/pinctrl/core.h | 2 +- drivers/pinctrl/freescale/pinctrl-imx.c | 14 +- drivers/pinctrl/mediatek/pinctrl-moore.c | 10 +- drivers/pinctrl/mediatek/pinctrl-moore.h | 6 + drivers/pinctrl/mediatek/pinctrl-mt7622.c | 32 +- drivers/pinctrl/mediatek/pinctrl-mt7623.c | 42 +- drivers/pinctrl/mediatek/pinctrl-mt7629.c | 20 +- drivers/pinctrl/mediatek/pinctrl-mt7981.c | 34 +- drivers/pinctrl/mediatek/pinctrl-mt7986.c | 24 +- drivers/pinctrl/pinctrl-equilibrium.c | 18 +- drivers/pinctrl/pinctrl-equilibrium.h | 12 - drivers/pinctrl/pinctrl-ingenic.c | 707 +++++++++++----------- drivers/pinctrl/pinctrl-keembay.c | 22 +- drivers/pinctrl/pinmux.c | 15 +- drivers/pinctrl/pinmux.h | 19 +- 17 files changed, 501 insertions(+), 515 deletions(-)