[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CACRpkdb+8=OOx4Gh9+kPrXZE3pYa_bO3t2u9+P-aBc2TjLs2GQ@mail.gmail.com>
Date: Mon, 13 May 2024 22:08:30 +0200
From: Linus Walleij <linus.walleij@...aro.org>
To: Linus Walleij <linus.walleij@...aro.org>, Bartosz Golaszewski <brgl@...ev.pl>, linux-gpio@...r.kernel.org,
linux-kernel@...r.kernel.org, etienne.buira@...e.fr
Cc: "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" <devicetree@...r.kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>, Conor Dooley <conor+dt@...nel.org>,
Rob Herring <robh+dt@...nel.org>
Subject: Re: [PATCH v2] gpio-syscon: do not report bogus error
On Fri, Apr 19, 2024 at 2:35 PM Etienne Buira <etienne.buira@...e.fr> wrote:
> It has been suggested to automatically detect if node has a valid
> parent, but that would defeat the purpose of error message, for example
> arch/arm/boot/dts/ti/keystone/keystone-k2g.dtsi could then be used
> without gpio,syscon-dev, and lead to funny results without error
> message.
Now the DTSI does have all these gpio,syscon-dev pointers so
this is just a theoretical problem, right?
The fact that someone can write a DTS to shoot themselves in the
foot doesn't concern me so much, there are many ways to do that
if one wants to.
> It has been tried to mandate use of gpio,syscon-dev, but that raised
> objection.
I don't get it. In the example you mention it is already mandated:
Look in
Documentation/devicetree/bindings/gpio/gpio-dsp-keystone.txt
Required properties:
(...)
- ti,syscon-dev: phandle/offset pair. The phandle to syscon used to
access device state control registers and the offset of device's specific
registers within device state control registers range.
Apart from the obvious spelling error (should be gpio,syscon-dev)
it is right there. (The spelling error is a binding bug, patches welcome.)
If this binding is converted to YAML and the property renamed
properly to what is actually used in the device tree then the schema
check will even yell about it.
I don't see what the problem is to let the driver just look for a parent
if gpio,syscon-dev is not set.
Yours,
Linus Walleij
Powered by blists - more mailing lists