Re: [PATCH 10/54] dt-bindings: display: panel-lvds: Document panel compatibles
From: Maxime Ripard <hidden>
Date: 2021-08-18 12:43:15
Also in:
dri-devel, linux-arm-kernel
Hi Rob, Sam, On Wed, Jul 21, 2021 at 08:29:47PM -0600, Rob Herring wrote:
On Wed, Jul 21, 2021 at 04:03:40PM +0200, Maxime Ripard wrote:quoted
The binding mentions that all the drivers using that driver must use a vendor-specific compatible but never enforces it, nor documents the vendor-specific compatibles. Let's make we document all of them, and that the binding will create an error if we add one that isn't. Cc: dri-devel@lists.freedesktop.org Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Cc: Sam Ravnborg <redacted> Cc: Thierry Reding <redacted> Signed-off-by: Maxime Ripard <redacted> --- .../bindings/display/panel/lvds.yaml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-)diff --git a/Documentation/devicetree/bindings/display/panel/lvds.yaml b/Documentation/devicetree/bindings/display/panel/lvds.yaml index 49460c9dceea..d1513111eb48 100644 --- a/Documentation/devicetree/bindings/display/panel/lvds.yaml +++ b/Documentation/devicetree/bindings/display/panel/lvds.yaml@@ -31,12 +31,18 @@ allOf: properties: compatible: - contains: - const: panel-lvds - description: - Shall contain "panel-lvds" in addition to a mandatory panel-specific - compatible string defined in individual panel bindings. The "panel-lvds" - value shall never be used on its own. + items: + - enum: + - advantech,idk-1110wrAt least this one is documented elsewhere.
Indeed, I missed it.
You can add 'minItems: 2' if you want to just enforce having 2 compatibles. Or do:
items:
- {}
- const: panel-lvds
Which also enforces the order.
It's not just about the order since a missing compatible will also raise
a warning.
Some of those panels have a binding of their own, but some probably
won't (and I can't find anything specific about the one I'm most
interested in: tbs,a711-panel)
Can we have something like:
compatible:
oneOf:
- items:
- enum:
- tbs,a711-panel
- const: panel-lvds
- items:
- {}
- const: panel-lvds
That would work for both cases I guess?
Maxime Attachments
- signature.asc [application/pgp-signature] 228 bytes