From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Sebastian Reichel <sebastian.reichel@collabora.com>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>,
Sebastian Reichel <sre@kernel.org>
Cc: Tony Lindgren <tony@atomide.com>,
devicetree@vger.kernel.org, linux-omap@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] dt-bindings: hsi: hsi-client: convert to YAML
Date: Tue, 26 Mar 2024 08:18:39 +0100 [thread overview]
Message-ID: <2905247d-03b0-45c1-add5-d3c2a986d87c@linaro.org> (raw)
In-Reply-To: <20240325-hsi-dt-binding-v1-1-88e8e97c3aae@collabora.com>
On 25/03/2024 22:45, Sebastian Reichel wrote:
> Convert the legacy txt binding to modern YAML and rename from
> client-devices to hsi-client. No semantic change.
There is semantic change: missing example (which is reasonable for
shared schema) but more importantly: some properties are now excluding
each other.
>
> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
> ---
...
> diff --git a/Documentation/devicetree/bindings/hsi/hsi-client.yaml b/Documentation/devicetree/bindings/hsi/hsi-client.yaml
> new file mode 100644
> index 000000000000..df6e1fdd2702
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/hsi/hsi-client.yaml
> @@ -0,0 +1,84 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/hsi/hsi-client.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: HSI bus peripheral
> +
> +description:
> + Each HSI port is supposed to have one child node, which
> + symbols the remote device connected to the HSI port.
> +
> +maintainers:
> + - Sebastian Reichel <sre@kernel.org>
> +
> +properties:
> + $nodename:
> + const: hsi-client
Why? Does anything depend on this? It breaks generic-node-name rule. It
seems you need it only to match the schema, but this just point to main
problem - missing bus schema.
> +
> + hsi-channel-ids:
> + $ref: /schemas/types.yaml#/definitions/uint32-array
> + minItems: 1
> + maxItems: 8
> +
> + hsi-channel-names:
> + minItems: 1
> + maxItems: 8
> +
> + hsi-rx-mode:
> + enum: [stream, frame]
> + description: Receiver Bit transmission mode
> +
> + hsi-tx-mode:
> + enum: [stream, frame]
> + description: Transmitter Bit transmission mode
> +
> + hsi-mode:
> + enum: [stream, frame]
> + description:
> + May be used instead hsi-rx-mode and hsi-tx-mode if the
> + transmission mode is the same for receiver and transmitter.
> +
> + hsi-speed-kbps:
> + description: Max bit transmission speed in kbit/s
> + $ref: /schemas/types.yaml#/definitions/uint32
> +
> + hsi-flow:
> + enum: [synchronized, pipeline]
> + description: RX flow type
> +
> + hsi-arb-mode:
> + enum: [round-robin, priority]
> + description: Arbitration mode for TX frame
> +
> +additionalProperties: true
> +
> +required:
> + - compatible
> + - hsi-channel-ids
> + - hsi-speed-kbps
> + - hsi-flow
> + - hsi-arb-mode
> +
> +anyOf:
> + - required:
> + - hsi-mode
> + - required:
> + - hsi-rx-mode
> + - hsi-tx-mode
> +
> +allOf:
> + - if:
> + required:
> + - hsi-mode
> + then:
> + properties:
> + hsi-rx-mode: false
> + hsi-tx-mode: false
I don't understand what you are trying to achieve here and with anyOf.
It looks like just oneOf. OTOH, old binding did not exclude these
properties.
> + - if:
> + required:
> + - hsi-rx-mode
> + then:
> + properties:
> + hsi-mode: false
>
Best regards,
Krzysztof
next prev parent reply other threads:[~2024-03-26 7:18 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-25 21:45 [PATCH 0/3] Convert MIPI HSI DT bindings to YAML Sebastian Reichel
2024-03-25 21:45 ` [PATCH 1/3] dt-bindings: hsi: hsi-client: convert " Sebastian Reichel
2024-03-26 7:18 ` Krzysztof Kozlowski [this message]
2024-03-26 12:45 ` Sebastian Reichel
2024-03-26 12:56 ` Krzysztof Kozlowski
2024-03-26 15:15 ` Sebastian Reichel
2024-03-26 16:08 ` Krzysztof Kozlowski
2024-03-25 21:45 ` [PATCH 2/3] dt-bindings: hsi: nokia-modem: " Sebastian Reichel
2024-03-26 7:21 ` Krzysztof Kozlowski
2024-03-26 13:00 ` Sebastian Reichel
2024-03-25 21:45 ` [PATCH 3/3] dt-bindings: hsi: omap-ssi: " Sebastian Reichel
2024-03-26 7:26 ` Krzysztof Kozlowski
2024-03-26 13:34 ` Sebastian Reichel
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=2905247d-03b0-45c1-add5-d3c2a986d87c@linaro.org \
--to=krzysztof.kozlowski@linaro.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=robh@kernel.org \
--cc=sebastian.reichel@collabora.com \
--cc=sre@kernel.org \
--cc=tony@atomide.com \
/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;
as well as URLs for NNTP newsgroup(s).