aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/basic/docproc.c
diff options
context:
space:
mode:
authorDavid Lechner <[email protected]>2025-10-10 20:24:31 +0000
committerJonathan Cameron <[email protected]>2025-10-13 07:38:09 +0000
commite2cc390a6629c76924a2740c54b144b9b28fca59 (patch)
tree9567192062e323116424c522af9da0657498782f /scripts/basic/docproc.c
parentiio:common:ssp_sensors: Fix an error handling path ssp_probe() (diff)
downloadkernel-e2cc390a6629c76924a2740c54b144b9b28fca59.tar.gz
kernel-e2cc390a6629c76924a2740c54b144b9b28fca59.zip
iio: adc: ad7124: fix temperature channel
Fix temperature channel not working due to gain and offset not being initialized. For channels other than the voltage ones calibration is skipped (which is OK). However that results in the calibration register values tracked in st->channels[i].cfg all being zero. These zeros are later written to hardware before a measurement is made which caused the raw temperature readings to be always 8388608 (0x800000). To fix it, we just make sure the gain and offset values are set to the default values and still return early without doing an internal calibration. While here, add a comment explaining why we don't bother calibrating the temperature channel. Fixes: 47036a03a303 ("iio: adc: ad7124: Implement internal calibration at probe time") Reviewed-by: Marcelo Schmitt <[email protected]> Signed-off-by: David Lechner <[email protected]> Reviewed-by: Uwe Kleine-König <[email protected]> Cc: <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
Diffstat (limited to 'scripts/basic/docproc.c')
0 files changed, 0 insertions, 0 deletions