[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250311190043.GA3972023-robh@kernel.org>
Date: Tue, 11 Mar 2025 14:00:43 -0500
From: Rob Herring <robh@...nel.org>
To: Cosmin Tanislav <demonsingur@...il.com>
Cc: Tomi Valkeinen <tomi.valkeinen@...asonboard.com>,
Cosmin Tanislav <cosmin.tanislav@...log.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>,
Niklas Söderlund <niklas.soderlund@...natech.se>,
Julien Massot <julien.massot@...labora.com>,
Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will@...nel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>,
Linus Walleij <linus.walleij@...aro.org>,
Bartosz Golaszewski <brgl@...ev.pl>,
Bjorn Andersson <quic_bjorande@...cinc.com>,
Geert Uytterhoeven <geert+renesas@...der.be>,
Dmitry Baryshkov <dmitry.baryshkov@...aro.org>,
Arnd Bergmann <arnd@...db.de>, Taniya Das <quic_tdas@...cinc.com>,
Biju Das <biju.das.jz@...renesas.com>,
NÃcolas F . R . A . Prado <nfraprado@...labora.com>,
Eric Biggers <ebiggers@...gle.com>,
Javier Carrasco <javier.carrasco@...fvision.net>,
Ross Burton <ross.burton@....com>,
Hans Verkuil <hverkuil@...all.nl>,
Sakari Ailus <sakari.ailus@...ux.intel.com>,
Laurent Pinchart <laurent.pinchart@...asonboard.com>,
Zhi Mao <zhi.mao@...iatek.com>,
Kieran Bingham <kieran.bingham@...asonboard.com>,
Dongcheng Yan <dongcheng.yan@...el.com>,
AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>,
Benjamin Mugnier <benjamin.mugnier@...s.st.com>,
Tommaso Merciai <tomm.merciai@...il.com>,
Dan Carpenter <dan.carpenter@...aro.org>,
Ihor Matushchak <ihor.matushchak@...box.net>,
Laurentiu Palcu <laurentiu.palcu@....nxp.com>,
linux-media@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-staging@...ts.linux.dev, linux-gpio@...r.kernel.org
Subject: Re: [RFC PATCH v2 08/16] dt-bindings: media: i2c: max96712: use
pattern properties for ports
On Sun, Mar 09, 2025 at 10:48:00AM +0200, Cosmin Tanislav wrote:
> The MAX96712 and MAX96724 support up to 4 separate PHYs, depending on
> the selected PHY configuration. Use patternProperties to document this.
>
> The input ports are all the same, use patternProperties for them.
>
> Signed-off-by: Cosmin Tanislav <demonsingur@...il.com>
> ---
> .../bindings/media/i2c/maxim,max96712.yaml | 29 +++++++------------
> 1 file changed, 10 insertions(+), 19 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/media/i2c/maxim,max96712.yaml b/Documentation/devicetree/bindings/media/i2c/maxim,max96712.yaml
> index efdece2b33b9..bf8c861c836b 100644
> --- a/Documentation/devicetree/bindings/media/i2c/maxim,max96712.yaml
> +++ b/Documentation/devicetree/bindings/media/i2c/maxim,max96712.yaml
> @@ -40,27 +40,15 @@ properties:
> ports:
> $ref: /schemas/graph.yaml#/properties/ports
>
> - properties:
> - port@0:
> + patternProperties:
> + '^port@[0-3]$':
> $ref: /schemas/graph.yaml#/properties/port
> - description: GMSL Input 0
> + description: GMSL Input port
GMSL Inputs 0-3
Though generally every port needs to be documented. So really, this was
correct before.
>
> - port@1:
> - $ref: /schemas/graph.yaml#/properties/port
> - description: GMSL Input 1
> -
> - port@2:
> - $ref: /schemas/graph.yaml#/properties/port
> - description: GMSL Input 2
> -
> - port@3:
> - $ref: /schemas/graph.yaml#/properties/port
> - description: GMSL Input 3
> -
> - port@4:
> + '^port@[4-7]$':
> $ref: /schemas/graph.yaml#/$defs/port-base
> unevaluatedProperties: false
> - description: CSI-2 Output
> + description: CSI-2 Output port
The input port numbers are 1:1 with Input numbering. I imagine that's
not the case here, so the relationship of port #s to outputs needs to be
documented.
>
> properties:
> endpoint:
> @@ -78,8 +66,11 @@ properties:
> - data-lanes
> - bus-type
>
> - required:
> - - port@4
> + anyOf:
> + - required: [port@4]
> + - required: [port@5]
> + - required: [port@6]
> + - required: [port@7]
>
> required:
> - compatible
> --
> 2.48.1
>
Powered by blists - more mailing lists