From patchwork Wed Mar 30 14:50:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 555503 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 449A4C4167E for ; Wed, 30 Mar 2022 14:50:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347352AbiC3OwM (ORCPT ); Wed, 30 Mar 2022 10:52:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49798 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347276AbiC3OwH (ORCPT ); Wed, 30 Mar 2022 10:52:07 -0400 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9115D1C10B; Wed, 30 Mar 2022 07:50:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1648651822; x=1680187822; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=zrZUa4zHyRrv/b7a2GsU0Ksg+xmTjt4NnPen2PLSXh8=; b=k3/UqaOoQeqVRo4XT3xGqZv+nuvmYGcyi3zCOxaKuV/vrfnIl4weIiJJ aRRCc6rM8O9Lax7iwSpr6BwG74K76CTyCXESN2PxncvfP8qzFs5WuV8/R 2EA95ami0tfWcmPSjbLK/BY70O16oGwe4RwVLFp4oEsSbraXSsZ/NPyPS dBOdO8WJzhuAeoWeXUHlfEPQsn3IlSg2iSHBpranBfN7ymeyoofAMHRYI BJo002iLXoL+HfVRWTBzG3hKQYBNX351Ro4GdoqreEAbPkhRe03UTOWMT GeJbfTdkMC+fIQzZtfQY0Fcsr0rpt8fRpb2RuhKHBhoWyEKsxiL29WEOu w==; X-IronPort-AV: E=McAfee;i="6200,9189,10301"; a="257139570" X-IronPort-AV: E=Sophos;i="5.90,222,1643702400"; d="scan'208";a="257139570" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Mar 2022 07:50:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,222,1643702400"; d="scan'208";a="618556020" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga004.fm.intel.com with ESMTP; 30 Mar 2022 07:50:11 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 18849144; Wed, 30 Mar 2022 17:50:33 +0300 (EEST) From: Andy Shevchenko To: Qianggui Song , Andy Shevchenko , Geert Uytterhoeven , Krzysztof Kozlowski , Fabien Dessenne , Linus Walleij , linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, openbmc@lists.ozlabs.org, linux-renesas-soc@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com Cc: Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Avi Fishman , Tomer Maimon , Tali Perry , Patrick Venture , Nancy Yuen , Benjamin Fair , Tomasz Figa , Sylwester Nawrocki , Alim Akhtar , Maxime Coquelin , Alexandre Torgue , Bartosz Golaszewski , Philipp Zabel Subject: [PATCH v3 00/13] gpiolib: Two new helpers and way toward fwnode Date: Wed, 30 Mar 2022 17:50:17 +0300 Message-Id: <20220330145030.1562-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org This is a spin-off of the previous work of switching GPIO library to use fwnode instead of of_node. Here we introduce a couple of a new macro helpers, which allows to switch some of the drivers to use fwnode and partially fwnode APIs. Bart, Linus, I can take it thru my tree with an immutable branch if it's the way you prefer, otherwise please suggest on how to proceed. Changelog v3: - moved count initialization to the definition in patch 2 (Geert) - replaced of_args by args, used %pfwP in patch 7 (Geert) - fixed kernel doc warning in patch 7 - added tags to patches 1, 2, 6, and 7 (Geert) - added tag to patch 4 (Fabien) - renamed MREG to MESON_REG in patch 9 (Neil) - added tag to patch 10 (Neil) - used --base for cover-letter Changelog v2: - properly based, so kbuild bot may test it (LKP) - fixed typo in the macro (Geert) - split to two macro helpers and rename the gpiochip_count() - tagged one of stm32 and one of meson patches (Fabien, Neil) - unified previously standalone armada patch - due to above rewrote the armada patch from v1 completely (Sergey) - added a lot of a new patches - compile tested all of them on x86 Andy Shevchenko (13): gpiolib: Introduce for_each_gpiochip_node() loop helper gpiolib: Introduce gpiochip_node_count() helper pinctrl: stm32: Replace custom code by gpiochip_node_count() call pinctrl: stm32: Switch to use for_each_gpiochip_node() helper pinctrl: samsung: Switch to use for_each_gpiochip_node() helper pinctrl: renesas: rza1: Replace custom code by gpiochip_node_count() call pinctrl: renesas: rza1: Switch to use for_each_gpiochip_node() helper pinctrl: npcm7xx: Switch to use for_each_gpiochip_node() helper pinctrl: meson: Rename REG_* to MESON_REG_* pinctrl: meson: Enable COMPILE_TEST pinctrl: meson: Replace custom code by gpiochip_node_count() call pinctrl: armada-37xx: Switch to use fwnode instead of of_node pinctrl: armada-37xx: Reuse GPIO fwnode in armada_37xx_irqchip_register() drivers/pinctrl/meson/Kconfig | 2 +- drivers/pinctrl/meson/pinctrl-meson.c | 52 ++++--- drivers/pinctrl/meson/pinctrl-meson.h | 24 ++-- drivers/pinctrl/mvebu/pinctrl-armada-37xx.c | 34 ++--- drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c | 142 +++++++++----------- drivers/pinctrl/renesas/pinctrl-rza1.c | 47 ++----- drivers/pinctrl/samsung/pinctrl-samsung.c | 30 ++--- drivers/pinctrl/samsung/pinctrl-samsung.h | 2 +- drivers/pinctrl/stm32/pinctrl-stm32.c | 80 +++++------ include/linux/gpio/driver.h | 18 ++- 10 files changed, 191 insertions(+), 240 deletions(-) base-commit: a67ba3cf9551f8c92d5ec9d7eae1aadbb9127b57