The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Patrick Rudolph <patrick.rudolph@9elements.com>
Cc: Peter Rosin <peda@axentia.se>, Rob Herring <robh+dt@kernel.org>,
	linux-i2c@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/4] dt-bindings: i2c: Add Maxim MAX735x/MAX736x variants
Date: Sun, 9 Jan 2022 01:14:42 +0200	[thread overview]
Message-ID: <Ydoa4nK8PjzZGQ9F@pendragon.ideasonboard.com> (raw)
In-Reply-To: <20220108185759.2086347-2-patrick.rudolph@9elements.com>

Hi Patrick,

Thank you for the patch.

On Sat, Jan 08, 2022 at 07:57:55PM +0100, Patrick Rudolph wrote:
> Add the Maxim MAX735x/MAX736x as supported chip and give an example
> how to use it. The functionality will be provided by the exisintg
> pca954x driver.

While DT bindings and drivers are decoupled, the fact that the same
driver provides support for the MAX735x/MAX736x indicates there's some
similarity between those and the PCA954x chips. Would they be similar
enough to have a single DT binding schema file ? This file looks very
similar to Documentation/devicetree/bindings/i2c/i2c-mux-pca954x.yaml.

> Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
> ---
>  .../bindings/i2c/i2c-mux-max735x.yaml         | 101 ++++++++++++++++++
>  1 file changed, 101 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/i2c/i2c-mux-max735x.yaml
> 
> diff --git a/Documentation/devicetree/bindings/i2c/i2c-mux-max735x.yaml b/Documentation/devicetree/bindings/i2c/i2c-mux-max735x.yaml
> new file mode 100644
> index 000000000000..dc924ec934ca
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/i2c/i2c-mux-max735x.yaml
> @@ -0,0 +1,101 @@
> +# SPDX-License-Identifier: GPL-2.0
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/i2c/i2c-mux-max735x.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Maxim MAX735x/MAX736x I2C bus switch
> +
> +maintainers:
> +  - Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> +
> +description:
> +  The binding supports Maxim MAX735x and MAX736x I2C mux/switch devices.
> +
> +allOf:
> +  - $ref: /schemas/i2c/i2c-mux.yaml#
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            enum:
> +              - maxim,max7367
> +              - maxim,max7369
> +    then:
> +      properties:
> +        interrupts: true
> +
> +        "#interrupt-cells":
> +          const: 2
> +
> +        interrupt-controller: true
> +
> +properties:
> +  compatible:
> +    oneOf:
> +      - enum:
> +          - maxim,max7356
> +          - maxim,max7357
> +          - maxim,max7358
> +          - maxim,max7367
> +          - maxim,max7368
> +          - maxim,max7369
> +
> +  reg:
> +    maxItems: 1
> +
> +  reset-gpios:
> +    maxItems: 1
> +
> +  i2c-mux-idle-disconnect:
> +    type: boolean
> +    description: Forces mux to disconnect all children in idle state. This is
> +      necessary for example, if there are several multiplexers on the bus and
> +      the devices behind them use same I2C addresses.
> +
> +  idle-state:
> +    description: if present, overrides i2c-mux-idle-disconnect
> +    $ref: /schemas/mux/mux-controller.yaml#/properties/idle-state
> +
> +required:
> +  - compatible
> +  - reg
> +
> +unevaluatedProperties: false
> +
> +examples:
> +  - |
> +    i2c {
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +
> +        i2c-mux@74 {
> +            compatible = "maxim,max7357";
> +            #address-cells = <1>;
> +            #size-cells = <0>;
> +            reg = <0x74>;
> +
> +            i2c@1 {
> +                #address-cells = <1>;
> +                #size-cells = <0>;
> +                reg = <1>;
> +
> +                eeprom@54 {
> +                    compatible = "atmel,24c08";
> +                    reg = <0x54>;
> +                };
> +            };
> +
> +            i2c@7 {
> +                #address-cells = <1>;
> +                #size-cells = <0>;
> +                reg = <7>;
> +
> +                rtc@51 {
> +                    compatible = "nxp,pcf8563";
> +                    reg = <0x51>;
> +                };
> +            };
> +        };
> +    };
> +...

-- 
Regards,

Laurent Pinchart

  reply	other threads:[~2022-01-08 23:14 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-08 18:57 [PATCH v2 0/4] Add support for Maxim MAX735x/MAX736x variants Patrick Rudolph
2022-01-08 18:57 ` [PATCH v2 1/4] dt-bindings: i2c: Add " Patrick Rudolph
2022-01-08 23:14   ` Laurent Pinchart [this message]
2022-01-08 18:57 ` [PATCH v2 2/4] i2c: muxes: pca954x: Add MAX735x/MAX736x support Patrick Rudolph
2022-01-08 18:57 ` [PATCH v2 3/4] dt-bindings: i2c: Add regulator to pca954x and max735x Patrick Rudolph
2022-01-08 23:17   ` Laurent Pinchart
2022-01-08 18:57 ` [PATCH v2 4/4] i2c: muxes: pca954x: Add regulator support Patrick Rudolph
2022-01-12  9:31   ` Wolfram Sang
2022-01-20  7:22     ` Patrick Rudolph

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=Ydoa4nK8PjzZGQ9F@pendragon.ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=patrick.rudolph@9elements.com \
    --cc=peda@axentia.se \
    --cc=robh+dt@kernel.org \
    /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