thermal/drivers/mediatek: Add the Low Voltage Thermal Sensor driver
authorBalsam CHIHI <bchihi@baylibre.com>
Thu, 9 Feb 2023 10:56:26 +0000 (11:56 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 15 Feb 2023 16:28:42 +0000 (17:28 +0100)
commitf5f633b18234cecb0e6ee6e5fbb358807dda15c3
treee11c5ecd54b468d1035923846641bca7b215c4b2
parent498e2f7a6e69dcbca24715de2b4b97569fdfeff4
thermal/drivers/mediatek: Add the Low Voltage Thermal Sensor driver

The Low Voltage Thermal Sensor (LVTS) is a multiple sensors, multi
controllers contained in a thermal domain.

A thermal domains can be the MCU or the AP.

Each thermal domains contain up to seven controllers, each thermal
controller handle up to four thermal sensors.

The LVTS has two Finite State Machines (FSM), one to handle the
functionin temperatures range like hot or cold temperature and another
one to handle monitoring trip point. The FSM notifies via interrupts
when a trip point is crossed.

The interrupt is managed at the thermal controller level, so when an
interrupt occurs, the driver has to find out which sensor triggered
such an interrupt.

The sampling of the thermal can be filtered or immediate. For the
former, the LVTS measures several points and applies a low pass
filter.

Signed-off-by: Balsam CHIHI <bchihi@baylibre.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
On MT8195 Tomato Chromebook:

Tested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20230209105628.50294-5-bchihi@baylibre.com
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/thermal/mediatek/Kconfig
drivers/thermal/mediatek/Makefile
drivers/thermal/mediatek/lvts_thermal.c [new file with mode: 0644]