RE: [PATCH 1/3] gpio: dt-bindings: add new property to wd,mbl-gpio bindings
From: Leonard, Niall <hidden>
Date: 2023-01-27 15:39:22
Also in:
linux-gpio, lkml
-----Original Message----- From: Krzysztof Kozlowski <redacted> Sent: 26 January 2023 12:29 To: Leonard, Niall <redacted>; Linus Walleij [off-list ref]; Bartosz Golaszewski [off-list ref]; Rob Herring [off-list ref]; Krzysztof Kozlowski [off-list ref] Cc: linux-gpio@vger.kernel.org; devicetree@vger.kernel.org; linux- kernel@vger.kernel.org Subject: Re: [PATCH 1/3] gpio: dt-bindings: add new property to wd,mbl-gpio bindings *External Message* - Use caution before opening links or attachments On 26/01/2023 11:17, Niall Leonard via B4 Submission Endpoint wrote:quoted
From: Niall Leonard <redacted>Subject: missing "wd,mbl-gpio:" prefix. Subject: drop second/last, redundant "bindings". The "dt-bindings" prefix is already stating that these are bindings.quoted
Added optional "no-input" propertyMissing full stop.quoted
Signed-off-by: Niall Leonard <redacted> --- Documentation/devicetree/bindings/gpio/wd,mbl-gpio.txt | 1 + 1 file changed, 1 insertion(+)diff --git a/Documentation/devicetree/bindings/gpio/wd,mbl-gpio.txtb/Documentation/devicetree/bindings/gpio/wd,mbl-gpio.txt index 038c3a6a1f4d..9405f9dad522 100644--- a/Documentation/devicetree/bindings/gpio/wd,mbl-gpio.txt +++ b/Documentation/devicetree/bindings/gpio/wd,mbl-gpio.txt@@ -18,6 +18,7 @@ Required properties: Optional properties: - no-output: GPIOs are read-only. + - no-input: GPIOs are write-only. Read is via a shadow register.Why this property is needed? Why driver cannot always use shadow register?
The shadow register is currently only used during the write operation. It is not available during the read operation. That is essentially the change I have submitted. An alternative approach would have been to develop an entire new gpio driver similar to the 74xx driver, but I felt this approach was better.
Anyway, please convert the bindings to DT schema first (see writing-schema and example-schema). Documentation/devicetree/bindings/writing-schema.rst
The bindings for this driver are duplicated in a few files even though they use the same driver. i.e. wd,mbl-gpio.txt, ni,169445-nand-gpio.txt, brcm,bcm6345-gpio.yaml I don't know why these multiple bindings exist. It would perhaps make sense to remove these duplicate binding documentation files and replace with a single one for "basic-mmio-gpio". I happened to pick ". wd,mbl-gpio.txt", but I could have just as easily chosen one of the other 2. What's your view ?
Best regards, Krzysztof