[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240413155451.65bd32ad@jic23-huawei>
Date: Sat, 13 Apr 2024 15:54:51 +0100
From: Jonathan Cameron <jic23@...nel.org>
To: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
Cc: Kim Seer Paller <kimseer.paller@...log.com>, linux-iio@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org, Lars-Peter
Clausen <lars@...afoo.de>, Rob Herring <robh@...nel.org>, Krzysztof
Kozlowski <krzysztof.kozlowski+dt@...aro.org>, Conor Dooley
<conor+dt@...nel.org>, Liam Girdwood <lgirdwood@...il.com>, Mark Brown
<broonie@...nel.org>, David Lechner <dlechner@...libre.com>, Michael
Hennerich <michael.hennerich@...log.com>
Subject: Re: [PATCH 1/4] dt-bindings: iio: dac: Add adi,ltc2664.yaml
On Fri, 12 Apr 2024 07:50:17 +0200
Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org> wrote:
> On 12/04/2024 05:20, Kim Seer Paller wrote:
> > Add documentation for ltc2664 and ltc2672.
> >
> > Co-developed-by: Michael Hennerich <michael.hennerich@...log.com>
> > Signed-off-by: Michael Hennerich <michael.hennerich@...log.com>
> > Signed-off-by: Kim Seer Paller <kimseer.paller@...log.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@...log.com>
> > + - Kim Seer Paller <kimseer.paller@...log.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.
I agree entirely. I think it might be simpler to have 2 bindings.
If you haven't already tried that give it a go.
Note that we can have 2 bindings that in Linux are handled by one
driver (examples already exist max1363 and max1238 IIRC) as well as
the other way around where we have one binding and 2 drivers.
Jonathan
Powered by blists - more mailing lists