[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250625185608.GA2010256-robh@kernel.org>
Date: Wed, 25 Jun 2025 13:56:08 -0500
From: Rob Herring <robh@...nel.org>
To: Ricardo Ribalda <ribalda@...omium.org>
Cc: Laurent Pinchart <laurent.pinchart@...asonboard.com>,
Hans de Goede <hdegoede@...hat.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Hans Verkuil <hverkuil@...all.nl>,
Sakari Ailus <sakari.ailus@...ux.intel.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>,
Linus Walleij <linus.walleij@...aro.org>,
Bartosz Golaszewski <brgl@...ev.pl>,
"Rafael J. Wysocki" <rafael@...nel.org>,
Len Brown <lenb@...nel.org>, linux-media@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-usb@...r.kernel.org,
devicetree@...r.kernel.org, linux-gpio@...r.kernel.org,
linux-acpi@...r.kernel.org
Subject: Re: [PATCH v2 06/12] dt-bindings: usb: usb-device: Add orientation
and rotation
On Thu, Jun 05, 2025 at 05:52:59PM +0000, Ricardo Ribalda wrote:
> For some devices, such as cameras, the OS needs to know where they are
> mounted.
>
> ACPI has a property for this purpose, which is parsed by
> acpi_get_physical_device_location():
> https://uefi.org/htmlspecs/ACPI_Spec_6_4_html/06_Device_Configuration/Device_Configuration.html#pld-physical-location-of-device
>
> In DT we have similar properties for video-interface-devices called
> orientation and rotation:
> Documentation/devicetree/bindings/media/video-interface-devices.yaml
>
> Add rotation and orientation for usb-devices that matches the already
> existing properties of video-interface-devices.
>
> Signed-off-by: Ricardo Ribalda <ribalda@...omium.org>
> ---
> Documentation/devicetree/bindings/usb/usb-device.yaml | 10 ++++++++++
> 1 file changed, 10 insertions(+)
Comments from v1 still apply. Add a schema for *your* device (i.e. one
that only matches the compatible string of your device). Look for
anything that includes usb-device.yaml for an example. Your schema
should have something like this if you want to use
video-interface-devices.yaml properties:
allOf:
- $ref: /schemas/usb/usb-device.yaml#
- $ref: /schemas/media/video-interface-devices.yaml#
>
> diff --git a/Documentation/devicetree/bindings/usb/usb-device.yaml b/Documentation/devicetree/bindings/usb/usb-device.yaml
> index c676956810331b81f11f3624340fc3e612c98315..a44eb24c657993f88145377a4706ec419b6cd998 100644
> --- a/Documentation/devicetree/bindings/usb/usb-device.yaml
> +++ b/Documentation/devicetree/bindings/usb/usb-device.yaml
> @@ -44,6 +44,14 @@ properties:
> - minimum: 1
> maximum: 255
>
> + orientation:
> + description: If present, specifies the orientation of the usb device.
> + $ref: /schemas/media/video-interface-devices.yaml#/properties/orientation
Again, this is generally the wrong way to add properties from another
schema for your device. Above is the right way.
Rob
Powered by blists - more mailing lists