From: Jonathan Cameron <jic23@kernel.org>
To: David Lechner <dlechner@baylibre.com>
Cc: Mariel Tinaco <Mariel.Tinaco@analog.com>,
linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
Lars-Peter Clausen <lars@metafoo.de>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>,
Michael Hennerich <Michael.Hennerich@analog.com>,
Marcelo Schmitt <marcelo.schmitt1@gmail.com>,
Dimitri Fedrau <dima.fedrau@gmail.com>,
Guenter Roeck <linux@roeck-us.net>
Subject: Re: [PATCH 0/2] add AD8460 DAC driver
Date: Sat, 11 May 2024 17:21:55 +0100 [thread overview]
Message-ID: <20240511172155.08bc0987@jic23-huawei> (raw)
In-Reply-To: <CAMknhBHd2XCJH4rgYDq=vbCL5E_tM3FxFPWbNy9PvxLCJL4tcA@mail.gmail.com>
On Fri, 10 May 2024 12:30:46 -0500
David Lechner <dlechner@baylibre.com> wrote:
> On Fri, May 10, 2024 at 1:42 AM Mariel Tinaco <Mariel.Tinaco@analog.com> wrote:
> >
> > The AD8460 is a 14-bit, high power +-40V 1A, high-speed DAC,
> > with dual digital input modes, programmable supply current and
> > fault monitoring and protection settings for output current,
> > output voltage and junction temperature.
> >
> > The fault monitoring and shutdown protection features were
> > supported in the earlier versions of the IIO driver but was
> > scrapped due to uncertainties if the functionalities belong to
> > the IIO driver. However, it would be best to implement it for
> > the device's quality of life. I'd like to know if it's better
> > suited as a stand-alone HWMON driver.
That probably doesn't make sense. This reply btw is based on the
text here. I haven't yet looked in detail at the datasheet.
Some fault conditions are relatively easy to map to threshold events
on an input channel. The ones that are harder are things
like short circuit detectors where it's hard to know what the
actual threshold is.
The other place we are limited is in multiple levels for the
same thing. So warning and fault levels. That stuff is handled
much better by hwmon where these things are more common.
The issue we have is that the event encoding is a bit tight
but we could see if there is a way to add these.
> >
> > The following are the configurable and readable parameters
> > through SPI that could be implemented on the HWMON driver:
> > * An enable bit to arm/protect the device on overcurrent,
> > overvoltage or overtemperature events. The device is shut down
> > upon detection.
We don't have a good way to handle restarting from shutdown, but
perhaps we could use another action to signal that - maybe even
going as far as saying that the driver should be reloaded.
As for the thresholds, they sound like the map to IIO events
reasonably well.
> > * A configurable range/threshold for voltage, current and
> > temperature that raises alarm when exceeded while the device is
> > armed.
That maps fine to the IIO event threshold controls.
> > * Flags that can be polled to raise alarm upon detection of
> > overcurrent, overvoltage or overtemperature events, and apply
> > additional protective measures.
The specific need to poll is awkward but you could do it easily
enough in driver and use the IIO event stuff to signal any
events detected.
> > * Programmable quiescent current (optional)
Could probably figure out a suitable control for this, but I'm not
entirely sure what it is :)
> > * Thermal monitoring is done by measuring voltage on TMP pin
> > (unlikely to be included)
If you did want to, the usual trick for these is to include
an optional use as a consumer of an IIO provider which would be
a separate ADC.
> >
>
> Adding myself to the cc: here since I'm interested to see what
> Jonathan (or anyone else) has to say about the fault monitoring.
Jonathan
next prev parent reply other threads:[~2024-05-11 16:22 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-10 6:40 [PATCH 0/2] add AD8460 DAC driver Mariel Tinaco
2024-05-10 6:40 ` [PATCH 1/2] dt-bindings: iio: dac: add docs for ad8460 Mariel Tinaco
2024-05-10 7:21 ` Rob Herring (Arm)
2024-05-10 17:28 ` David Lechner
2024-05-11 16:25 ` Jonathan Cameron
2024-05-11 18:47 ` David Lechner
2024-05-21 7:07 ` Nuno Sá
2024-06-24 4:20 ` Tinaco, Mariel
2024-05-10 6:40 ` [PATCH 2/2] iio: dac: support the ad8460 Waveform DAC Mariel Tinaco
2024-05-10 17:30 ` David Lechner
2024-05-11 16:44 ` Jonathan Cameron
2024-06-24 4:19 ` Tinaco, Mariel
2024-06-28 18:45 ` Jonathan Cameron
2024-07-08 5:17 ` Tinaco, Mariel
2024-07-08 16:05 ` Jonathan Cameron
2024-07-11 9:20 ` Nuno Sá
2024-07-11 21:31 ` David Lechner
2024-07-12 6:57 ` Nuno Sá
2024-07-13 9:57 ` Jonathan Cameron
2024-07-14 6:17 ` Nuno Sá
2024-06-24 4:56 ` Tinaco, Mariel
2024-06-28 18:51 ` Jonathan Cameron
2024-07-07 23:32 ` Tinaco, Mariel
2024-07-07 23:37 ` Tinaco, Mariel
2024-05-10 17:30 ` [PATCH 0/2] add AD8460 DAC driver David Lechner
2024-05-11 16:21 ` Jonathan Cameron [this message]
2024-06-24 4:38 ` Tinaco, Mariel
2024-06-28 18:39 ` Jonathan Cameron
2024-07-07 23:29 ` Tinaco, Mariel
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=20240511172155.08bc0987@jic23-huawei \
--to=jic23@kernel.org \
--cc=Mariel.Tinaco@analog.com \
--cc=Michael.Hennerich@analog.com \
--cc=broonie@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dima.fedrau@gmail.com \
--cc=dlechner@baylibre.com \
--cc=krzk+dt@kernel.org \
--cc=lars@metafoo.de \
--cc=lgirdwood@gmail.com \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=marcelo.schmitt1@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