Message ID | 774d712d-bcdf-677a-2d9c-a49ed829e965@gmail.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp500023wrd; Thu, 23 Feb 2023 11:47:44 -0800 (PST) X-Google-Smtp-Source: AK7set8m8UbXw0kVfA0KMLlQEnb0ALOXy/DNqEM7ZXYOfLx0Yi7FO46B1avxugjXsbv/kDydCNad X-Received: by 2002:a17:906:2cf:b0:878:5fa4:7443 with SMTP id 15-20020a17090602cf00b008785fa47443mr20081680ejk.3.1677181664408; Thu, 23 Feb 2023 11:47:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677181664; cv=none; d=google.com; s=arc-20160816; b=YQdVZnEvQzv2EqlUaAaRLJlOLlgqh/2G6QZnGPAh0QejwMJ3Fd/VdocswxxviauNCL ofa87bU0RN/27MIpUTpzXejiteaJdnoZhNCd4ZFZJFe1s8U8SQh0ilG8ygMlHoXHmtSA iqKSvfxvdgmmbtJEAdShILn6cOJAqLbcKXhtmziLWy3r8eVkE1iz2J9xuc1IT4JSkHfo zwCfRIwBLtvMGRsi+LMq7T/L4/I8x9uruHUkIl1gsg1tQvpW08hcLHmlKOOa76UQwH6h YA6nwzCLtYoURqg9k+NHCklBbcapjgf+/6AlKlfaCeRV4ohpynO+oLMDuXw2Gnv3LhwW pVbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :content-language:references:cc:to:subject:from:user-agent :mime-version:date:message-id:dkim-signature; bh=7LRpyWijqVyBIlwSuNRfzUQ+ZyqaAsfdjoJlUPAZASg=; b=KPSpcohw33WhSV524YYDPWq14KnVt+Pt0Dhz85SUJF8/4w2dnm9T9zWeJOFPar9fGM n0HuXq8J6Hr+2FsEz9wlUmQwcZO1kR2MebpCpWs50nUjExSU5I3hO4yb9B36vCi1r+c8 aJvYUTXf1GQpdJOEZGkhuuigtFawNHMNz/2GxwjueaDn5lOJ7+6Fdk0aYx8/4Z70r308 eTq5ZdQ13MkE9qCil45rjCpwqyHmboNq58PMByQUqc0h7pZhjFhmD4V6jo4L8z11mzeD 0SafNvkq0p5mG3rEaSelGNbOgSgjRUWAAPmN22O4tgJ6FK0bV37JOCa3wUJVNYb1SAPw g51Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=eiKKSe9U; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 20-20020a17090600d400b008dd2bcb4e11si10011525eji.522.2023.02.23.11.47.15; Thu, 23 Feb 2023 11:47:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=eiKKSe9U; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229819AbjBWTqh (ORCPT <rfc822;cambridge8321@gmail.com> + 99 others); Thu, 23 Feb 2023 14:46:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40744 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229491AbjBWTqf (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 23 Feb 2023 14:46:35 -0500 Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4B1DE4A1ED; Thu, 23 Feb 2023 11:46:33 -0800 (PST) Received: by mail-ed1-x52d.google.com with SMTP id ee7so31237516edb.2; Thu, 23 Feb 2023 11:46:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:from:user-agent:mime-version:date:message-id:from:to :cc:subject:date:message-id:reply-to; bh=7LRpyWijqVyBIlwSuNRfzUQ+ZyqaAsfdjoJlUPAZASg=; b=eiKKSe9UeePiVEO64ojOtxKiPLmGaZ/nMjseZGtFE1mHQ/dw/eAfDtPDodcqVozXUA 8ouHsxCJDV/s9IRvv4PDdc+v3FSNXivEqL48uYolADGle5prCL6/1cVeB+2iC4rY2Qtg ju8Tb28IBNNKtcX810XhnsoV33LxMT/2YBLUVwr90z6SHsyB0XxvEWB4mjy6l5ZS2B5u 8imWQ5oG70AF5JpbyjhPLKN/9aO2P0QFL4zqltsEVWFAtji6yf+9IuJS2t+K1YQFIy4M yaexE1Dk/dyUSLhc0m4Wn7nXEEEYmxSy22sJYCXYK8vmuuVlpFT6hCwMeJCERZYrFFAY UGxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:from:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=7LRpyWijqVyBIlwSuNRfzUQ+ZyqaAsfdjoJlUPAZASg=; b=Y7w2RgUZawc5cqTq3OxWLWj90+9iOgrXIoozo6HNaaY8/8bzxEDNP07+5M0BM1TkIf eL8r8CVDqiOCO4vemQ8MptB/4AH5fHvm6RJzCXa2F+vBcDWw2sc/DMAVodnc52nbHv9Z lwjKUIK1ThB8Fc5qOiM/LUhpOphAAwp5hnC4xgPvj9mUFrGR/qVVib8zxrMCzryNNOsc OH006YExXVPMppatfzVneJsoRLvyR+1MuVW+BTJ6k6SNwfKv8aJ37QVOMypYodNq0OHr IHp/AuxUQdiZi2aqAHenyOUb7qv3Ha46IIaRZLtZPxXZNgLaaYJY5EcNS+/3cFcNBCmt oALA== X-Gm-Message-State: AO0yUKVrf8AnZZyYipgPJ+MTmq4eqO1z4PYrTsQGfsf5kluC/blF+MQS Np6tRlDRhWHzXtkxxWqJs3I= X-Received: by 2002:a17:906:44b:b0:839:74cf:7c4f with SMTP id e11-20020a170906044b00b0083974cf7c4fmr20087502eja.8.1677181591729; Thu, 23 Feb 2023 11:46:31 -0800 (PST) Received: from [192.168.2.1] (81-204-249-205.fixed.kpn.net. [81.204.249.205]) by smtp.gmail.com with ESMTPSA id mi10-20020a1709071a8a00b008e938e98046sm1960676ejc.223.2023.02.23.11.46.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 23 Feb 2023 11:46:28 -0800 (PST) Message-ID: <774d712d-bcdf-677a-2d9c-a49ed829e965@gmail.com> Date: Thu, 23 Feb 2023 20:46:24 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 From: Johan Jonker <jbx6244@gmail.com> Subject: [PATCH v4 2/7] dt-bindings: gpio: rockchip,gpio-bank: add unique hardware GPIO ID To: linus.walleij@linaro.org, brgl@bgdev.pl Cc: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, heiko@sntech.de, linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org References: <3eeaa940-9d40-5e33-bc36-c9b0449ded9f@gmail.com> Content-Language: en-US In-Reply-To: <3eeaa940-9d40-5e33-bc36-c9b0449ded9f@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1758652440835524673?= X-GMAIL-MSGID: =?utf-8?q?1758652440835524673?= |
Series |
[v4,1/7] dt-bindings: gpio: rockchip,gpio-bank: add compatible string per SoC
|
|
Commit Message
Johan Jonker
Feb. 23, 2023, 7:46 p.m. UTC
Add a unique hardware GPIO ID to the Rockchip GPIO nodes with
the "rockchip,gpio-controller" property to be independent from aliases
and probe order. "gpio-ranges" can't be used for that, because there is
no semantic restrictions on how they are set up.
Signed-off-by: Johan Jonker <jbx6244@gmail.com>
---
See discussion:
https://lore.kernel.org/u-boot/CACRpkdZx8EaSFLeh4vruRsdC+Sx_ieBiKmuE7t37zhiYqtS3WQ@mail.gmail.com/
---
.../devicetree/bindings/gpio/rockchip,gpio-bank.yaml | 6 ++++++
1 file changed, 6 insertions(+)
--
2.20.1
Comments
On 23/02/2023 20:46, Johan Jonker wrote: > Add a unique hardware GPIO ID to the Rockchip GPIO nodes with > the "rockchip,gpio-controller" property to be independent from aliases > and probe order. "gpio-ranges" can't be used for that, because there is > no semantic restrictions on how they are set up. > > Signed-off-by: Johan Jonker <jbx6244@gmail.com> > --- > > See discussion: > https://lore.kernel.org/u-boot/CACRpkdZx8EaSFLeh4vruRsdC+Sx_ieBiKmuE7t37zhiYqtS3WQ@mail.gmail.com/ > --- > .../devicetree/bindings/gpio/rockchip,gpio-bank.yaml | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/Documentation/devicetree/bindings/gpio/rockchip,gpio-bank.yaml b/Documentation/devicetree/bindings/gpio/rockchip,gpio-bank.yaml > index 2e9a5179c..39ac41e9d 100644 > --- a/Documentation/devicetree/bindings/gpio/rockchip,gpio-bank.yaml > +++ b/Documentation/devicetree/bindings/gpio/rockchip,gpio-bank.yaml > @@ -52,6 +52,12 @@ properties: > > gpio-line-names: true > > + rockchip,gpio-controller: > + $ref: /schemas/types.yaml#/definitions/uint32 > + maximum: 8 > + description: > + Unique hardware GPIO ID. Neither commit msg nor this description explain why do you need it. Also: what is a unique ID? why only 8 of them are allowed? Why assigning arbitrary numbers should be a property of DT (answer: it's not)? Best regards, Krzysztof
On Thu, Feb 23, 2023 at 8:46 PM Johan Jonker <jbx6244@gmail.com> wrote: > Add a unique hardware GPIO ID to the Rockchip GPIO nodes with > the "rockchip,gpio-controller" property to be independent from aliases > and probe order. "gpio-ranges" can't be used for that, because there is > no semantic restrictions on how they are set up. > > Signed-off-by: Johan Jonker <jbx6244@gmail.com> > --- > > See discussion: > https://lore.kernel.org/u-boot/CACRpkdZx8EaSFLeh4vruRsdC+Sx_ieBiKmuE7t37zhiYqtS3WQ@mail.gmail.com/ > --- > .../devicetree/bindings/gpio/rockchip,gpio-bank.yaml | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/Documentation/devicetree/bindings/gpio/rockchip,gpio-bank.yaml b/Documentation/devicetree/bindings/gpio/rockchip,gpio-bank.yaml > index 2e9a5179c..39ac41e9d 100644 > --- a/Documentation/devicetree/bindings/gpio/rockchip,gpio-bank.yaml > +++ b/Documentation/devicetree/bindings/gpio/rockchip,gpio-bank.yaml > @@ -52,6 +52,12 @@ properties: > > gpio-line-names: true > > + rockchip,gpio-controller: > + $ref: /schemas/types.yaml#/definitions/uint32 > + maximum: 8 > + description: > + Unique hardware GPIO ID. So we need to discuss this with the Device Tree people because if this is needed it need to be motivated in terms of "any operating system needs this". Very similar precedents exist: pinctrl/renesas,rzg2l-poeg.yaml renesas,poeg-id: $ref: /schemas/types.yaml#/definitions/uint32 enum: [ 0, 1, 2, 3 ] description: | POEG group index. Valid values are: <0> : POEG group A <1> : POEG group B <2> : POEG group C <3> : POEG group D pinctrl/st,stm32-pinctrl.yaml st,bank-name: description: Should be a name string for this bank as specified in the datasheet. $ref: "/schemas/types.yaml#/definitions/string" enum: - GPIOA - GPIOB - GPIOC - GPIOD - GPIOE - GPIOF - GPIOG - GPIOH - GPIOI - GPIOJ - GPIOK - GPIOZ I don't know how the above properties are used in practice, but any creative driver writer can use them exactly as you intend to do with this, so we need to figure out if this is something all operating systems actually need or whether we should let driver authors just keep smuggling it in under the radar as is already happening. Yours, Linus Walleij
diff --git a/Documentation/devicetree/bindings/gpio/rockchip,gpio-bank.yaml b/Documentation/devicetree/bindings/gpio/rockchip,gpio-bank.yaml index 2e9a5179c..39ac41e9d 100644 --- a/Documentation/devicetree/bindings/gpio/rockchip,gpio-bank.yaml +++ b/Documentation/devicetree/bindings/gpio/rockchip,gpio-bank.yaml @@ -52,6 +52,12 @@ properties: gpio-line-names: true + rockchip,gpio-controller: + $ref: /schemas/types.yaml#/definitions/uint32 + maximum: 8 + description: + Unique hardware GPIO ID. + "#gpio-cells": const: 2