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

Rob Herring
2024-12-20T22:00:46Z

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.

Rob