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, 8 Jan 2025 08:45:40 +0000 [thread overview]
Message-ID: <Z347NA00DMiyl1VN@kekkonen.localdomain> (raw)
In-Reply-To: <CANiDSCvRfZiMafeJ6==oyduZCzJsv74pg9LbswnjoXFS2nTm=g@mail.gmail.com>
Hi Ricardo,
On Tue, Jan 07, 2025 at 11:37:18AM +0100, Ricardo Ribalda wrote:
> On Fri, 20 Dec 2024 at 23:00, Rob Herring <robh@kernel.org> wrote:
> >
> > On Thu, Dec 19, 2024 at 6:42 AM Ricardo Ribalda <ribalda@chromium.org> wrote:
> > >
> > > On Thu, 19 Dec 2024 at 13:24, Rob Herring <robh@kernel.org> wrote:
> > > >
> > > > On Tue, Dec 17, 2024 at 04:24:27PM +0100, Ricardo Ribalda wrote:
> > > > > Hi Rob
> > > > >
> > > > > On Tue, 17 Dec 2024 at 16:02, Rob Herring <robh@kernel.org> wrote:
> > > > > >
> > > > > > On Thu, Dec 12, 2024 at 09:44:37PM +0000, Ricardo Ribalda wrote:
> > > > > > > For some devices like cameras the system needs to know where they are
> > > > > > > mounted.
> > > > > >
> > > > > > Why do you need this and why only this property and not the dozens
> > > > > > others ACPI has?
> > > > >
> > > > > Userspace needs that information to correctly show it in the UI. Eg;
> > > > >
> > > > > - User facing camera needs to be mirrored during preview.
> > > > > - The user facing camera is selected by default during videoconferences
> > > > > - The world facing camera is selected by default when taking a photo
> > > > > - User facing camera have different parameter defaults than world facing.
> > > >
> > > > We already have "orientation" defined for this purpose.
> > >
> > > Do you mean orientation from
> > > bindings/media/video-interface-devices.yaml ?
> > >
> > > I see a couple of issues:
> > > - Orientation has a very specific meaning for USB typeC. I'd prefer if
> > > we could avoid using that word.
> >
> > Yes, but this is tied to the class of the device, not the bus. I find
> > defining the position for USB devices confusing.
> >
> > > - For other applications different than cameras it might be useful to
> > > know the positions top, bottom, left, right, which are not available
> > > in video-interface-devices
> >
> > Other devices may need some of the 20 other properties in the ACPI
> > table as well.
> >
> > > - The value "external" does not makes too much sense for listed usb devices
> >
> > Then don't use it.
> >
> > > - It makes our lives easier if dt and acpi have the same meaning (less
> > > conversion)
> >
> > We have little to no input into what ACPI does. If we're just going to
> > copy ACPI, then just use ACPI instead.
> >
> > > All that said, for my specific usecase, reusing orientation from
> > > bindings/media/video-interface-devices.yaml works... So if that is
> > > what you all prefer I can send a v2 with that.
> > > Let me know what you think
> >
> > We already have something for cameras. Use it.
>
> So you are proposing a change like this?
>
> 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?
> +
>
>
> reg:
> description: the number of the USB hub port or the USB host-controller
> port to which this device is attached. The range is 1-255.
--
Regards,
Sakari Ailus
next prev parent reply other threads:[~2025-01-08 8:45 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 [this message]
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
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=Z347NA00DMiyl1VN@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