Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp2179031pxu; Sun, 6 Dec 2020 22:35:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJy53pQGl8u7y7FZKySjW48C7IKRO4k2HG3DvHNM1SgLDhYRgRO98BtXxJ6S/FzQKpymCYl9 X-Received: by 2002:a05:6402:2041:: with SMTP id bc1mr4087103edb.369.1607322930602; Sun, 06 Dec 2020 22:35:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607322930; cv=none; d=google.com; s=arc-20160816; b=tCJsW9tfI5ZYVLIOyp2IuDiAaAwF4KSFMEOirOfXkFfX+gbxq9nM7eDSk8x6ZYzq5n G9qYsoiON3K1oHRx7rcZBmEyQzw+usR0t3/JvQSuLUb1xmCSOVG3ec4hJm6lWjGOw2uD vfxm17OG2JlAFLYC+M4Khh8fpVURTL6KIfd0FFD7XzLuS4DqJsCJa4fj3/XcwEE4JUwh kUQkH0f83EcL8zRjS13JV5RjmBv7vM3EYOrdfsau2az+Sigtg9oVPtj7Ak95JUIHS3Dz UFK2xq8b59eP6Npj+it8sxpttFwQgxkmeePIsVh9HdTnN+JHAftgHgPGGRGxL0CHXzkW BO5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=ZxBZoc8CidASg3o73MakaqyMTenCK5nd24r9BgD9xNo=; b=R/8HrkEuYmO66fNksWZv9j52H8m6uRkIgI+6xRNOI2P5WdttLephPsKjL/tI4cKVa1 2i+nRHVKu3XmZGoTbJVWcl+3y8vdsJsRitI+wiwXtOAPwxs1dgUcqpkMp9idoqQ4VZqf y4n0MA50pwLttSbn4dpqz8TON7pPLBI2+bD7koULAOm4ud0geMZ0xDvuBFVUc1NRZDqc LCzkNLf6Zt2JqOuTB/DkMeR1VIu/otWKw/gv7JthSpw6bMtTghYoYKGOXsfSDiBv2CsU lSeq7kZEWIwfL8k8qHZGCaD1ruBrPP6Wa9UuH9SMOisBr+Vxjj5zOUHePhHdnwPUqtEM uV2w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s3si1573542edi.157.2020.12.06.22.35.07; Sun, 06 Dec 2020 22:35:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726000AbgLGGcR (ORCPT + 99 others); Mon, 7 Dec 2020 01:32:17 -0500 Received: from mailgw01.mediatek.com ([210.61.82.183]:37285 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725863AbgLGGcQ (ORCPT ); Mon, 7 Dec 2020 01:32:16 -0500 X-UUID: 6886b48617044387b811829d15f40b27-20201207 X-UUID: 6886b48617044387b811829d15f40b27-20201207 Received: from mtkcas11.mediatek.inc [(172.21.101.40)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.14 Build 0819 with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 281687853; Mon, 07 Dec 2020 14:31:29 +0800 Received: from mtkcas11.mediatek.inc (172.21.101.40) by mtkmbs07n1.mediatek.inc (172.21.101.16) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 7 Dec 2020 14:31:26 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas11.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Mon, 7 Dec 2020 14:31:26 +0800 From: Michael Kao To: , , Zhang Rui , Daniel Lezcano , , CC: Eduardo Valentin , Rob Herring , Mark Rutland , Matthias Brugger , , , , , Subject: [PATCH 1/3] thermal: mediatek: Relocate driver to mediatek folder Date: Mon, 7 Dec 2020 14:31:25 +0800 Message-ID: <20201207063127.28051-2-michael.kao@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20201207063127.28051-1-michael.kao@mediatek.com> References: <20201207063127.28051-1-michael.kao@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add Mediatek proprietary folder to upstream more thermal zone and cooler drivers. Relocate the original thermal controller driver to it and rename as soc_temp.c to show its purpose more clearly. Signed-off-by: Michael Kao --- drivers/thermal/Kconfig | 14 ++++------- drivers/thermal/Makefile | 2 +- drivers/thermal/mediatek/Kconfig | 23 +++++++++++++++++++ drivers/thermal/mediatek/Makefile | 1 + .../{mtk_thermal.c => mediatek/soc_temp.c} | 0 5 files changed, 29 insertions(+), 11 deletions(-) create mode 100644 drivers/thermal/mediatek/Kconfig create mode 100644 drivers/thermal/mediatek/Makefile rename drivers/thermal/{mtk_thermal.c => mediatek/soc_temp.c} (100%) diff --git a/drivers/thermal/Kconfig b/drivers/thermal/Kconfig index 7edc8dc6bbab..b2da0a1bda34 100644 --- a/drivers/thermal/Kconfig +++ b/drivers/thermal/Kconfig @@ -401,16 +401,10 @@ config DA9062_THERMAL zone. Compatible with the DA9062 and DA9061 PMICs. -config MTK_THERMAL - tristate "Temperature sensor driver for mediatek SoCs" - depends on ARCH_MEDIATEK || COMPILE_TEST - depends on HAS_IOMEM - depends on NVMEM || NVMEM=n - depends on RESET_CONTROLLER - default y - help - Enable this option if you want to have support for thermal management - controller present in Mediatek SoCs +menu "Mediatek thermal drivers" +depends on ARCH_MEDIATEK || COMPILE_TEST +source "drivers/thermal/mediatek/Kconfig" +endmenu config AMLOGIC_THERMAL tristate "Amlogic Thermal Support" diff --git a/drivers/thermal/Makefile b/drivers/thermal/Makefile index b64dd50a6629..f9e07c3f529e 100644 --- a/drivers/thermal/Makefile +++ b/drivers/thermal/Makefile @@ -55,7 +55,7 @@ obj-y += st/ obj-$(CONFIG_QCOM_TSENS) += qcom/ obj-y += tegra/ obj-$(CONFIG_HISI_THERMAL) += hisi_thermal.o -obj-$(CONFIG_MTK_THERMAL) += mtk_thermal.o +obj-$(CONFIG_MTK_THERMAL) += mediatek/ obj-$(CONFIG_GENERIC_ADC_THERMAL) += thermal-generic-adc.o obj-$(CONFIG_ZX2967_THERMAL) += zx2967_thermal.o obj-$(CONFIG_UNIPHIER_THERMAL) += uniphier_thermal.o diff --git a/drivers/thermal/mediatek/Kconfig b/drivers/thermal/mediatek/Kconfig new file mode 100644 index 000000000000..0351e73170b7 --- /dev/null +++ b/drivers/thermal/mediatek/Kconfig @@ -0,0 +1,23 @@ +config MTK_THERMAL + tristate "Mediatek thermal drivers" + depends on THERMAL_OF + help + This is the option for Mediatek thermal software + solutions. Please enable corresponding options to + get temperature information from thermal sensors or + turn on throttle mechaisms for thermal mitigation. + +if MTK_THERMAL + +config MTK_SOC_THERMAL + tristate "Temperature sensor driver for mediatek SoCs" + depends on HAS_IOMEM + depends on NVMEM + depends on RESET_CONTROLLER + help + Enable this option if you want to get SoC temperature + information for Mediatek platforms. This driver + configures thermal controllers to collect temperature + via AUXADC interface. + +endif diff --git a/drivers/thermal/mediatek/Makefile b/drivers/thermal/mediatek/Makefile new file mode 100644 index 000000000000..f75313ddce5e --- /dev/null +++ b/drivers/thermal/mediatek/Makefile @@ -0,0 +1 @@ +obj-$(CONFIG_MTK_SOC_THERMAL) += soc_temp.o diff --git a/drivers/thermal/mtk_thermal.c b/drivers/thermal/mediatek/soc_temp.c similarity index 100% rename from drivers/thermal/mtk_thermal.c rename to drivers/thermal/mediatek/soc_temp.c -- 2.18.0