From: Rob Herring <robh@kernel.org>
To: Jonathan Cameron <jic23@kernel.org>
Cc: linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
linux-i2c@vger.kernel.org, Wolfram Sang <wsa@kernel.org>,
Jonathan Cameron <Jonathan.Cameron@huawei.com>,
Peter Rosin <peda@axentia.se>, Wolfram Sang <wsa@the-dreams.de>
Subject: Re: [PATCH 1/3] dt-bindings:i2c:i2c-gate: txt to yaml conversion
Date: Mon, 2 Nov 2020 20:25:09 -0600 [thread overview]
Message-ID: <20201103022509.GA679426@bogus> (raw)
In-Reply-To: <20201031181801.742585-2-jic23@kernel.org>
On Sat, Oct 31, 2020 at 06:17:59PM +0000, Jonathan Cameron wrote:
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
>
> Needed to reference from the invensense,mpu6050 yaml binding.
>
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Cc: Peter Rosin <peda@axentia.se>
> Cc: Wolfram Sang <wsa@the-dreams.de>
> ---
> .../devicetree/bindings/i2c/i2c-gate.txt | 41 ---------------
> .../devicetree/bindings/i2c/i2c-gate.yaml | 52 +++++++++++++++++++
> 2 files changed, 52 insertions(+), 41 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/i2c/i2c-gate.txt b/Documentation/devicetree/bindings/i2c/i2c-gate.txt
> deleted file mode 100644
> index 1846d236e656..000000000000
> --- a/Documentation/devicetree/bindings/i2c/i2c-gate.txt
> +++ /dev/null
> @@ -1,41 +0,0 @@
> -An i2c gate is useful to e.g. reduce the digital noise for RF tuners connected
> -to the i2c bus. Gates are similar to arbitrators in that you need to perform
> -some kind of operation to access the i2c bus past the arbitrator/gate, but
> -there are no competing masters to consider for gates and therefore there is
> -no arbitration happening for gates.
> -
> -Common i2c gate properties.
> -
> -- i2c-gate child node
> -
> -Required properties for the i2c-gate child node:
> -- #address-cells = <1>;
> -- #size-cells = <0>;
> -
> -Optional properties for i2c-gate child node:
> -- Child nodes conforming to i2c bus binding
> -
> -
> -Example :
> -
> - /*
> - An Invensense mpu9150 at address 0x68 featuring an on-chip Asahi
> - Kasei ak8975 compass behind a gate.
> - */
> -
> - mpu9150@68 {
> - compatible = "invensense,mpu9150";
> - reg = <0x68>;
> - interrupt-parent = <&gpio1>;
> - interrupts = <18 1>;
> -
> - i2c-gate {
> - #address-cells = <1>;
> - #size-cells = <0>;
> -
> - ax8975@c {
> - compatible = "ak,ak8975";
> - reg = <0x0c>;
> - };
> - };
> - };
> diff --git a/Documentation/devicetree/bindings/i2c/i2c-gate.yaml b/Documentation/devicetree/bindings/i2c/i2c-gate.yaml
> new file mode 100644
> index 000000000000..29aa0690ed9a
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/i2c/i2c-gate.yaml
> @@ -0,0 +1,52 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/i2c/i2c-gate.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Common i2c gate properties
> +
> +maintainers:
> + - Peter Rosin <peda@axentia.se>
> +
> +description: |
> + An i2c gate is useful to e.g. reduce the digital noise for RF tuners connected
> + to the i2c bus. Gates are similar to arbitrators in that you need to perform
> + some kind of operation to access the i2c bus past the arbitrator/gate, but
> + there are no competing masters to consider for gates and therefore there is
> + no arbitration happening for gates.
> +
> +properties:
> + $nodename:
> + const: i2c-gate
> +
> + "#address-cells":
> + const: 1
> +
> + "#size-cells":
> + const: 0
> +
> +patternProperties:
> + "^[a-zA-Z][a-zA-Z0-9,+\\-._]{0,63}@[0-9a-fA-F]+$":
> + type: object
> + description: |
> + Child nodes for i2c devices behind the gate.
So reference i2c-controller.yaml. With that, you only need $nodename.
> +
> +required:
> + - "#address-cells"
> + - "#size-cells"
> +
> +additionalProperties: true
> +
> +examples:
> + - |
> + i2c-gate {
> + #address-cells = <1>;
> + #size-cells = <0>;
> + ak8975@c {
> + compatible = "ak,ak8975";
> + reg = <0x0c>;
> + };
> + };
> +...
> +
> --
> 2.28.0
>
next prev parent reply other threads:[~2020-11-03 2:25 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-31 18:17 [PATCH 0/3] dt-bindings: yaml conversion of i2c-gate and IIO users Jonathan Cameron
2020-10-31 18:17 ` [PATCH 1/3] dt-bindings:i2c:i2c-gate: txt to yaml conversion Jonathan Cameron
2020-11-03 2:25 ` Rob Herring [this message]
2020-10-31 18:18 ` [PATCH 2/3] dt-bindings:iio:imu:invensense,mpu6050: " Jonathan Cameron
2020-11-03 2:29 ` Rob Herring
2020-10-31 18:18 ` [PATCH 3/3] dt-bindings:iio:gyro:invensense,mpu3050: txt to yaml format conversion Jonathan Cameron
2020-11-03 2:30 ` Rob Herring
2020-11-03 9:55 ` Linus Walleij
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=20201103022509.GA679426@bogus \
--to=robh@kernel.org \
--cc=Jonathan.Cameron@huawei.com \
--cc=devicetree@vger.kernel.org \
--cc=jic23@kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=peda@axentia.se \
--cc=wsa@kernel.org \
--cc=wsa@the-dreams.de \
/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).