Re: [PATCH] dt-bindings: i2c: maxim,max96712: Require setting bus-type property

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

 



Hi Niklas,

On Fri, Mar 31, 2023 at 5:39 PM Niklas Söderlund
<niklas.soderlund+renesas@xxxxxxxxxxxx> wrote:
> On 2023-03-31 17:14:42 +0200, Geert Uytterhoeven wrote:
> > On Fri, Mar 31, 2023 at 4:15 PM Niklas Söderlund
> > <niklas.soderlund+renesas@xxxxxxxxxxxx> wrote:
> > > The MAX96712 can support both CSI-2 C-PHY and D-PHY bus. Document the
> > > supported bus-types and make the property mandatory.
> > >
> > > Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@xxxxxxxxxxxx>
> >
> > Thanks for your patch!
> >
> > > --- a/Documentation/devicetree/bindings/media/i2c/maxim,max96712.yaml
> > > +++ b/Documentation/devicetree/bindings/media/i2c/maxim,max96712.yaml
> > > @@ -65,9 +65,14 @@ properties:
> > >
> > >              properties:
> > >                data-lanes: true
> > > +              bus-type:
> > > +                enum:
> > > +                  - 1 # CSI-2 C-PHY
> > > +                  - 4 # CSI-2 D-PHY
> >
> > Perhaps use/refer to the symbolic names, too?
>
> I tired that, but dt_binding_check complained.
>
> $ cat Documentation/devicetree/bindings/media/i2c/maxim,max96712.yaml
> ...
>   bus-type:
>     enum:
>       - MEDIA_BUS_TYPE_CSI2_CPHY
>       - MEDIA_BUS_TYPE_CSI2_DPHY
> ...
>
> $ make dt_binding_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/media/i2c/maxim,max96712.yaml
> ...
> .../obj/Documentation/devicetree/bindings/media/i2c/maxim,max96712.example.dtb:
> gmsl-deserializer@49: ports:port@4:endpoint:bus-type:0: [4] is not one of ['MEDIA_BUS_TYPE_CSI2_CPHY', 'MEDIA_BUS_TYPE_CSI2_DPHY']
>
> Or did I misunderstand you? I checked other bindings and the numerical
> values where used in all media/i2c bindings.

Yeah, I don't think you can do it that way.
But this should work:

     - 1 # MEDIA_BUS_TYPE_CSI2_CPHY
     - 4 # MEDIA_BUS_TYPE_CSI2_DPHY

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux