public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: Sakari Ailus <sakari.ailus@linux.intel.com>
To: Ricardo Ribalda <ribalda@chromium.org>
Cc: Rob Herring <robh@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Jacopo Mondi <jacopo@jmondi.org>,
	linux-usb@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-media@vger.kernel.org
Subject: Re: [PATCH] dt-bindings: usb: usb-device: Add panel-location
Date: Wed, 15 Jan 2025 10:02:45 +0000	[thread overview]
Message-ID: <Z4eHxTzn1aUyUT7z@kekkonen.localdomain> (raw)
In-Reply-To: <CANiDSCteoJ_Lk_G6KQKyK1MWikEHF36bYaSHwFEhJh0BFxb6Dw@mail.gmail.com>

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@linux.intel.com> 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

      reply	other threads:[~2025-01-15 10:02 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-12 21:44 [PATCH] dt-bindings: usb: usb-device: Add panel-location Ricardo Ribalda
2024-12-17 14:56 ` Rob Herring
2024-12-17 15:24   ` Ricardo Ribalda
2024-12-19 12:24     ` Rob Herring
2024-12-19 12:29       ` Sakari Ailus
2024-12-19 12:42       ` Ricardo Ribalda
2024-12-20 22:00         ` Rob Herring
2025-01-07 10:37           ` Ricardo Ribalda
2025-01-08  8:45             ` Sakari Ailus
2025-01-08  8:51               ` Ricardo Ribalda
2025-01-08  9:13                 ` Sakari Ailus
2025-01-08  9:48                   ` Ricardo Ribalda
2025-01-15 10:02                     ` Sakari Ailus [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Z4eHxTzn1aUyUT7z@kekkonen.localdomain \
    --to=sakari.ailus@linux.intel.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jacopo@jmondi.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=ribalda@chromium.org \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox