devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: David Lechner <dlechner@baylibre.com>
Cc: "Krzysztof Kozlowski" <krzk@kernel.org>,
	"Kim Seer Paller" <kimseer.paller@analog.com>,
	linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org,
	devicetree@vger.kernel.org,
	"Lars-Peter Clausen" <lars@metafoo.de>,
	"Liam Girdwood" <lgirdwood@gmail.com>,
	"Mark Brown" <broonie@kernel.org>,
	"Dimitri Fedrau" <dima.fedrau@gmail.com>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Rob Herring" <robh@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Michael Hennerich" <michael.hennerich@analog.com>,
	"Nuno Sá" <noname.nuno@gmail.com>
Subject: Re: [PATCH v3 4/5] dt-bindings: iio: dac: Add adi,ltc2672.yaml
Date: Sat, 8 Jun 2024 15:32:31 +0100	[thread overview]
Message-ID: <20240608153231.02f839fd@jic23-huawei> (raw)
In-Reply-To: <3dadacf8-1349-483d-b264-dcb41d2cc3fc@baylibre.com>

On Tue, 4 Jun 2024 08:53:27 -0500
David Lechner <dlechner@baylibre.com> wrote:

> On 6/4/24 1:47 AM, Krzysztof Kozlowski wrote:
> > On 03/06/2024 21:59, David Lechner wrote:  
> >> On 6/2/24 8:21 PM, Kim Seer Paller wrote:  
> >>> Add documentation for ltc2672.
> >>>
> >>> Reported-by: Rob Herring (Arm) <robh@kernel.org>
> >>> Closes: https://lore.kernel.org/all/171643825573.1037396.2749703571529285460.robh@kernel.org/
> >>> 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,ltc2672.yaml         | 158 ++++++++++++++++++
> >>>  MAINTAINERS                                   |   1 +
> >>>  2 files changed, 159 insertions(+)
> >>>  create mode 100644 Documentation/devicetree/bindings/iio/dac/adi,ltc2672.yaml
> >>>
> >>> diff --git a/Documentation/devicetree/bindings/iio/dac/adi,ltc2672.yaml b/Documentation/devicetree/bindings/iio/dac/adi,ltc2672.yaml
> >>> new file mode 100644
> >>> index 000000000000..d143a9db7010
> >>> --- /dev/null
> >>> +++ b/Documentation/devicetree/bindings/iio/dac/adi,ltc2672.yaml
> >>> @@ -0,0 +1,158 @@
> >>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> >>> +%YAML 1.2
> >>> +---
> >>> +$id: http://devicetree.org/schemas/iio/dac/adi,ltc2672.yaml#
> >>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> >>> +
> >>> +title: Analog Devices LTC2672 DAC
> >>> +
> >>> +maintainers:
> >>> +  - Michael Hennerich <michael.hennerich@analog.com>
> >>> +  - Kim Seer Paller <kimseer.paller@analog.com>
> >>> +
> >>> +description: |
> >>> +  Analog Devices LTC2672 5 channel, 16 bit, 300mA DAC
> >>> +  https://www.analog.com/media/en/technical-documentation/data-sheets/ltc2672.pdf
> >>> +
> >>> +properties:
> >>> +  compatible:
> >>> +    enum:
> >>> +      - adi,ltc2672  
> >>
> >> The linked datasheet describes 12-bit and 16-bit versions, so should we have
> >> two compatibles here? adi,ltc2672-12, adi,ltc2672-16  
> > 
> > Is their programming model different?
> >   
> 
> I replied to myself already with the answer. After looking at it more it
> does not appear that is the case.
> 

For a DAC, this is an interesting question.  The wrong impressions of
precision might be a problem if someone is trying to tune the value.

Say they set it to +15 and look at some other sensor for the affect.
They expect to see something but get no change at all.  They might
assume the circuit is broken.

So I think yes the programming model is different and that should
be discoverable (ideally from hardware, but if not from the compatible)
To take an extreme example of extending the logic of these being
the 'same' from a programming model point of view, would we consider
a regulator that did 0 and 3V only different from one that did 0V,
1V, 2V, 3V just because the second bit in the register was ignored?
I think in that case we'd consider them to have an obviously different
programming model.

We have a few cases where we do paper over similar differences in
resolution, but within one part with different settings rather than
between devices (so that's a driver limitation, not a DT thing).

So I might be persuaded no one cares, but in my view the programming
model is different in a significant way.

Jonathan





  reply	other threads:[~2024-06-08 14:32 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-03  1:21 [PATCH v3 0/5] Add driver for LTC2664 and LTC2672 Kim Seer Paller
2024-06-03  1:21 ` [PATCH v3 1/5] iio: ABI: Generalize ABI documentation for DAC Kim Seer Paller
2024-06-08 14:40   ` Jonathan Cameron
2024-06-12 10:57     ` Paller, Kim Seer
2024-06-13 17:00       ` Jonathan Cameron
2024-06-03  1:21 ` [PATCH v3 2/5] iio: ABI: add DAC 42kohm_to_gnd powerdown mode Kim Seer Paller
2024-06-03  1:21 ` [PATCH v3 3/5] dt-bindings: iio: dac: Add adi,ltc2664.yaml Kim Seer Paller
2024-06-03  7:02   ` Krzysztof Kozlowski
2024-06-03  1:21 ` [PATCH v3 4/5] dt-bindings: iio: dac: Add adi,ltc2672.yaml Kim Seer Paller
2024-06-03  7:05   ` Krzysztof Kozlowski
2024-06-03 19:59   ` David Lechner
2024-06-03 20:17     ` David Lechner
2024-06-04  6:47     ` Krzysztof Kozlowski
2024-06-04 13:53       ` David Lechner
2024-06-08 14:32         ` Jonathan Cameron [this message]
2024-06-03  1:22 ` [PATCH v3 5/5] iio: dac: ltc2664: Add driver for LTC2664 and LTC2672 Kim Seer Paller
2024-06-03 13:12   ` Nuno Sá
2024-06-03 20:43   ` David Lechner
2024-06-06 15:49     ` Paller, Kim Seer
2024-06-07 19:13       ` David Lechner
2024-06-18 10:32     ` Paller, Kim Seer
2024-06-18 13:42       ` David Lechner
2024-06-08 14:57   ` 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=20240608153231.02f839fd@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=broonie@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dima.fedrau@gmail.com \
    --cc=dlechner@baylibre.com \
    --cc=kimseer.paller@analog.com \
    --cc=krzk+dt@kernel.org \
    --cc=krzk@kernel.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=noname.nuno@gmail.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 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).