]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ASoC: tas2764: expose die temp to hwmon
authorJames Calligeros <jcalligeros99@gmail.com>
Sat, 5 Apr 2025 23:15:12 +0000 (09:15 +1000)
committerMark Brown <broonie@kernel.org>
Sun, 13 Apr 2025 19:23:35 +0000 (20:23 +0100)
commit186dfc85f9a824e3f8383322747ca75e988486e9
treee08bdc2a890eaf6acf2ac20cfca11b4997436eab
parentff73e2780169a43617cc339686f5bd3d74fa8652
ASoC: tas2764: expose die temp to hwmon

TAS2764 contains an ADC that reports the chip's die temperature.
The temperature in degrees Celsius is yielded by subtracting 93
from the raw value reported by the ADC.

Expose the codec die temperature to the hwmon interface.

The chip will initialise the temperature register to 2.6 *C
to avoid triggering over temp protection. As the ADC is powered
down during software shutdown, this value will persist until the
chip is fully powered up (e.g. when the PCM it's attached to is
opened). When the chip is powered back down, the last value sampled
will persist in the register.

Co-developed-by: Martin Povišer <povik+lin@cutebit.org>
Signed-off-by: Martin Povišer <povik+lin@cutebit.org>
Signed-off-by: James Calligeros <jcalligeros99@gmail.com>
Link: https://patch.msgid.link/20250406-apple-codec-changes-v5-8-50a00ec850a3@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/tas2764.c
sound/soc/codecs/tas2764.h