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 Geert,

On 2023-03-31 17:14:42 +0200, Geert Uytterhoeven wrote:
> Hi Niklas,
> 
> 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.

> 
> Sounds like an opportunity for improvement for
> Documentation/devicetree/bindings/media/video-interfaces.yaml, too.
> 
> >
> >              required:
> >                - data-lanes
> > +              - bus-type
> >
> >      required:
> >        - port@4
> > @@ -82,6 +87,7 @@ additionalProperties: false
> >  examples:
> >    - |
> >      #include <dt-bindings/gpio/gpio.h>
> > +    #include <dt-bindings/media/video-interfaces.h>
> >
> >      i2c@e6508000 {
> >              #address-cells = <1>;
> > @@ -101,6 +107,7 @@ examples:
> >                              port@4 {
> >                                      reg = <4>;
> >                                      max96712_out0: endpoint {
> > +                                            bus-type = <MEDIA_BUS_TYPE_CSI2_DPHY>;
> >                                              clock-lanes = <0>;
> >                                              data-lanes = <1 2 3 4>;
> >                                              remote-endpoint = <&csi40_in>;
> 
> 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

-- 
Kind Regards,
Niklas Söderlund



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux