devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] iio: ad74413r: allow configuring digital input threshold
@ 2023-06-23 11:33 Rasmus Villemoes
  2023-06-23 11:33 ` [PATCH 1/2] dt-bindings: iio: ad74413r: add binding for " Rasmus Villemoes
  2023-06-23 11:33 ` [PATCH 2/2] iio: addac: ad74413r: wire up digital-input-threshold-microvolt DT property Rasmus Villemoes
  0 siblings, 2 replies; 10+ messages in thread
From: Rasmus Villemoes @ 2023-06-23 11:33 UTC (permalink / raw)
  To: Cosmin Tanislav, Lars-Peter Clausen, Michael Hennerich,
	Jonathan Cameron, linux-iio, linux-kernel
  Cc: devicetree, Krzysztof Kozlowski, Rob Herring, Rasmus Villemoes

The reset default value of the DIN_THRESH register is 0x0, meaning
that the threshold for the digital input channels is 1/60 of AVDD. In
most applications, that value is way too low and susceptible to noise.

These patches introduce a new DT property,
digital-input-threshold-microvolt, which if present will be used as
the threshold in "16V" mode, i.e. as an absolute threshold, not
proportional to AVDD.

If someone needs the threshold to be proportional to AVDD, but being
say 15/60, another DT property (mutually exclusive with this one)
could be introduced. But since I don't need that and can't come up
with a good name ('digital-input-threshold-60ths-avdd' ?) I punt that
problem to whoever needs it.

Rasmus Villemoes (2):
  dt-bindings: iio: ad74413r: add binding for digital input threshold
  iio: addac: ad74413r: wire up digital-input-threshold-microvolt DT
    property

 .../bindings/iio/addac/adi,ad74413r.yaml      | 10 ++++++++++
 drivers/iio/addac/ad74413r.c                  | 20 +++++++++++++++++++
 2 files changed, 30 insertions(+)

-- 
2.37.2


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-07-02  9:37 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-23 11:33 [PATCH 0/2] iio: ad74413r: allow configuring digital input threshold Rasmus Villemoes
2023-06-23 11:33 ` [PATCH 1/2] dt-bindings: iio: ad74413r: add binding for " Rasmus Villemoes
2023-06-23 16:44   ` Conor Dooley
2023-06-23 21:57     ` Rob Herring
2023-06-26  8:15       ` Rasmus Villemoes
2023-06-26  8:29         ` Krzysztof Kozlowski
2023-07-02  9:36           ` Jonathan Cameron
2023-06-23 21:57   ` Rob Herring
2023-06-23 11:33 ` [PATCH 2/2] iio: addac: ad74413r: wire up digital-input-threshold-microvolt DT property Rasmus Villemoes
2023-06-25 11:14   ` Jonathan Cameron

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).