Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp6996255rwn; Tue, 13 Sep 2022 12:05:37 -0700 (PDT) X-Google-Smtp-Source: AA6agR7v64LQ82PsyBPL9l++A4A+5C9xPi661QOmc3GTnM30tBL7aGmpFxBucY01puNVq26BztmV X-Received: by 2002:a05:6402:5168:b0:44e:9ca8:bf6 with SMTP id d8-20020a056402516800b0044e9ca80bf6mr27366180ede.384.1663095936994; Tue, 13 Sep 2022 12:05:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663095936; cv=none; d=google.com; s=arc-20160816; b=o25Vv4NGGNvtHQPNv/hWo3zcPhbRjxJ3Ji4A0dB+EtMWAmIEqLGNbYu1wLK3gzDUat Eq3NqCRwDR3nWMFPK8q9z49hIX5OoBMUwRqHvn34UGhIVFDKn26zKCDUfUnqUZlJQh60 pbe6sVG8n0d61+SaF7KRQS1xIacGYucZHSOSCxVHUyhOUPgCWAHij8lS8HsnmIeWirFj zK2vRvJGYhY+h4uKlam64KmeUZSDzRU8WvHIlIgjEKRpOllkSl14ctLMBpidaJKnkjjt FjAVM24NFoY+dIq3jc/KiK6grcqzb6hVNUcBz6l6AtxtIHbPahVqMBFzIO5TshBHcRAp Zb8w== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=lxNGXt34S/FVKa0ahNtSOv0WJNlqm6C+n9uourb5rHM=; b=0xMIMo8PAbJst9r3ruWbBVM7HvQJepbh2M8hmIG4Q/QC3cwyfrFw84iIeeKZH2T/Vq z2+CI/SncSp4gDh506JzMgDbXcJoNOQ9y7Fn5vuwKp1lf0Jqx7cSVStnw8Pjkj/C/iBV jYR2BmHNHkdewkLwm9mwFNfUzvvXGZMvCMM4XivaCQt0/JFCI/rIt411cGjrCejv7D0V gwFD0UqdGRWlt2QMMbtdUZqtWdNQBaDcSh5rZVxvli+42UUrTsLfdWGmwpO/vPzhoxkW ittRI0R/ScydEDQp+dpyFhZlxXB6ai9DP19RvewBt1I8Vz4LDVvScHBD6idzRz7G200n pnYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RICEpamb; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hp40-20020a1709073e2800b00730a1069b72si9418352ejc.684.2022.09.13.12.05.09; Tue, 13 Sep 2022 12:05:36 -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=@kernel.org header.s=k20201202 header.b=RICEpamb; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232517AbiIMS6U (ORCPT + 99 others); Tue, 13 Sep 2022 14:58:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52000 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232020AbiIMS5z (ORCPT ); Tue, 13 Sep 2022 14:57:55 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2A64AEB4; Tue, 13 Sep 2022 11:51:36 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id B99E6B80EA6; Tue, 13 Sep 2022 18:51:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B4055C433D6; Tue, 13 Sep 2022 18:51:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1663095093; bh=VpyC8lUP63HV4xeVdsJSfKE7jnXv9o0yRKVx04lPK5Y=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=RICEpambJkz/GD/KM08LAU1KfanG8H+Ycjf0MNU8HEkyDZHW89q44bpcLfniSe6Bz LFvr6ZVsH20fvRmBL23Q5Nh+SzuKVzW+zdv+DM9cyX0k9HR0E0kImJ3GkM1HGk0kVh 5MnDxAl/TlZlGZN4opSxi3TrKMgHM8LBrkeF+pGUZmCeowxewMrS+eOYyWEGifFmd2 ZWBKY5RQ9aXw1JXmsepYtTSusuJ6u8urTRZ7X0W8KKNxLpyOF63S+LWnyRdhqOwb+j ONbeAoM7VFoo6TI4OhhvG39pbXsKglfPL70XxxScXqb2jMZu7CVrSe3A5CqjpXCvXT gCROjv9XpD5YQ== Date: Tue, 13 Sep 2022 13:51:30 -0500 From: Bjorn Andersson To: Bhupesh Sharma Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, bhupesh.linux@gmail.com, linux-arm-msm@vger.kernel.org, daniel.lezcano@linaro.org, rafael@kernel.org, dmitry.baryshkov@linaro.org, Amit Kucheria , Thara Gopinath Subject: Re: [PATCH v2 1/2] thermal: Introduce CONFIG_QCOM_THERMAL in Makefile and qcom/Kconfig Message-ID: <20220913185130.4eui3q2cvwjn4t7x@builder.lan> References: <20220912194028.3584378-1-bhupesh.sharma@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220912194028.3584378-1-bhupesh.sharma@linaro.org> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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, Sep 13, 2022 at 01:10:27AM +0530, Bhupesh Sharma wrote: > Introduce CONFIG_QCOM_THERMAL to allow better control > over selection of various Qualcomm Thermal drivers > available inside qcom/ directory. > > This is a preparatory change to allow new drivers to > be added inside qcom/ directory in a more structured > fashion later-on. > > Cc: Bjorn Andersson > Cc: Daniel Lezcano > Cc: Amit Kucheria > Cc: Thara Gopinath > Signed-off-by: Bhupesh Sharma > --- > - v1 can be viewed here: https://www.spinics.net/lists/kernel/msg4510793.html > - Fixed review comments from Dmitry received in v1. > > drivers/thermal/Makefile | 2 +- > drivers/thermal/qcom/Kconfig | 12 ++++++++++++ > 2 files changed, 13 insertions(+), 1 deletion(-) > > diff --git a/drivers/thermal/Makefile b/drivers/thermal/Makefile > index def8e1a0399c..2506c6c8ca83 100644 > --- a/drivers/thermal/Makefile > +++ b/drivers/thermal/Makefile > @@ -52,7 +52,7 @@ obj-$(CONFIG_DA9062_THERMAL) += da9062-thermal.o > obj-y += intel/ > obj-$(CONFIG_TI_SOC_THERMAL) += ti-soc-thermal/ > obj-y += st/ > -obj-$(CONFIG_QCOM_TSENS) += qcom/ > +obj-y += qcom/ This change makes sense to me. Please send this as a separate patch. > obj-y += tegra/ > obj-$(CONFIG_HISI_THERMAL) += hisi_thermal.o > obj-$(CONFIG_MTK_THERMAL) += mtk_thermal.o > diff --git a/drivers/thermal/qcom/Kconfig b/drivers/thermal/qcom/Kconfig > index 2c7f3f9a26eb..ccfd090273c1 100644 > --- a/drivers/thermal/qcom/Kconfig > +++ b/drivers/thermal/qcom/Kconfig > @@ -1,8 +1,17 @@ > # SPDX-License-Identifier: GPL-2.0-only > + > +config QCOM_THERMAL As written here this would allow you to make things conditional on any Qualcomm thermal code being enabled in any form. But I'm afraid I don't understand the purpose of this. Alternatively if you had made below additions depends on QCOM_THERMAL this would have "cleaned up" the menuconfig slightly. But IMHO there isn't a lot of benefit to this (and we'd end up with people running without thermal drivers, as they forget to set CONFIG_QCOM_THERMAL). > + tristate "Thermal drivers on Qualcomm Snapdragon series of SoCs" > + help > + Support for thermal drivers on Qualcomm Snapdragon series of SoCs. > + There are several thermal sensors available on the Qualcomm Socs > + which can be used for thermal mitigation purposes. This help text indicates that the option actually changes something or enables some support for something, but afaict it doesn't. Regards, Bjorn > + > config QCOM_TSENS > tristate "Qualcomm TSENS Temperature Alarm" > depends on NVMEM_QCOM_QFPROM > depends on ARCH_QCOM || COMPILE_TEST > + select QCOM_THERMAL > help > This enables the thermal sysfs driver for the TSENS device. It shows > up in Sysfs as a thermal zone with multiple trip points. Disabling the > @@ -15,6 +24,7 @@ config QCOM_SPMI_ADC_TM5 > depends on OF && SPMI && IIO > select REGMAP_SPMI > select QCOM_VADC_COMMON > + select QCOM_THERMAL > help > This enables the thermal driver for the ADC thermal monitoring > device. It shows up as a thermal zone with multiple trip points. > @@ -25,6 +35,7 @@ config QCOM_SPMI_TEMP_ALARM > tristate "Qualcomm SPMI PMIC Temperature Alarm" > depends on OF && SPMI && IIO > select REGMAP_SPMI > + select QCOM_THERMAL > help > This enables a thermal sysfs driver for Qualcomm plug-and-play (QPNP) > PMIC devices. It shows up in sysfs as a thermal sensor with multiple > @@ -35,6 +46,7 @@ config QCOM_SPMI_TEMP_ALARM > config QCOM_LMH > tristate "Qualcomm Limits Management Hardware" > depends on ARCH_QCOM && QCOM_SCM > + select QCOM_THERMAL > help > This enables initialization of Qualcomm limits management > hardware(LMh). LMh allows for hardware-enforced mitigation for cpus based on > -- > 2.37.1 >