summaryrefslogtreecommitdiff
path: root/crypto/xctr.c
diff options
context:
space:
mode:
authorAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>2023-04-19 08:11:46 +0200
committerDaniel Lezcano <daniel.lezcano@linaro.org>2023-04-26 10:38:34 +0200
commit47cbb0467b8b3c76faba3c2dd34b20070e6103ca (patch)
tree853e2bb354a5077153a78d69f6b8515017e493ab /crypto/xctr.c
parent0a677eea71fd58aa3bc805edfdbe8b0f11815c7d (diff)
thermal/drivers/mediatek: Add temperature constraints to validate read
The AUXADC thermal v1 allows reading temperature range between -20°C to 150°C and any value out of this range is invalid. Add new definitions for MT8173_TEMP_{MIN_MAX} and a new small helper mtk_thermal_temp_is_valid() to check if new readings are in range: if not, we tell to the API that the reading is invalid by returning THERMAL_TEMP_INVALID. It was chosen to introduce the helper function because, even though this temperature range is realistically ok for all, it comes from a downstream kernel driver for version 1, but here we also support v2 and v3 which may may have wider constraints. Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20230419061146.22246-3-angelogioacchino.delregno@collabora.com
Diffstat (limited to 'crypto/xctr.c')
0 files changed, 0 insertions, 0 deletions