Re: [PATCH v1 32/36] dt-bindings: display: convert sharp,ls037v7dw01 to DT Schema

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Rob.

On Tue, Mar 31, 2020 at 11:20:13AM -0600, Rob Herring wrote:
> On Sun, Mar 29, 2020 at 1:04 PM Sam Ravnborg <sam@xxxxxxxxxxxx> wrote:
> >
> > Hi Rob.
> >
> > > > +
> > > > +  mode-gpios:
> > > > +    description: |
> > > > +      GPIO ordered MO, LR, and UD as specified in LS037V7DW01.pdf
> > >
> > > 3 or...
> > >
> > > > +      change configuration between QVGA and VGA mode and the
> > > > +      scan direction. As these pins can be also configured
> > > > +      with external pulls, all the GPIOs are considered
> > > > +      optional with holes in the array.
> > >
> > > minItems: 3
> > > maxItems: 5
> >
> > This binding can specify up to three GPIOs like this:
> 
> So it should be:
> 
> minItems: 1
> maxItems: 3
> 
> > > > +        mode-gpios = <&gpio5 26 GPIO_ACTIVE_HIGH        /* gpio154, lcd MO */
> > > > +                      &gpio1 2 GPIO_ACTIVE_HIGH         /* gpio2, lcd LR */
> > > > +                      &gpio1 3 GPIO_ACTIVE_HIGH>;       /* gpio3, lcd UD */
> >
> > They are in the linux kernel driver accessed like this:
> >
> >     devm_gpiod_get_index(&pdev->dev, "mode", 2, GPIOD_OUT_LOW);
> >
> > The following is OK in the DT file:
> >
> >     mode-gpios = <&gpio5 26 GPIO_ACTIVE_HIGH>;
> >
> >     mode-gpios = <&gpio5 26 GPIO_ACTIVE_HIGH
> >                   &gpio1 2 GPIO_ACTIVE_HIGH>;
> >
> >     mode-gpios = <&gpio5 26 GPIO_ACTIVE_HIGH
> >                   &gpio1 2 GPIO_ACTIVE_HIGH
> >                   &gpio1 3 GPIO_ACTIVE_HIGH>;
> 
> With the above, the 2nd 2 should fail...
> 
> > But the following is not OK:
> >     mode-gpios = <&gpio5 26 GPIO_ACTIVE_HIGH>, <&gpio1 2 GPIO_ACTIVE_HIGH>;
> 
> And this should pass. We want phandle+arg type properties to be
> bracketed like this.

OK, so if I get you right you say that we should accept the:
<phandle+arg>, <phandle+arg> ... syntax.

And then ignore that current DT files uses:
<phandle+arg phandle+arg>


A binding like this:
 mode-gpios:
    minItems: 1
    maxItems: 3
    description: |
      GPIO ordered MO, LR, and UD as specified in LS037V7DW01.pdf
      This panel can have zero to three GPIOs to configure to


Do not error out when the example looks like this:

        mode-gpios = <&gpio5 26 GPIO_ACTIVE_HIGH        /* gpio154, lcd MO */
                      &gpio1 2 GPIO_ACTIVE_HIGH         /* gpio2, lcd LR */
                      &gpio1 3 GPIO_ACTIVE_HIGH>;       /* gpio3, lcd UD */

So if I get you right this is a bug in the tooling.
I have updated the tooling a few days ago, should be on the latest.

In the actual example I go for the snip you see above.

	Sam



[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux