linux-hwmon.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Liam Beguin" <liambeguin@gmail.com>
To: "Guenter Roeck" <linux@roeck-us.net>, <jdelvare@suse.com>,
	<jic23@kernel.org>, <lars@metafoo.de>, <pmeerw@pmeerw.net>
Cc: <linux-hwmon@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<linux-iio@vger.kernel.org>, <devicetree@vger.kernel.org>,
	<robh+dt@kernel.org>
Subject: Re: [RFC PATCH v1 0/2] hwmon: (iio_hwmon) optionally force iio channel type
Date: Sun, 16 May 2021 10:55:40 -0400	[thread overview]
Message-ID: <CBER9H2H2I30.25AABLQDA7CD3@shaak> (raw)
In-Reply-To: <29235b1d-78f3-6d8f-567f-78ca6f350340@roeck-us.net>

Hi Guenter,

On Sun May 16, 2021 at 4:56 AM EDT, Guenter Roeck wrote:
> On 5/15/21 9:43 PM, Liam Beguin wrote:
> > Add a devicetree binding to optionally force a different IIO channel
> > type.
> > 
> > This is useful in cases where ADC channels are connected to a circuit
> > that represent another unit such as a temperature or a current.
> > 
> > `channel-types` was chosen instead of `io-channel-types` as this is not
> > part of the iio consumer bindings.
> > 
> > In the current form, this patch does what it's intended to do:
> > change the unit displayed by `sensors`, but feels like the wrong way to
> > address the problem.
> > 
> > Would it be possible to force the type of different IIO channels for
> > this kind of use case with a devicetree binding from the IIO subsystem?
> > 
>
> That doesn't make sense to me. If an ADC is used to report temperatures,
> it would be a thermistor, and the ntc_thermistor driver should be used.
> Not sure what to do with currents, but overriding "voltage" with
> "current"
> seems wrong.

Thanks for pointing out the ntc_thermistor.
It makes sense that the ADC channel would become a thermistor.
I'll have a look and see if it fits my use case.

Liam

>
> Guenter
>
> > It would be convenient to do it within the IIO subsystem to have the
> > right unit there too.
> > 
> > Thanks for your time,
> > Liam
> > 
> > Liam Beguin (2):
> >    hwmon: (iio_hwmon) optionally force iio channel type
> >    dt-bindings: hwmon: add iio-hwmon bindings
> > 
> >   .../devicetree/bindings/hwmon/iio-hwmon.yaml  | 41 +++++++++++++++++++
> >   drivers/hwmon/iio_hwmon.c                     |  2 +
> >   2 files changed, 43 insertions(+)
> >   create mode 100644 Documentation/devicetree/bindings/hwmon/iio-hwmon.yaml
> > 
> > 
> > base-commit: 9f4ad9e425a1d3b6a34617b8ea226d56a119a717
> > 


  reply	other threads:[~2021-05-16 14:55 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-16  4:43 [RFC PATCH v1 0/2] hwmon: (iio_hwmon) optionally force iio channel type Liam Beguin
2021-05-16  4:43 ` [RFC PATCH v1 1/2] " Liam Beguin
2021-05-16  4:43 ` [RFC PATCH v1 2/2] dt-bindings: hwmon: add iio-hwmon bindings Liam Beguin
2021-05-16  8:56 ` [RFC PATCH v1 0/2] hwmon: (iio_hwmon) optionally force iio channel type Guenter Roeck
2021-05-16 14:55   ` Liam Beguin [this message]
2021-05-16  9:06 ` Jonathan Cameron
2021-05-16 15:02   ` Liam Beguin
2021-05-16 15:54     ` Guenter Roeck
2021-05-16 16:26       ` Jonathan Cameron
2021-05-16 18:14         ` Liam Beguin
2021-05-16 23:10           ` Guenter Roeck

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=CBER9H2H2I30.25AABLQDA7CD3@shaak \
    --to=liambeguin@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=jdelvare@suse.com \
    --cc=jic23@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=pmeerw@pmeerw.net \
    --cc=robh+dt@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).