thermal/drivers/thermal-generic-adc: Add temperature sensor channel
authorSvyatoslav Ryhel <clamor95@gmail.com>
Wed, 3 Sep 2025 16:27:49 +0000 (19:27 +0300)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Thu, 25 Sep 2025 20:11:00 +0000 (22:11 +0200)
commit3762f5851ac5a65dcccadf73dbe853b1b346f561
treefe0917f6e38ae0944f72ce720260a6864e6d678e
parente881662aa06af65021c2fa255dd7530235a3d195
thermal/drivers/thermal-generic-adc: Add temperature sensor channel

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.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://lore.kernel.org/r/20250903162749.109910-2-clamor95@gmail.com
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
drivers/thermal/thermal-generic-adc.c