Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp1027313pxb; Fri, 15 Apr 2022 18:49:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz2flKxZy+q8Ew+c8Q2l8ZLH80Xasy65LRlLec5aXDb9hPGoB/oRA03x2ykpt+jBOaunJMV X-Received: by 2002:a17:902:ce85:b0:158:66cd:c370 with SMTP id f5-20020a170902ce8500b0015866cdc370mr1684376plg.111.1650073791553; Fri, 15 Apr 2022 18:49:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650073791; cv=none; d=google.com; s=arc-20160816; b=btxILrEGO0H1l3JwnqK6fH99ZR3gngKtLgkvwOJ1ZofvSe/93Y2HgLb1WyU347L9P0 UmkGPmvD6fRDwrZFWlW3ysKqLJiVVvPH5EIAgk/oO55gQ2ekD/Lke8aCu4o6FbLemVuY jEQjcCZQxboFeqMs/5a4mNv8lSY451hUw+G2BHmfR/ZHqrCsRvlnv+5Dm1w/VrswuLVv 8Xkf9ousR8HpKLysxKzL3uOhukn0YOYfj6B+Nw8ddioaZT6616uGEupRS+6GmH82Nz1o GT3rClB9cnn7R1ViEbhxkYQsWvWgTI4CKEwdfMVv1O7d5n/kCl3WkrCQ+VuedPTkwsKW FMlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=g0wJw2zmQKuKT+TijzF5HxyHxV++2IkloWvHHoW0Ydk=; b=qHqBeSyQJ6OztPEv7KLnb9pMXfSZA03NHTemGoh0vqOO5qBAdYP154kbNLOsSdct14 XhRMzpKQEQ/Ttw4H/lCarrtEkSsbZ3cG/HXQ78CqNSYGX41zK2EEMmH0xppvWitNnOmX q16aaZSzcS25V/46bvl7nPhssJteKv97ClgJjsyw1bUhH6GhdvLcAW+CL87rkf6DqvF+ cWQZesLCbuSFqhJnLZimCirYMOYOJqJ6n6E++hVsT5hkBRh9OLWRXht4rJpYCb6y0Vvu 3r0jaZl+PN7FCdsTwgLhqFxQ2uF6zTaMt+iFlX2hfvAvrfAdkzVJlQx/G/8qzpCBsbRA A6vw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=nLthzPKn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id a38-20020a056a001d2600b004fa3a8e00adsi2827224pfx.356.2022.04.15.18.49.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Apr 2022 18:49:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=nLthzPKn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 231001890D4; Fri, 15 Apr 2022 18:12:17 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345057AbiDNTFR (ORCPT + 99 others); Thu, 14 Apr 2022 15:05:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38806 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243648AbiDNTFM (ORCPT ); Thu, 14 Apr 2022 15:05:12 -0400 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 64DB8E9CBD; Thu, 14 Apr 2022 12:02:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1649962967; x=1681498967; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=ESMOhfAIzHVEWWSaUAwTLXvAmE92GhwSV4ExM0OTanc=; b=nLthzPKnSweKCj0AcuOEskETcauynR1AsatWIsMUo8mVZ3pQ3DHsZncp yBjYrbu0yJP+x5EcOEoCvQCzL9JWm5FhrgKFLahHwYeq9If4zW5RDh6n6 6+Ck2YcxTBF+iaNXCLzbZuQzcIo5PazdvSksTSsN94veEVmUu81qYofZ3 ECcKBdW3TGLru0++oy8ltg9Oe2kd84W3t9tSHdB2kxAGBCfT3x+enN5OE r9Ns+CZQSvGPnagUXjUF9ZU5xVXbF3+rokRlzmuDCHAvWhgWKGUmTdt2d MAsLBuctbCYizd5wnTPEdyICsBKeh+Wg3eQSR8V2t5dz99ku17hdpm8M2 g==; X-IronPort-AV: E=McAfee;i="6400,9594,10317"; a="349445609" X-IronPort-AV: E=Sophos;i="5.90,260,1643702400"; d="scan'208";a="349445609" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Apr 2022 12:02:47 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,260,1643702400"; d="scan'208";a="527515393" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga006.jf.intel.com with ESMTP; 14 Apr 2022 12:02:43 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 579E7D1; Thu, 14 Apr 2022 22:02:43 +0300 (EEST) From: Andy Shevchenko To: Andy Shevchenko , Neil Armstrong , linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Linus Walleij , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Bartosz Golaszewski , Marek Szyprowski Subject: [PATCH v5 0/6] gpiolib: more helpers and fwnode conversion Date: Thu, 14 Apr 2022 22:02:36 +0300 Message-Id: <20220414190242.22178-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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. As a result of this cleanup a few drivers switched to use GPIO fwnode instead of of_node. *) it's subset of it with a new (patch 1) helper. Marek, Martin, can you give this a try? This requires at least two patches for GPIO library to be applied. 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 v5: - dropped tested patches (this series based on them, though) - introduced a new helper (thanks Marek and Martin for reporting an issue) - redone Armada and Meson code using newly introduced helper Changelog v4: - fixed compilation of the Samsung pin control drivers (LKP) - explained in the commit message why namespacing is good for meson defs - added tag to one of meson patches (Neil) 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 (6): gpiolib: Introduce a helper to get first GPIO controller node pinctrl: armada-37xx: Switch to use fwnode instead of of_node pinctrl: armada-37xx: Reuse GPIO fwnode in armada_37xx_irqchip_register() pinctrl: meson: Rename REG_* to MESON_REG_* pinctrl: meson: Enable COMPILE_TEST pinctrl: meson: Replace custom code by gpiochip_node_count() call drivers/pinctrl/meson/Kconfig | 2 +- drivers/pinctrl/meson/pinctrl-meson.c | 52 ++++++++++----------- drivers/pinctrl/meson/pinctrl-meson.h | 28 +++++------ drivers/pinctrl/mvebu/pinctrl-armada-37xx.c | 34 ++++---------- include/linux/gpio/driver.h | 10 ++++ 5 files changed, 59 insertions(+), 67 deletions(-) -- 2.35.1