From patchwork Wed Nov 24 23:04:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= X-Patchwork-Id: 12693591 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 A1BEAC433F5 for ; Wed, 24 Nov 2021 23:06:30 +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=xzVgbwatYxeDea8JK7mr5THEExqCZ2z6nnnjkRzfYZ8=; b=DB8ehf/t5ZK1xJ FvsLWA8Z0Stx+V3SIHpyWe3kKZblNLjpMibOf41rqF9HAUg7W6X3KqXd3D3wKg1XEuw3G6+r6kF7Y BdmLJIw5ER/GDZU6mhArZI5R941ym9BWsQkZ2jDmnG/JvMzWjIGsVZ/q/QXCaj8BiDMeAA+tPBe6o DN7OzFW6QO8njuWpQ84t9hUzeoA17c6O4SMNDcWasnG7AssuW69uOT9fTSmfyae7NOZyVbtfJ/u4H tC2zFt0oNmF2AtDWpZx5h8S3scHoIvomo+MKqOUC3FxZAuDDBgdDnBEwX1OBlx10KeEEYPfRkavqO T6a+WaxdyURY1Cc3Zehg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mq1Jw-0060t6-Jm; Wed, 24 Nov 2021 23:04:56 +0000 Received: from mail-lf1-x132.google.com ([2a00:1450:4864:20::132]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mq1Js-0060sL-Of for linux-arm-kernel@lists.infradead.org; Wed, 24 Nov 2021 23:04:54 +0000 Received: by mail-lf1-x132.google.com with SMTP id u3so11287058lfl.2 for ; Wed, 24 Nov 2021 15:04:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=xu4ZJzFogZrNX3XGLhtBKZKbbwbJR/nJXQ9VcrBljmI=; b=dgBujuUmsMqv7KONxnH+FFUgyLhIZz5fcr9OhY2liYYKViLh6Km5L5aohsYzLNyl0k VpYhqjNsG73cntqbY5xvKOVwLkikDFhuFSE+Oi2SjsuEdVIgykQI30Dw0AsqUnATzJfk Fylgfo0OWFeQUYr/+apnsfawreX10vgDS0/Auh8maU8npkxa1y3sTh8xQ0R+jhlbhVCF z/GYBgxtZQH8zQeqvBCeUdjb+JFODUrpobeMX//UymTT8XOK3pG2DmJteqMKKbPzwcFz IgEObgD5JMEs+8fgwOhZYEClfCzWHb6ztilV7JY43Xp4MIjoGS7wRFHDcnhdAWHLfjjl bV6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=xu4ZJzFogZrNX3XGLhtBKZKbbwbJR/nJXQ9VcrBljmI=; b=idQgMfUfCAsj/Bir8o2/btNfEMTf+aFRXXIyBBf2KMBETcADpAznMIVuU2fyonlBSZ CYGgjRC6z6QE0z8hVgg6AmzSlVOFukNbklpmQGnaWjPmicoBzFaBb/4p5TBM+yDp8Hlz uLACRnQW9ge0md/HLTVTElfp4qS1hfub6N9974pT6SwFfhNDxXRnkG+oGQcLr2KOMByb JhcJjiWngf0NAkKAqngp0jJSDErFO9aeww1XB94oXTGPMdcQJ5469t3wyZP3P3jhQwuI g/xJ2tzn9wMEOs/RlOc0rhUq/Md/PB4jed80MVxz6DmliEkDQhwUGry7T68N8IQ8vH3R CkvQ== X-Gm-Message-State: AOAM533isEAdxYtdL+AXaQ4SjsZ/bNP/PEexXPXXVVu6fSP9m5XPq4YH XoXL3Tn/Edy/a3lvc/0R0q0= X-Google-Smtp-Source: ABdhPJxLCyIVOzcM1kvVipVfrJjEc52yxVOsPgpBY0OrMesf5AqGVt3InUc+lEOqGg+FX8coxEbxaQ== X-Received: by 2002:a05:6512:3f91:: with SMTP id x17mr10309034lfa.5.1637795090421; Wed, 24 Nov 2021 15:04:50 -0800 (PST) Received: from localhost.lan (ip-194-187-74-233.konfederacka.maverick.com.pl. [194.187.74.233]) by smtp.gmail.com with ESMTPSA id t15sm106243lfp.181.2021.11.24.15.04.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Nov 2021 15:04:50 -0800 (PST) From: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= To: Linus Walleij , Rob Herring Cc: Tony Lindgren , Andy Shevchenko , linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Florian Fainelli , bcm-kernel-feedback-list@broadcom.com, =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= Subject: [PATCH V2 0/6] pinctrl: support platform (e.g. DT) stored pins, groups & functions Date: Thu, 25 Nov 2021 00:04:33 +0100 Message-Id: <20211124230439.17531-1-zajec5@gmail.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211124_150452_848259_4435D578 X-CRM114-Status: GOOD ( 11.87 ) 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 From: Rafał Miłecki Two weeks ago I sent [PATCH RFC] dt-bindings: pinctrl: support specifying pins https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20211110231436.8866-1-zajec5@gmail.com/ and week ago I sent [PATCH 0/5] pinctrl: allow storing pins, groups & functions in DT https://patchwork.ozlabs.org/project/linux-gpio/list/?series=272685 Initially I planned to allow putting some pinctrl hw details in DT and later that evolved into a slightly more generic API. Again: Please note it's about describing hardware elements and not actual programming way. It may be used with pinctrl-single.c one day but it's designed as a generic solution for data. Patches 1-5 are for linux-pinctrl.git. Patch 6 I found worth including as DT big example. It can go through Linus with Florian's Ack or I can send it to Florian later. Rafał Miłecki (6): dt-bindings: pinctrl: support specifying pins, groups & functions dt-bindings: pinctrl: brcm,ns-pinmux: extend example pinctrl: prepare API for reading pins, groups & functions pinctrl: support reading pins, groups & functions from DT pinctrl: bcm: pinctrl-ns: supoprt DT specified pins, groups & functions ARM: dts: BCM5301X: add pinctrl pins, groups & functions .../bindings/pinctrl/brcm,ns-pinmux.yaml | 24 +++- .../devicetree/bindings/pinctrl/pinctrl.yaml | 40 ++++++ arch/arm/boot/dts/bcm4709.dtsi | 67 +++++++++ arch/arm/boot/dts/bcm47094.dtsi | 11 +- arch/arm/boot/dts/bcm5301x.dtsi | 109 +++++++++++++++ drivers/pinctrl/bcm/pinctrl-ns.c | 90 ++++++++---- drivers/pinctrl/core.c | 18 +++ drivers/pinctrl/core.h | 4 + drivers/pinctrl/devicetree.c | 131 ++++++++++++++++++ drivers/pinctrl/devicetree.h | 29 ++++ drivers/pinctrl/pinmux.c | 10 ++ drivers/pinctrl/pinmux.h | 2 + 12 files changed, 494 insertions(+), 41 deletions(-)