[PATCH v5 0/1 RESEND] thermal: thermal-generic-adc: add temp sensor function

Svyatoslav Ryhel posted 1 patch 4 weeks, 1 day ago
drivers/thermal/thermal-generic-adc.c | 55 ++++++++++++++++++++++++++-
1 file changed, 54 insertions(+), 1 deletion(-)
[PATCH v5 0/1 RESEND] thermal: thermal-generic-adc: add temp sensor function
Posted by Svyatoslav Ryhel 4 weeks, 1 day ago
To avoid duplicating sensor functionality and conversion tables, this
design allows converting an ADC IIO channel's output directly into a
temperature IIO channel. This is particularly useful for devices where
hwmon isn't suitable or where temperature data must be accessible through
IIO.

One such device is, for example, the MAX17040 fuel gauge.

---
Changes on switching from v4 to v5:
- switched back to IIO_CHAN_INFO_PROCESSED
- dropped schema commit
- applied Jonathan Cameron code improvement suggestions

Changes on switching from v3 to v4:
- switch to use of RAW and SCALED channels to provide more accurate data

Changes on switching from v2 to v3:
- rephrased commit headers

Changes on switching from v1 to v2:
- documented #iio-channel-cells property
- switched to IIO_CHAN_INFO_PROCESSED
---

Svyatoslav Ryhel (1):
  thermal: thermal-generic-adc: add temperature sensor channel

 drivers/thermal/thermal-generic-adc.c | 55 ++++++++++++++++++++++++++-
 1 file changed, 54 insertions(+), 1 deletion(-)

-- 
2.48.1
Re: [PATCH v5 0/1 RESEND] thermal: thermal-generic-adc: add temp sensor function
Posted by Daniel Lezcano 1 week, 6 days ago
On 03/09/2025 18:27, Svyatoslav Ryhel wrote:
> To avoid duplicating sensor functionality and conversion tables, this
> design allows converting an ADC IIO channel's output directly into a
> temperature IIO channel. This is particularly useful for devices where
> hwmon isn't suitable or where temperature data must be accessible through
> IIO.
> 
> One such device is, for example, the MAX17040 fuel gauge.
> 
> ---

Applied, thanks

-- 
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog