Unverified Commit ff73e278 authored by James Calligeros's avatar James Calligeros Committed by Mark Brown
Browse files

ASoC: tas2770: expose die temp to hwmon



TAS2770 includes an ADC which reports the chip's die temperature.
As per the datasheet, the temperature in degrees Celsius is derived
by taking the raw value stored in the ADC's registers, dividing by 16,
then subtracting 93.

Create and register a hwmon device to expose the chip's die temperature
to the hwmon interface.

The ADC is shut down during software shutdown mode, and its registers
are initialised to 0 on reset. This means that the die temperature will
read -93 *C until the chip has been fully powered up at least once (e.g.
the PCM its attached to is opened). Once the chip is put into software
shutdown again, the ADC will also shut down. The last value sampled
before this happens will persist in the ADC's registers.

Co-developed-by: default avatarMartin Povišer <povik+lin@cutebit.org>
Signed-off-by: default avatarMartin Povišer <povik+lin@cutebit.org>
Signed-off-by: default avatarJames Calligeros <jcalligeros99@gmail.com>
Link: https://patch.msgid.link/20250406-apple-codec-changes-v5-7-50a00ec850a3@gmail.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent f33b01e0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment