Skip to content

Commit fad399e

Browse files
bchihiBLrafaeljw
authored andcommitted
thermal/drivers/mediatek: Relocate driver to mediatek folder
Add MediaTek proprietary folder to upstream more thermal zone and cooler drivers, relocate the original thermal controller driver to it, and rename it as "auxadc_thermal.c" to show its purpose more clearly. Signed-off-by: Balsam CHIHI <[email protected]> Reviewed-by: AngeloGioacchino Del Regno <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Daniel Lezcano <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent a29cbd7 commit fad399e

File tree

5 files changed

+28
-12
lines changed

5 files changed

+28
-12
lines changed

drivers/thermal/Kconfig

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -416,16 +416,10 @@ config DA9062_THERMAL
416416
zone.
417417
Compatible with the DA9062 and DA9061 PMICs.
418418

419-
config MTK_THERMAL
420-
tristate "Temperature sensor driver for mediatek SoCs"
421-
depends on ARCH_MEDIATEK || COMPILE_TEST
422-
depends on HAS_IOMEM
423-
depends on NVMEM || NVMEM=n
424-
depends on RESET_CONTROLLER
425-
default y
426-
help
427-
Enable this option if you want to have support for thermal management
428-
controller present in Mediatek SoCs
419+
menu "Mediatek thermal drivers"
420+
depends on ARCH_MEDIATEK || COMPILE_TEST
421+
source "drivers/thermal/mediatek/Kconfig"
422+
endmenu
429423

430424
config AMLOGIC_THERMAL
431425
tristate "Amlogic Thermal Support"

drivers/thermal/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ obj-y += st/
5656
obj-y += qcom/
5757
obj-y += tegra/
5858
obj-$(CONFIG_HISI_THERMAL) += hisi_thermal.o
59-
obj-$(CONFIG_MTK_THERMAL) += mtk_thermal.o
59+
obj-y += mediatek/
6060
obj-$(CONFIG_GENERIC_ADC_THERMAL) += thermal-generic-adc.o
6161
obj-$(CONFIG_UNIPHIER_THERMAL) += uniphier_thermal.o
6262
obj-$(CONFIG_AMLOGIC_THERMAL) += amlogic_thermal.o

drivers/thermal/mediatek/Kconfig

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
config MTK_THERMAL
2+
tristate "MediaTek thermal drivers"
3+
depends on THERMAL_OF
4+
help
5+
This is the option for MediaTek thermal software solutions.
6+
Please enable corresponding options to get temperature
7+
information from thermal sensors or turn on throttle
8+
mechaisms for thermal mitigation.
9+
10+
if MTK_THERMAL
11+
12+
config MTK_SOC_THERMAL
13+
tristate "AUXADC temperature sensor driver for MediaTek SoCs"
14+
depends on HAS_IOMEM
15+
help
16+
Enable this option if you want to get SoC temperature
17+
information for MediaTek platforms.
18+
This driver configures thermal controllers to collect
19+
temperature via AUXADC interface.
20+
21+
endif

drivers/thermal/mediatek/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
obj-$(CONFIG_MTK_SOC_THERMAL) += auxadc_thermal.o

drivers/thermal/mtk_thermal.c renamed to drivers/thermal/mediatek/auxadc_thermal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#include <linux/reset.h>
2424
#include <linux/types.h>
2525

26-
#include "thermal_hwmon.h"
26+
#include "../thermal_hwmon.h"
2727

2828
/* AUXADC Registers */
2929
#define AUXADC_CON1_SET_V 0x008

0 commit comments

Comments
 (0)