summaryrefslogtreecommitdiff
path: root/ipc/msgutil.c
diff options
context:
space:
mode:
authorNĂ­colas F. R. A. Prado <nfraprado@collabora.com>2023-07-13 18:42:37 +0300
committerDaniel Lezcano <daniel.lezcano@linaro.org>2023-08-16 13:20:53 +0300
commit185673ca71d3f7e9c7d62ee5084348e084352e56 (patch)
tree7f18361d0b471d9f355a7ce3c20c3b5439e9bae6 /ipc/msgutil.c
parent3ee1f79426acb77ff131be025963fe223ad2ee02 (diff)
downloadlinux-185673ca71d3f7e9c7d62ee5084348e084352e56.tar.xz
thermal/drivers/mediatek/lvts_thermal: Make readings valid in filtered mode
Currently, when a controller is configured to use filtered mode, thermal readings are valid only about 30% of the time. Upon testing, it was noticed that lowering any of the interval settings resulted in an improved rate of valid data. The same was observed when decreasing the number of samples for each sensor (which also results in quicker measurements). Retrying the read with a timeout longer than the time it takes to resample (about 344us with these settings and 4 sensors) also improves the rate. Lower all timing settings to the minimum, configure the filtering to single sample, and poll the measurement register for at least one period to improve the data validity on filtered mode. With these changes in place, out of 100000 reads, a single one failed, ie 99.999% of the data was valid. Reviewed-by: Chen-Yu Tsai <wenst@chromium.org> Tested-by: Chen-Yu Tsai <wenst@chromium.org> Signed-off-by: NĂ­colas F. R. A. Prado <nfraprado@collabora.com> Reviewed-by: Alexandre Mergnat <amergnat@baylibre.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20230713154743.611870-1-nfraprado@collabora.com
Diffstat (limited to 'ipc/msgutil.c')
0 files changed, 0 insertions, 0 deletions