Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp950712pxf; Thu, 11 Mar 2021 20:44:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJyJaCovNetTRU3R3s2G0SOCy/ab6SVSMuhtvvhrSwQIWBEdQczy1AIMgOqlrb+7OwD9iJoV X-Received: by 2002:a05:6402:104c:: with SMTP id e12mr11642388edu.108.1615524290426; Thu, 11 Mar 2021 20:44:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615524290; cv=none; d=google.com; s=arc-20160816; b=FDK58t400B3AeQJxg/6WNBrM5uQqZdD+gDvqqvIpOMKPIOrkwrTvMfl9Nib3lm/6mb CQdwDN09E+z9J6WOCbVf3+y9od6OYjNORvgBB5DgkVYMONedICDtk8LWiHbe4XW7WAj4 pPdxScz+y/R2RzojobOMJhMLrEB+UvpUH08RmpOQ2cribgi9erAVawsjhG9J7V9EWJLH WrMqNbWr4Se5gPhzBYzEKofDlNoWiO+GFg6aZDiTxe/uNbFlJllOA+Mp1lU3qiWaGuNG JpeW5Vmf5vJgxcPyuxgA71l7XrjMCQzn3rN9WM9II9kiPPlzCHn4d62/o4AuzfSxqYLB /8Nw== 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=I6SZG+Ni/P/nNalsce9TAr1gM/DCbg8tDFYFTqaz8O98P9nF4vJl1pMXRdUBvsowQz 9A45S0S74srZWol14uo+rY2LMklRJG4sr9j3mzt0x8owKqBeN6nmXmZsbOkmFovYTZG0 Mbaa7umGZ3vxMg5MwQSkqlhyHIgTYuhDZK0Wr5DzvIX1gDV6x5dlco6e5kQEWJmdDKbT E/UjrJ4xCJKgt/hb04teLrJKfOySphBEhbnzuIThtqCIBC9YJLx7vt2zKSKBwd++rqWY cnF4IjqQU5ffT7BjzBH8h3dLnn9zDmmX1a8H/KIDpiFw5AN36Zp+XiGNef3pbXB0JSYV Lveg== 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 q23si2434268ejy.641.2021.03.11.20.44.27; Thu, 11 Mar 2021 20:44:50 -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 S231862AbhCLDlC (ORCPT + 99 others); Thu, 11 Mar 2021 22:41:02 -0500 Received: from mailgw01.mediatek.com ([210.61.82.183]:46629 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S231817AbhCLDk0 (ORCPT ); Thu, 11 Mar 2021 22:40:26 -0500 X-UUID: ed0fc046fec64e9b971f48c3defbe9d1-20210312 X-UUID: ed0fc046fec64e9b971f48c3defbe9d1-20210312 Received: from mtkexhb02.mediatek.inc [(172.21.101.103)] 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 1981339506; Fri, 12 Mar 2021 11:40:19 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs07n2.mediatek.inc (172.21.101.141) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 12 Mar 2021 11:40:18 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Fri, 12 Mar 2021 11:40:18 +0800 From: Michael Kao To: , Zhang Rui , Daniel Lezcano , , CC: Eduardo Valentin , Rob Herring , Mark Rutland , Matthias Brugger , , , , , Subject: [v3,1/3] thermal: mediatek: Relocate driver to mediatek folder Date: Fri, 12 Mar 2021 11:40:16 +0800 Message-ID: <20210312034018.17437-2-michael.kao@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20210312034018.17437-1-michael.kao@mediatek.com> References: <20210312034018.17437-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