OSDN Git Service

thermal: armada: average over samples to avoid glitches
authorMiquel Raynal <miquel.raynal@bootlin.com>
Mon, 16 Jul 2018 14:41:49 +0000 (16:41 +0200)
committerEduardo Valentin <edubezval@gmail.com>
Fri, 27 Jul 2018 21:43:06 +0000 (14:43 -0700)
commita9fae794e4c581bbe460106609ce88dec8b00973
tree274d2c95a9bd9a24dabbd00ea5530c020f893380
parent5b5e17a182e14316ab4369fd9e8173207cf42130
thermal: armada: average over samples to avoid glitches

Configure the sample frequency and number of averaged samples.

This is needed for two reasons:
1/ To be bootloader independent.
2/ To prepare the introduction of multi-sensors support by preventing
   inconsistencies when reading temperatures that could be a mean of
   samples took from different sensors.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
drivers/thermal/armada_thermal.c