lkml.org 
[lkml]   [2022]   [Jul]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v8 3/6] thermal: mediatek: Add LVTS drivers for SoC theraml zones for mt8192
On Tue, Jul 26, 2022 at 03:55:03PM +0200, Balsam CHIHI wrote:
> Add a LVTS (Low voltage thermal sensor) driver to report junction
> temperatures in Mediatek SoC mt8192 and register the maximum temperature
> of sensors and each sensor as a thermal zone.
>
> Signed-off-by: Yu-Chia Chang <ethan.chang@mediatek.com>
> Signed-off-by: Michael Kao <michael.kao@mediatek.com>
> Signed-off-by: Ben Tseng <ben.tseng@mediatek.com>
> Signed-off-by: Alexandre Bailon <abailon@baylibre.com>
> Signed-off-by: Balsam CHIHI <bchihi@baylibre.com>
> ---
> drivers/thermal/mediatek/Kconfig | 27 +
> drivers/thermal/mediatek/Makefile | 2 +
> drivers/thermal/mediatek/lvts_mt8192.c | 241 ++++++
> drivers/thermal/mediatek/soc_temp.c | 2 +-
> drivers/thermal/mediatek/soc_temp_lvts.c | 928 +++++++++++++++++++++++
> drivers/thermal/mediatek/soc_temp_lvts.h | 365 +++++++++
> 6 files changed, 1564 insertions(+), 1 deletion(-)
> create mode 100644 drivers/thermal/mediatek/lvts_mt8192.c
> create mode 100644 drivers/thermal/mediatek/soc_temp_lvts.c
> create mode 100644 drivers/thermal/mediatek/soc_temp_lvts.h
>
> diff --git a/drivers/thermal/mediatek/Kconfig b/drivers/thermal/mediatek/Kconfig
> index 9c41e9079fc3..7fc04237dd50 100644
> --- a/drivers/thermal/mediatek/Kconfig
> +++ b/drivers/thermal/mediatek/Kconfig
> @@ -20,4 +20,31 @@ config MTK_SOC_THERMAL
> configures thermal controllers to collect temperature
> via AUXADC interface.
>
> +config MTK_SOC_THERMAL_LVTS
> + tristate "LVTS (Low voltage thermal sensor) driver for Mediatek SoCs"
> + depends on HAS_IOMEM
> + depends on NVMEM
> + depends on RESET_TI_SYSCON

Both mt8192 and mt8195 use the reset controller provided by infracfg [1], so
there's no need to depend on RESET_TI_SYSCON. (Same thing below)

[1] https://lore.kernel.org/all/20220523093346.28493-1-rex-bc.chen@mediatek.com/

Thanks,
Nícolas

> + help
> + Enable this option if you want to get SoC temperature
> + information for MediaTek platforms. This driver
> + configures LVTS thermal controllers to collect temperatures
> + via Analog Serial Interface(ASIF).
> +
> +endif
> +
> +if MTK_SOC_THERMAL_LVTS
> +
> +config LVTS_MT8192
> + tristate "LVTS driver for MediaTek MT8192 SoC"
> + depends on HAS_IOMEM
> + depends on NVMEM
> + depends on RESET_TI_SYSCON
> + depends on MTK_SOC_THERMAL_LVTS
> + help
> + Enable this option if you want to get SoC temperature
> + information for MT8192. This driver
> + configures LVTS thermal controllers to collect temperatures
> + via ASIF.
> +
> endif
[..]

\
 
 \ /
  Last update: 2022-07-29 22:32    [W:0.156 / U:0.232 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site