Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp500411imn; Fri, 29 Jul 2022 13:43:17 -0700 (PDT) X-Google-Smtp-Source: AA6agR4jjM/lVIeZRbfBitsSHAgFEiHcp8gtlJ2a+zJFoWyyti8Ie42dsFbCeXPBS2abYFFZEbfR X-Received: by 2002:a17:902:6b0b:b0:16c:e69c:bb11 with SMTP id o11-20020a1709026b0b00b0016ce69cbb11mr5463379plk.147.1659127397415; Fri, 29 Jul 2022 13:43:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659127397; cv=none; d=google.com; s=arc-20160816; b=fv7fP/ylgXDcXyix7U7O2BhF5DZgugNFOnrz5M8rBgiTIxb2Cy62/LfpsqhtgT/gWG sUIp8npJXUQ3UxE/DKiorMufmxr+PZjXBX9YPU3tp4p94PgVTM09D1oL6Xq+6qSG1UtE oHb1fFVApEDNhc5+SQ/vInRZdWffeNcEmTiXJjERN80A6vqGkuBo0lhyrs2TLAUuZMkJ d0JZ+sprLX6VlWaTDqnq/bp8pucS2n6eBbJtccNr4uc3YjToGTr/EJ+3q6FTCKOp2bWU MHgxMBKtgaH7gLAGBlxtYQ5S59abg8ZuLjmbLRH2XUryDZz73V375/BMJWC5NpA9yMZt xF6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=hi5EbWXrbS55YvJFZB7fwB+MFFbIXBu7ugj3CU7onwM=; b=SsiVTUW0fsO1unaO3wLVMuxX2wGIaMqxjbsQoOdEkPe8NUsO0NOSZ/biPVl8Jh3Y61 ezwddL+MH+ul/ZTKM43Zbr0qqlYxxIYdNs0lsOnAYDm1wXjYPxi4s+jHTCg+f7BCBJBP eF4U6+lgQI3bG7bWISfujlUf8nCx9MReiEIDcKPRrohbmswgtFFJezUICj+jEtW1ArvN 9xd24qj8Oib3al5fuseK7sKUdTrBU8YP2OCpRYE86BpON7JYU1B8B8egVe5H1GSaXXd0 Q2gAMZHA9ISjw/I2i5M1gy84onnuVlXDw6fQoSJH2rGkfmx/s68PaPo8gc8vtdEaR8am sclA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=P5qxbh8l; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f8-20020a655908000000b004157aa8707csi5429427pgu.110.2022.07.29.13.43.02; Fri, 29 Jul 2022 13:43:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=P5qxbh8l; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238873AbiG2Uap (ORCPT + 99 others); Fri, 29 Jul 2022 16:30:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34708 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230089AbiG2Uai (ORCPT ); Fri, 29 Jul 2022 16:30:38 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2033618E12; Fri, 29 Jul 2022 13:30:38 -0700 (PDT) Received: from notapiano (pool-98-113-53-228.nycmny.fios.verizon.net [98.113.53.228]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: nfraprado) by madras.collabora.co.uk (Postfix) with ESMTPSA id 003A16601B8B; Fri, 29 Jul 2022 21:30:33 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1659126636; bh=k1k8s7Za97TaDukHb1io/Pph036btg+/OCzVr3A+DLc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=P5qxbh8llQDpysSkuzEFTSd//A+YhN8kKGDj8/zg7fh6Nixht1vZ3Wj4Yai8aPCAW vXdULCcrjsoFSDnuqvXNrRGEYcvl6r8A7WifuB7//iLYZDBVT4xmc3QlUCRu8v6Prb xtaMl8oo5e+9BL5FtEucFu5VfWT1dcXvnIf2OKHSVen4rKrYJMRZ8NVANfJyM2kHwA XO0fOpyA2NYcYWmBhx3w7PEMki61C2LQE034mNgpJid2SjZwP44aUljIb/lLaeHB9Z SUZigHRbser2iQUSFR7gn6KeUVuK9FqVLNM2Nf39R+za5Nwu+AzM3coMs1CFe4q8in SSqWJYX0B4x1w== Date: Fri, 29 Jul 2022 16:30:30 -0400 From: =?utf-8?B?TsOtY29sYXMgRi4gUi4gQS4=?= Prado To: Balsam CHIHI Cc: rafael@kernel.org, rui.zhang@intel.com, daniel.lezcano@linaro.org, amitk@kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, khilman@baylibre.com, mka@chromium.org, robh+dt@kernel.org, krzk+dt@kernel.org, matthias.bgg@gmail.com, p.zabel@pengutronix.de, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, james.lo@mediatek.com, fan.chen@mediatek.com, louis.yu@mediatek.com, rex-bc.chen@mediatek.com, abailon@baylibre.com Subject: Re: [PATCH v8 3/6] thermal: mediatek: Add LVTS drivers for SoC theraml zones for mt8192 Message-ID: <20220729203030.p645ccnpa4bd6sdn@notapiano> References: <20220726135506.485108-1-bchihi@baylibre.com> <20220726135506.485108-4-bchihi@baylibre.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220726135506.485108-4-bchihi@baylibre.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 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 > Signed-off-by: Michael Kao > Signed-off-by: Ben Tseng > Signed-off-by: Alexandre Bailon > Signed-off-by: Balsam CHIHI > --- > 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 [..]