Re: [PATCH] dt-bindings: usb: usb-device: Add panel-location

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

 



Hi Ricardo,

On Wed, Jan 08, 2025 at 10:48:34AM +0100, Ricardo Ribalda wrote:
> Hi Sakari
> 
> On Wed, 8 Jan 2025 at 10:13, Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx> wrote:
> >
> > Hi Ricardo,
> >
> > On Wed, Jan 08, 2025 at 09:51:34AM +0100, Ricardo Ribalda wrote:
> > > > > diff --git a/Documentation/devicetree/bindings/usb/usb-device.yaml
> > > > > b/Documentation/devicetree/bindings/usb/usb-device.yaml
> > > > > index da890ee60ce6..5322772a4470 100644
> > > > > --- a/Documentation/devicetree/bindings/usb/usb-device.yaml
> > > > > +++ b/Documentation/devicetree/bindings/usb/usb-device.yaml
> > > > > @@ -37,6 +37,10 @@ properties:
> > > > >        but a device adhering to this binding may leave out all except
> > > > >        for "usbVID,PID".
> > > > >
> > > > > +  orientation:
> > > > > +    description: If present, specifies the orientation of the usb device.
> > > > > +    $ref: /schemas/media/video-interface-devices.yaml#/properties/orientation
> > > >
> > > > Do you need this for a camera or for other kinds of USB devices, too?
> > > >
> > > > What about e.g. the rotation property?
> > >
> > > I need it for cameras. I do not have a usecase for rotation now, but I
> > > might have in the future.
> >
> > If it's specific for cameras (UVC kind I presume?), wouldn't it be
> > reasonable to add specific bindings for it?
> Yes, they are uvc cameras
> 
> Do you mean something like this:
> 
> diff --git a/Documentation/devicetree/bindings/usb/usb-device.yaml
> b/Documentation/devicetree/bindings/usb/usb-device.yaml
> index da890ee60ce6..bc80c1e7360f 100644
> --- a/Documentation/devicetree/bindings/usb/usb-device.yaml
> +++ b/Documentation/devicetree/bindings/usb/usb-device.yaml
> @@ -75,6 +75,12 @@ patternProperties:
>            configuration value.
>          maxItems: 1
> 
> +      image-sensor:
> +        description: Video interface properties associated to USB cameras,
> +          typically UVC compliant.
> +        allOf:
> +          - $ref: /schemas/media/video-interface-devices.yaml#
> +

I missed earlier the compatible string comes directly from the USB vendor
and product IDs and this isn't the primary means of identifying a USB
device anyway, IOW we couldn't have a compatible for UVC webcams for
instance.

None of the alternatives here seem exactly great to me but all of them
would likely just work.

I think I prefer your earlier suggestion, the question I have though is
whether or not it should be limited to certain VIDs/PIDs.

>  required:
>    - reg
> 
> @@ -113,6 +119,9 @@ examples:
>              interface@0 {
>                  compatible = "usbif123,abcd.config1.0";
>                  reg = <0 1>;
> +                image-sensor {
> +                  orientation: 0;
> +                };
>              };
> 
>              interface@0,2 {

-- 
Kind regards,

Sakari Ailus




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux