linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <jonathan.cameron@huawei.com>
To: Janani Sunil <janani.sunil@analog.com>
Cc: Lars-Peter Clausen <lars@metafoo.de>,
	Michael Hennerich <Michael.Hennerich@analog.com>,
	Alexandru Ardelean <alexandru.ardelean@analog.com>,
	Jonathan Cameron <jic23@kernel.org>,
	"Rob Herring" <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	Jonathan Corbet <corbet@lwn.net>, <linux-iio@vger.kernel.org>,
	<devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<linux-doc@vger.kernel.org>
Subject: Re: [PATCH 1/3] dt-bindings: iio: dac: Add max22007
Date: Fri, 19 Dec 2025 16:40:02 +0000	[thread overview]
Message-ID: <20251219164002.00004c74@huawei.com> (raw)
In-Reply-To: <20251219-max22007-dev-v1-1-242da2c2b868@analog.com>

On Fri, 19 Dec 2025 16:31:15 +0100
Janani Sunil <janani.sunil@analog.com> wrote:

Hi Janani and welcome to IIO.


> Devicetree bindings for MAX22007 4-channel
> 12-bit DAC that drives a voltage or current
> output on each channel

This is a very short wrap. Aim for 75 characters in patch description lines
(so slightly shorter than 80 chars standard for everything else).

> 
> Signed-off-by: Janani Sunil <janani.sunil@analog.com>

> ---
>  .../devicetree/bindings/iio/dac/adi,max22007.yaml  | 116 +++++++++++++++++++++
>  MAINTAINERS                                        |   7 ++
>  2 files changed, 123 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/iio/dac/adi,max22007.yaml b/Documentation/devicetree/bindings/iio/dac/adi,max22007.yaml
> new file mode 100644
> index 000000000000..c2f65d9e42d4
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/dac/adi,max22007.yaml

...

> +  vdd-supply:
> +    description: Low-Voltage Power Supply from +2.7V to +5.5V.
> +
> +  hvdd-supply:
> +    description:
> +      Positive High-Voltage Power Supply from +8V to (HVSS +24V) for
> +      the Output Channels.
> +
> +  hvss-supply:
> +    description:
> +      Negative High-Voltage Power Supply from -2V to 0V for the Output Channels.
> +
> +  reset-gpios:
> +    maxItems: 1
> +    description:
> +      GPIO used for hardware reset of the device.
> +
> +patternProperties:
> +  "^channel@[0-3]$":
> +    allOf:
> +      - $ref: /schemas/iio/dac/dac.yaml#
> +      - type: object
> +        description:
> +          Represents the external channels which are connected to the DAC.
> +          Channels not specified in the device tree will be powered off.
> +
> +        properties:
> +          reg:
> +            description: Channel number
> +            maxItems: 1

min / max?

> +
> +          adi,type:
> +            description: Channel output type.
> +            $ref: /schemas/types.yaml#/definitions/string
> +            enum: [voltage, current]
This is much more constrained (as only two types of channel) but we do have
precedence for adi,ch-func in adi,ad74115.yaml and adi,ad74413r.yaml

That's not a particularly pretty binding but we should probably stick to
it anyway.

adi,type is too vague a name for this property anyway.

> +
> +        required:
> +          - reg
> +          - adi,type
> +
> +        unevaluatedProperties: false
> +
> +required:
> +  - compatible

For supplies we document as required any that are needed for the device
to function, whether or not we happen to need to specify them on
a given board (given fallbacks that apply on assumption that fixes
always on supplies are in use).  So I'd expect to see at least some
of the supplies listed here.

> +  - reg
> +
> +anyOf:
> +  - required: [channel@0]
> +  - required: [channel@1]
> +  - required: [channel@2]
> +  - required: [channel@3]

Interesting. I'm not sure we have never bothered to document this before and there
are other devices for which some sort of channel config is pretty much needed.
What is the justification to have this explicitly listed here?

> +
> +unevaluatedProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/gpio/gpio.h>
> +    spi {
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +
> +        dac@0 {
> +            compatible = "adi,max22007";
> +            reg = <0>;
> +            spi-max-frequency = <500000>;
> +            reset-gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
> +            #address-cells = <1>;
> +            #size-cells = <0>;
> +
> +            channel@0 {
> +                reg = <0>;
> +                adi,type = "voltage";
> +            };
> +
> +            channel@1 {
> +                reg = <1>;
> +                adi,type = "current";
> +            };
> +        };
> +    };
> +...


  parent reply	other threads:[~2025-12-19 16:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-19 15:31 [PATCH 0/3] Subject: [PATCH v1 0/3] iio: dac: Add support for MAX22007 DAC Janani Sunil
2025-12-19 15:31 ` [PATCH 1/3] dt-bindings: iio: dac: Add max22007 Janani Sunil
2025-12-19 15:50   ` Krzysztof Kozlowski
2025-12-19 16:40   ` Jonathan Cameron [this message]
2025-12-19 15:31 ` [PATCH 2/3] docs: iio: Add documentation for MAX22007 driver Janani Sunil
2025-12-19 16:47   ` Jonathan Cameron
2025-12-19 15:31 ` [PATCH 3/3] iio: dac: Add MAX22007 DAC driver support Janani Sunil
2025-12-19 17:25   ` Jonathan Cameron

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=20251219164002.00004c74@huawei.com \
    --to=jonathan.cameron@huawei.com \
    --cc=Michael.Hennerich@analog.com \
    --cc=alexandru.ardelean@analog.com \
    --cc=conor+dt@kernel.org \
    --cc=corbet@lwn.net \
    --cc=devicetree@vger.kernel.org \
    --cc=janani.sunil@analog.com \
    --cc=jic23@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh@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;
as well as URLs for NNTP newsgroup(s).