linux-hwmon.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH v1 0/2] hwmon: (iio_hwmon) optionally force iio channel type
@ 2021-05-16  4:43 Liam Beguin
  2021-05-16  4:43 ` [RFC PATCH v1 1/2] " Liam Beguin
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Liam Beguin @ 2021-05-16  4:43 UTC (permalink / raw)
  To: liambeguin, jdelvare, linux, jic23, lars, pmeerw
  Cc: linux-hwmon, linux-kernel, linux-iio, devicetree, robh+dt

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?

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
-- 
2.30.1.489.g328c10930387


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

end of thread, other threads:[~2021-05-16 23:11 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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