Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp1045803iob; Fri, 13 May 2022 20:56:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxr/QqU2ktaaQqi/78RodLV0wdHRpfZZxxceOdEpR6UQKGz3LVaNKbEPEcOVG2M2QxSyvLy X-Received: by 2002:a05:6000:1b88:b0:20c:efe4:19f2 with SMTP id r8-20020a0560001b8800b0020cefe419f2mr5043736wru.434.1652500595867; Fri, 13 May 2022 20:56:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652500595; cv=none; d=google.com; s=arc-20160816; b=zniynQPPnCj4vWbeqJU52R4RO5Y8ZCOIMkL+qSCUNppW53iBO45Ohwky+d6iSiyPMo dbNBsFqoHEzaCs6tMcHrs/atA3uLFgjJMBeFz5RKDg2/ZaoPog+e5UhtYfNP3cWXrxyg h+yJwO73mM0cSVukc9+0NSCrdHcW6CxN5EZz9JxAbV5c7ZjzIVN5TCzANa754VQSl/rD L0/8PehaKRw7QKGcagewsjfzbfwPyfIfcGTNSWFBboZKlmu4v8CT+ve9XWwxDC/+xDJ1 2GT06PuDdWB6I3gjT5D7vXTQ0qvo25Qm/B1wld0TYaY1tSFNBnGZDLtrHifkQqckFMqc 41BQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=HfH019+cT0njZgEoB5v4us8H/Co27KMCU86/mPoLRqg=; b=oOy2FZvV4O2dbhKY3H0kj29pyiBpgnv6+AaB7AvPKgya05q67qQ1W7QrgWsfP8KmB/ D9J89r1BzGMdGRNOewvIXUdgyY89ClGPO01DtzplouEVUTvvmkn0mV9Fuzm2T4r0uOh8 DAolHPWTGX9CcZ83BWgJ9Vbzs+5zjJ6hbURVEKEGQrr7sd/cXV3zyz7QuQvR9wpkreDI CKHrFSIoma9NYU620+LzvKB4laI53M9TouSyAUhYRkseYeb65avVidRp7OvUTMbu/ZZz ABny/cNUrXZKAATgXtPPOl8wlEDYWLjT5bUQ3zcscLCmFwilBGIkfl72+yrPvuCjLeU/ oWGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=A7TMJCxm; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id f9-20020a05600c4e8900b0038c77be9b68si9094081wmq.131.2022.05.13.20.56.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 May 2022 20:56:35 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=A7TMJCxm; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 79E1C492F52; Fri, 13 May 2022 17:28:45 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353658AbiELMYu (ORCPT + 99 others); Thu, 12 May 2022 08:24:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37792 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233309AbiELMYn (ORCPT ); Thu, 12 May 2022 08:24:43 -0400 Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CE97124734C for ; Thu, 12 May 2022 05:24:39 -0700 (PDT) Received: by mail-wr1-x433.google.com with SMTP id d5so7024337wrb.6 for ; Thu, 12 May 2022 05:24:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=HfH019+cT0njZgEoB5v4us8H/Co27KMCU86/mPoLRqg=; b=A7TMJCxmk4lkEBYyfuuMZ5/cY5FebO7K8BkFV3Er9WuM1U2jurjR0UE9SnNbacNFlA vXe6CyqK5xafOBbYPM6wWQ3ch4xeaMAQR+4MZ1AB0vkYdOdTq+RngYD+JqfrsP/nzHJl ZVsDSKx0VaAKb696NNVvGQU/J9LIZizmnigESNEON8zuHSJGbf9BxxYIKoNu9a0MX3wn 9flx1OgMgaooNRHbhFXWKg7LX3HfHQRkPAs4sZ6xETG5kI0LAxbFNSDv3ykm5nTfDBGL fZmsHZIdLC/LJCq4aEQ6BMtiHSnhVgB9w9aLAqAI93C+8Uh87Q+bkkek+PBqrGjYh7Uj QioA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=HfH019+cT0njZgEoB5v4us8H/Co27KMCU86/mPoLRqg=; b=urPCSiJ3HUGa0tN7wC8IbV/ms6u0EGSCsYf3lHtJeRjWtfFgxOFo5e0f2AY9FoxEDE 1xzS2zTbcOYqMxPbI6447uapeEntKA588KvF45QtpF5WyjmP3wH0XPpSYxV07umqCzgL u9fb85UOldUXRkYHw3BxmjUH1elnvU0wL7VTVEQ5wwzGRHGw3K15Qdc2weUrmTMo9g9k fP609b5+Jw1voUYH5fO4YpM0ufqjY91ndJQRjvzT539+prXwQ6oaIhqlj0rQoqfZy/r7 m6nzL4loTr8b1HxbFCM3bTQR5INOfpFs5jnbHkS50d4C/TXUiCPD/sK2jkFm9xv4TN+M Ltpw== X-Gm-Message-State: AOAM5302PfXti9utmXfcUOGqTkvegclAMABYH7iGVAl9lLtBTy9GVwCY vN/4QRyXd0HQQBXNDADXSZxNyg== X-Received: by 2002:a5d:6183:0:b0:20a:db51:f21a with SMTP id j3-20020a5d6183000000b0020adb51f21amr27404955wru.127.1652358278336; Thu, 12 May 2022 05:24:38 -0700 (PDT) Received: from xps-9300.baylibre (laubervilliers-658-1-213-31.w90-63.abo.wanadoo.fr. [90.63.244.31]) by smtp.gmail.com with ESMTPSA id z22-20020a7bc156000000b003942a244f30sm3047819wmi.9.2022.05.12.05.24.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 May 2022 05:24:38 -0700 (PDT) From: Alexandre Bailon To: robh+dt@kernel.org, krzk+dt@kernel.org, matthias.bgg@gmail.com, p.zabel@pengutronix.de Cc: rafael@kernel.org, daniel.lezcano@linaro.org, amitk@kernel.org, rui.zhang@intel.com, michael.kao@mediatek.com, ben.tseng@mediatek.com, ethan.chang@mediatek.com, frank-w@public-files.de, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, khilman@baylibre.com, Michael Kao Subject: [PATCH v6 1/7] thermal: mediatek: Relocate driver to mediatek folder Date: Thu, 12 May 2022 14:24:27 +0200 Message-Id: <20220512122433.1399802-2-abailon@baylibre.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220512122433.1399802-1-abailon@baylibre.com> References: <20220512122433.1399802-1-abailon@baylibre.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Michael Kao 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 Signed-off-by: Ben Tseng Reviewed-by: Matthias Brugger --- 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 e37691e0bf20..8669d7278055 100644 --- a/drivers/thermal/Kconfig +++ b/drivers/thermal/Kconfig @@ -410,16 +410,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 f0c36a1530d5..9ade39bdb525 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_UNIPHIER_THERMAL) += uniphier_thermal.o obj-$(CONFIG_AMLOGIC_THERMAL) += amlogic_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.35.1