[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220602174013.x4ygdpbivr2xv5iq@CAB-WSD-L081021.sigma.sbrf.ru>
Date: Thu, 2 Jun 2022 17:39:55 +0000
From: Dmitry Rokosov <DDRokosov@...rdevices.ru>
To: Jonathan Cameron <jic23@...nel.org>
CC: "robh+dt@...nel.org" <robh+dt@...nel.org>,
"linux-iio@...r.kernel.org" <linux-iio@...r.kernel.org>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
kernel <kernel@...rdevices.ru>,
"stano.jakubek@...il.com" <stano.jakubek@...il.com>,
"shawnguo@...nel.org" <shawnguo@...nel.org>,
"lars@...afoo.de" <lars@...afoo.de>,
"andy.shevchenko@...il.com" <andy.shevchenko@...il.com>,
"stephan@...hold.net" <stephan@...hold.net>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 3/3] dt-bindings: iio: accel: add dt-binding schema for
msa311 accel driver
Jonathan,
On Sat, May 28, 2022 at 06:43:37PM +0100, Jonathan Cameron wrote:
> On Wed, 25 May 2022 18:32:45 +0000
> Dmitry Rokosov <DDRokosov@...rdevices.ru> wrote:
>
> > > + interrupt-names:
> > > + const: irq
> > I stay interrupt-names node here, because otherwise dt_binding_check
> > command shows such a warning:
> >
> > ====
> > CHECK Documentation/devicetree/bindings/iio/accel/memsensing,msa311.example.dt.yaml
> > Documentation/devicetree/bindings/iio/accel/memsensing,msa311.example.dt.yaml: accelerometer@62: 'interrupt-names' does not match any of the regexes: 'pinctrl-[0-9]+'
> > ====
> >
> > I can't delete this node from the example as well, because it's required for
> > msa311 dts i2c irq declaration.
>
> Sorry, you've lost me - what breaks if you drop it from the example?
> I'd expect to see no interrupt-names being documented or in the example.
>
> >
> > Please help me to resolve this problem properly if possible. If we can
> > ignore such warning I'll delete interrupt-names in the next patchset's
> > version.
>
> We can't ignore the warning, so this comes down to what am I missing with
> the need for it in the example...
>
You are totally right. I thought during i2c device probe we should
provide interrupt-names dts property because i2c irq parsing requires
it, but I was wrong. i2c_device_probe() function tries to parse irq
value using interrupt-names property and fallbacks to simple
of_irq_get() if interrupt-names property is missing. In other words,
interrupt-names property is not required for device node declaration, so
it can be removed from documentation. Thank you for pointing this out.
> >
> > > +examples:
> > > + - |
> > > + #include <dt-bindings/interrupt-controller/irq.h>
> > > + i2c {
> > > + #address-cells = <1>;
> > > + #size-cells = <0>;
> > > +
> > Properties #address-cells and #size-cells are still located in the
> > schema example, because otherwise dt_binding_check raises the below
> > warnings if we delete these properties:
>
> They should be there for the i2c node, (as they are required for an i2c bus master
> node) but you had them documented as being in the msa311 node. If it's
> not in the
> accelerometer@62 {
>
> }
>
> section of the example documetnation doesn't belong on this file (it will be
> elsewhere).
>
> The request is to drop the documentation of them (as we are documenting
> the msa311 part of the binding only). They should indeed still be there
> in the example.
>
> Jonathan
>
I've removed #address-cells and #size-cells properties from
doc section as well as interrupt-names. All dtbs checkings have passed
successfully. Thank you!
--
Thank you,
Dmitry
Powered by blists - more mailing lists