From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Kim Seer Paller <kimseer.paller@analog.com>,
linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: Jonathan Cameron <jic23@kernel.org>,
Lars-Peter Clausen <lars@metafoo.de>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>,
David Lechner <dlechner@baylibre.com>,
Michael Hennerich <michael.hennerich@analog.com>
Subject: Re: [PATCH 1/4] dt-bindings: iio: dac: Add adi,ltc2664.yaml
Date: Fri, 12 Apr 2024 07:50:17 +0200 [thread overview]
Message-ID: <34de2d9b-c62e-4f18-806c-560ba4474237@linaro.org> (raw)
In-Reply-To: <20240412032102.136071-2-kimseer.paller@analog.com>
On 12/04/2024 05:20, Kim Seer Paller wrote:
> Add documentation for ltc2664 and ltc2672.
>
> Co-developed-by: Michael Hennerich <michael.hennerich@analog.com>
> Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
> Signed-off-by: Kim Seer Paller <kimseer.paller@analog.com>
> ---
> .../bindings/iio/dac/adi,ltc2664.yaml | 230 ++++++++++++++++++
> MAINTAINERS | 8 +
> 2 files changed, 238 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/iio/dac/adi,ltc2664.yaml
>
> diff --git a/Documentation/devicetree/bindings/iio/dac/adi,ltc2664.yaml b/Documentation/devicetree/bindings/iio/dac/adi,ltc2664.yaml
> new file mode 100644
> index 000000000..2f581a9e5
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/dac/adi,ltc2664.yaml
> @@ -0,0 +1,230 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/iio/dac/adi,ltc2664.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Analog Devices LTC2664 and LTC2672 DAC
> +
> +maintainers:
> + - Michael Hennerich <michael.hennerich@analog.com>
> + - Kim Seer Paller <kimseer.paller@analog.com>
> +
> +description: |
> + Analog Devices LTC2664 4 channel, 16 bit, +-10V DAC
> + Analog Devices LTC2672 5 channel, 16 bit, 300mA DAC
> + https://www.analog.com/media/en/technical-documentation/data-sheets/ltc2664.pdf
> + https://www.analog.com/media/en/technical-documentation/data-sheets/ltc2672.pdf
> +
> +$defs:
> + toggle-operation:
> + type: object
> + description: Toggle mode channel setting.
> +
> + properties:
> + reg:
> + description: Channel number.
> + minimum: 0
> + maximum: 4
> +
> + adi,toggle-mode:
> + description:
> + Set the channel as a toggle enabled channel. Toggle operation enables
> + fast switching of a DAC output between two different DAC codes without
> + any SPI transaction.
> + type: boolean
> +
> +patternProperties:
> + "^channel@[0-4]$":
> + type: object
patternProps go after properties. You miss additionalProperties: false
and actual properties defined in top-level part of the binding.
I wouldn't call your schema easiest to read. You have two quite
different devices.
> +
> +properties:
> + compatible:
> + enum:
> + - adi,ltc2664
> + - adi,ltc2672
> +
> + reg:
> + maxItems: 1
> +
> + spi-max-frequency:
> + maximum: 50000000
Missing definition of this property, so ref to spi-peripheral-props.
Look at other bindings having this property.
> +
> + vcc-supply:
> + description: Analog Supply Voltage Input.
> +
> + iovcc-supply:
> + description: Digital Input/Output Supply Voltage.
> +
> + vref-supply:
> + description:
> + Reference Input/Output. The voltage at the REF pin sets the full-scale
> + range of all channels. If not provided the internal reference is used and
> + also provided on the VREF pin.
> +
> + clr-gpios:
> + description:
> + If specified, it will be asserted during driver probe. As the line is
> + active low, it should be marked GPIO_ACTIVE_LOW.
First sentence tells nothing about hardware. Do not describe driver
behavior, but hardware.
Second sentence is 90% redundant - just say, when describing the
hardware, that the line for foo bar is active low.
> + maxItems: 1
> +
> + '#address-cells':
> + const: 1
> +
> + '#size-cells':
> + const: 0
> +
> +allOf:
> + - if:
> + properties:
> + compatible:
> + contains:
> + const: adi,ltc2664
> + then:
> + properties:
> + adi,manual-span-operation-config:
> + description:
> + This property must mimic the MSPAN pin configurations.
> + By tying the MSPAN pins (MSP2, MSP1 and MSP0) to GND
> + and/or VCC, any output range can be hardware-configured
> + with different mid-scale or zero-scale reset options.
> + The hardware configuration is latched during power on reset
> + for proper operation.
> + 0 - MPS2=GND, MPS1=GND, MSP0=GND
> + 1 - MPS2=GND, MPS1=GND, MSP0=VCC
> + 2 - MPS2=GND, MPS1=VCC, MSP0=GND
> + 3 - MPS2=GND, MPS1=VCC, MSP0=VCC
> + 4 - MPS2=VCC, MPS1=GND, MSP0=GND
> + 5 - MPS2=VCC, MPS1=GND, MSP0=VCC
> + 6 - MPS2=VCC, MPS1=VCC, MSP0=GND
> + 7 - MPS2=VCC, MPS1=VCC, MSP0=VCC (enables SoftSpan feature)
> + $ref: /schemas/types.yaml#/definitions/uint32
> + enum: [0, 1, 2, 3, 4, 5, 6, 7]
> + default: 7
> +
> + patternProperties:
> + "^channel@([0-3])$":
and the channel@4 is? You allow anything.
> + $ref: '#/$defs/toggle-operation'
> + unevaluatedProperties: false
> +
> + description: Channel in toggle functionality.
> +
> + properties:
> + adi,output-range-microvolt:
> + description: Specify the channel output full scale range.
> + oneOf:
> + - items:
> + - const: 0
> + - enum: [5000000, 10000000]
> + - items:
> + - const: -5000000
> + - const: 5000000
> + - items:
> + - const: -10000000
> + - const: 10000000
> + - items:
> + - const: -2500000
> + - const: 2500000
> +
> + required:
> + - adi,output-range-microvolt
> +
> + - if:
> + properties:
> + compatible:
> + contains:
> + const: adi,ltc2672
> + then:
> + properties:
> + adi,rfsadj-ohms:
> + description: If FSADJ is tied to VCC, an internal RFSADJ (20 kΩ) is
> + selected, which results in nominal output ranges. When an external
> + resistor of 19 kΩ to 41 kΩ can be used instead by connecting the
> + resistor between FSADJ and GND it controls the scaling of the
> + ranges, and the internal resistor is automatically disconnected.
> + minimum: 19000
> + maximum: 41000
> + default: 20000
> +
> + patternProperties:
> + "^channel@([0-4])$":
> + $ref: '#/$defs/toggle-operation'
> + unevaluatedProperties: false
> +
> + description: Configuration properties for a channel in toggle mode
> +
> + properties:
> + adi,output-range-microamp:
> + description: Specify the channel output full scale range.
> + $ref: /schemas/types.yaml#/definitions/uint32
> + enum: [3125000, 6250000, 12500000, 25000000, 50000000, 100000000,
> + 200000000, 300000000]
> +
> + required:
> + - adi,output-range-microamp
> +
> +required:
> + - compatible
> + - reg
> + - spi-max-frequency
> + - vcc-supply
> + - iovcc-supply
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + spi {
> + #address-cells = <1>;
Use 4 spaces for example indentation.
Best regards,
Krzysztof
next prev parent reply other threads:[~2024-04-12 5:50 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-12 3:20 [PATCH 0/4] Add driver for LTC2664 and LTC2672 Kim Seer Paller
2024-04-12 3:20 ` [PATCH 1/4] dt-bindings: iio: dac: Add adi,ltc2664.yaml Kim Seer Paller
2024-04-12 5:50 ` Krzysztof Kozlowski [this message]
2024-04-13 14:54 ` Jonathan Cameron
2024-04-16 14:16 ` Paller, Kim Seer
2024-04-12 21:23 ` David Lechner
2024-04-13 15:06 ` Jonathan Cameron
2024-04-13 15:11 ` Jonathan Cameron
2024-04-13 16:21 ` David Lechner
2024-04-13 17:10 ` Jonathan Cameron
2024-04-16 14:40 ` Paller, Kim Seer
2024-04-20 10:13 ` Jonathan Cameron
2024-04-12 3:21 ` [PATCH 2/4] iio: ABI: add ABI file for the LTC2664 DAC Kim Seer Paller
2024-04-12 21:26 ` David Lechner
2024-04-13 15:25 ` Jonathan Cameron
2024-04-13 20:38 ` David Lechner
2024-04-15 12:45 ` Nuno Sá
2024-04-20 10:22 ` Jonathan Cameron
2024-04-12 3:21 ` [PATCH 3/4] iio: ABI: add ABI file for the LTC2672 DAC Kim Seer Paller
2024-04-13 15:26 ` Jonathan Cameron
2024-04-16 14:18 ` Paller, Kim Seer
2024-04-20 10:23 ` Jonathan Cameron
2024-04-12 3:21 ` [PATCH 4/4] iio: dac: ltc2664: Add driver for LTC2664 and LTC2672 Kim Seer Paller
2024-04-13 15:55 ` 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=34de2d9b-c62e-4f18-806c-560ba4474237@linaro.org \
--to=krzysztof.kozlowski@linaro.org \
--cc=broonie@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=kimseer.paller@analog.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=lars@metafoo.de \
--cc=lgirdwood@gmail.com \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michael.hennerich@analog.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.