All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] thermal: Introduce CONFIG_QCOM_THERMAL in Makefile and qcom/Kconfig
@ 2022-09-11 18:42 Bhupesh Sharma
  2022-09-11 18:42 ` [PATCH 2/2] MAINTAINERS: Update Qualcomm Thermal Driver entry Bhupesh Sharma
  2022-09-11 19:38 ` [PATCH 1/2] thermal: Introduce CONFIG_QCOM_THERMAL in Makefile and qcom/Kconfig Dmitry Baryshkov
  0 siblings, 2 replies; 6+ messages in thread
From: Bhupesh Sharma @ 2022-09-11 18:42 UTC (permalink / raw)
  To: linux-pm, linux-kernel
  Cc: bhupesh.sharma, bhupesh.linux, andersson, linux-arm-msm,
	daniel.lezcano, rafael, Amit Kucheria, Thara Gopinath

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.

Cc: Bjorn Andersson <andersson@kernel.org>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Amit Kucheria <amitk@kernel.org>
Cc: Thara Gopinath <thara.gopinath@gmail.com>
Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
---
 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..a12b647be0d1 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-$(CONFIG_QCOM_THERMAL)	+= qcom/
 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
+	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.
+
 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


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/2] MAINTAINERS: Update Qualcomm Thermal Driver entry
  2022-09-11 18:42 [PATCH 1/2] thermal: Introduce CONFIG_QCOM_THERMAL in Makefile and qcom/Kconfig Bhupesh Sharma
@ 2022-09-11 18:42 ` Bhupesh Sharma
  2022-09-11 19:38 ` [PATCH 1/2] thermal: Introduce CONFIG_QCOM_THERMAL in Makefile and qcom/Kconfig Dmitry Baryshkov
  1 sibling, 0 replies; 6+ messages in thread
From: Bhupesh Sharma @ 2022-09-11 18:42 UTC (permalink / raw)
  To: linux-pm, linux-kernel
  Cc: bhupesh.sharma, bhupesh.linux, andersson, linux-arm-msm,
	daniel.lezcano, rafael, Amit Kucheria, Thara Gopinath

Since there are several Qualcomm Thermal drivers now available
(for e.g. LMH, SPMI PMICs and TSENS) inside 'drivers/thermal/qcom'
directory, so it makes sense to list all the supported dt-bindings
YAML files here.

Also, the entry header is updated to better reflect the same.

Cc: Bjorn Andersson <andersson@kernel.org>
Cc: Amit Kucheria <amitk@kernel.org>
Cc: Thara Gopinath <thara.gopinath@gmail.com>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
---
 MAINTAINERS | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index 9475aa701a3f..4dbf82d3b775 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -17057,12 +17057,16 @@ F:	Documentation/networking/device_drivers/cellular/qualcomm/rmnet.rst
 F:	drivers/net/ethernet/qualcomm/rmnet/
 F:	include/linux/if_rmnet.h
 
-QUALCOMM TSENS THERMAL DRIVER
+QUALCOMM THERMAL DRIVERS (TSENS, LMH and SPMI PMIC)
 M:	Amit Kucheria <amitk@kernel.org>
 M:	Thara Gopinath <thara.gopinath@gmail.com>
 L:	linux-pm@vger.kernel.org
 L:	linux-arm-msm@vger.kernel.org
 S:	Maintained
+F:	Documentation/devicetree/bindings/thermal/qcom,spmi-temp-alarm.yaml
+F:	Documentation/devicetree/bindings/thermal/qcom-lmh.yaml
+F:	Documentation/devicetree/bindings/thermal/qcom-spmi-adc-tm-hc.yaml
+F:	Documentation/devicetree/bindings/thermal/qcom-spmi-adc-tm5.yaml
 F:	Documentation/devicetree/bindings/thermal/qcom-tsens.yaml
 F:	drivers/thermal/qcom/
 
-- 
2.37.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] thermal: Introduce CONFIG_QCOM_THERMAL in Makefile and qcom/Kconfig
  2022-09-11 18:42 [PATCH 1/2] thermal: Introduce CONFIG_QCOM_THERMAL in Makefile and qcom/Kconfig Bhupesh Sharma
  2022-09-11 18:42 ` [PATCH 2/2] MAINTAINERS: Update Qualcomm Thermal Driver entry Bhupesh Sharma
@ 2022-09-11 19:38 ` Dmitry Baryshkov
  2022-09-12 17:11   ` Bhupesh Sharma
  1 sibling, 1 reply; 6+ messages in thread
From: Dmitry Baryshkov @ 2022-09-11 19:38 UTC (permalink / raw)
  To: Bhupesh Sharma
  Cc: linux-pm, linux-kernel, bhupesh.linux, andersson, linux-arm-msm,
	daniel.lezcano, rafael, Amit Kucheria, Thara Gopinath

On Sun, 11 Sept 2022 at 21:42, Bhupesh Sharma <bhupesh.sharma@linaro.org> 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.
>
> Cc: Bjorn Andersson <andersson@kernel.org>
> Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
> Cc: Amit Kucheria <amitk@kernel.org>
> Cc: Thara Gopinath <thara.gopinath@gmail.com>
> Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
> ---
>  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..a12b647be0d1 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-$(CONFIG_QCOM_THERMAL)     += qcom/

Following other platforms around qcom, I think just `obj-y += qcom/`
would work well enough.

>  obj-y                          += tegra/
>  obj-$(CONFIG_HISI_THERMAL)     += hisi_thermal.o
>  obj-$(CONFIG_MTK_THERMAL)      += mtk_thermal.o

-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] thermal: Introduce CONFIG_QCOM_THERMAL in Makefile and qcom/Kconfig
  2022-09-11 19:38 ` [PATCH 1/2] thermal: Introduce CONFIG_QCOM_THERMAL in Makefile and qcom/Kconfig Dmitry Baryshkov
@ 2022-09-12 17:11   ` Bhupesh Sharma
  2022-09-12 18:14     ` Dmitry Baryshkov
  0 siblings, 1 reply; 6+ messages in thread
From: Bhupesh Sharma @ 2022-09-12 17:11 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: linux-pm, linux-kernel, bhupesh.linux, andersson, linux-arm-msm,
	daniel.lezcano, rafael, Amit Kucheria, Thara Gopinath



On 9/12/22 1:08 AM, Dmitry Baryshkov wrote:
> On Sun, 11 Sept 2022 at 21:42, Bhupesh Sharma <bhupesh.sharma@linaro.org> 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.
>>
>> Cc: Bjorn Andersson <andersson@kernel.org>
>> Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
>> Cc: Amit Kucheria <amitk@kernel.org>
>> Cc: Thara Gopinath <thara.gopinath@gmail.com>
>> Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
>> ---
>>   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..a12b647be0d1 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-$(CONFIG_QCOM_THERMAL)     += qcom/
> 
> Following other platforms around qcom, I think just `obj-y += qcom/`
> would work well enough.

I have no strong opinion on using `obj-y += qcom/` here, but I would
still like us to define a CONFIG_QCOM_THERMAL like flag in the 
qcom/Kconfig, similar to the ST platforms which use similar selection 
mechanism via 'CONFIG_ST_THERMAL'.

Thanks.

>>   obj-y                          += tegra/
>>   obj-$(CONFIG_HISI_THERMAL)     += hisi_thermal.o
>>   obj-$(CONFIG_MTK_THERMAL)      += mtk_thermal.o
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] thermal: Introduce CONFIG_QCOM_THERMAL in Makefile and qcom/Kconfig
  2022-09-12 17:11   ` Bhupesh Sharma
@ 2022-09-12 18:14     ` Dmitry Baryshkov
  2022-09-12 19:08       ` Bhupesh Sharma
  0 siblings, 1 reply; 6+ messages in thread
From: Dmitry Baryshkov @ 2022-09-12 18:14 UTC (permalink / raw)
  To: Bhupesh Sharma
  Cc: linux-pm, linux-kernel, bhupesh.linux, andersson, linux-arm-msm,
	daniel.lezcano, rafael, Amit Kucheria, Thara Gopinath

On 12/09/2022 20:11, Bhupesh Sharma wrote:
> 
> 
> On 9/12/22 1:08 AM, Dmitry Baryshkov wrote:
>> On Sun, 11 Sept 2022 at 21:42, Bhupesh Sharma 
>> <bhupesh.sharma@linaro.org> 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.
>>>
>>> Cc: Bjorn Andersson <andersson@kernel.org>
>>> Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
>>> Cc: Amit Kucheria <amitk@kernel.org>
>>> Cc: Thara Gopinath <thara.gopinath@gmail.com>
>>> Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
>>> ---
>>>   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..a12b647be0d1 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-$(CONFIG_QCOM_THERMAL)     += qcom/
>>
>> Following other platforms around qcom, I think just `obj-y += qcom/`
>> would work well enough.
> 
> I have no strong opinion on using `obj-y += qcom/` here, but I would
> still like us to define a CONFIG_QCOM_THERMAL like flag in the 
> qcom/Kconfig, similar to the ST platforms which use similar selection 
> mechanism via 'CONFIG_ST_THERMAL'.

`QCOM_THERMAL' is fine for me.

> 
> Thanks.
> 
>>>   obj-y                          += tegra/
>>>   obj-$(CONFIG_HISI_THERMAL)     += hisi_thermal.o
>>>   obj-$(CONFIG_MTK_THERMAL)      += mtk_thermal.o
>>

-- 
With best wishes
Dmitry


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] thermal: Introduce CONFIG_QCOM_THERMAL in Makefile and qcom/Kconfig
  2022-09-12 18:14     ` Dmitry Baryshkov
@ 2022-09-12 19:08       ` Bhupesh Sharma
  0 siblings, 0 replies; 6+ messages in thread
From: Bhupesh Sharma @ 2022-09-12 19:08 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: linux-pm, linux-kernel, bhupesh.linux, andersson, linux-arm-msm,
	daniel.lezcano, rafael, Amit Kucheria, Thara Gopinath

On Mon, 12 Sept 2022 at 23:44, Dmitry Baryshkov
<dmitry.baryshkov@linaro.org> wrote:
>
> On 12/09/2022 20:11, Bhupesh Sharma wrote:
> >
> >
> > On 9/12/22 1:08 AM, Dmitry Baryshkov wrote:
> >> On Sun, 11 Sept 2022 at 21:42, Bhupesh Sharma
> >> <bhupesh.sharma@linaro.org> 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.
> >>>
> >>> Cc: Bjorn Andersson <andersson@kernel.org>
> >>> Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
> >>> Cc: Amit Kucheria <amitk@kernel.org>
> >>> Cc: Thara Gopinath <thara.gopinath@gmail.com>
> >>> Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
> >>> ---
> >>>   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..a12b647be0d1 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-$(CONFIG_QCOM_THERMAL)     += qcom/
> >>
> >> Following other platforms around qcom, I think just `obj-y += qcom/`
> >> would work well enough.
> >
> > I have no strong opinion on using `obj-y += qcom/` here, but I would
> > still like us to define a CONFIG_QCOM_THERMAL like flag in the
> > qcom/Kconfig, similar to the ST platforms which use similar selection
> > mechanism via 'CONFIG_ST_THERMAL'.
>
> `QCOM_THERMAL' is fine for me.

Sure, let me send v2 accordingly.

Thanks,
Bhupesh

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-09-12 19:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-11 18:42 [PATCH 1/2] thermal: Introduce CONFIG_QCOM_THERMAL in Makefile and qcom/Kconfig Bhupesh Sharma
2022-09-11 18:42 ` [PATCH 2/2] MAINTAINERS: Update Qualcomm Thermal Driver entry Bhupesh Sharma
2022-09-11 19:38 ` [PATCH 1/2] thermal: Introduce CONFIG_QCOM_THERMAL in Makefile and qcom/Kconfig Dmitry Baryshkov
2022-09-12 17:11   ` Bhupesh Sharma
2022-09-12 18:14     ` Dmitry Baryshkov
2022-09-12 19:08       ` Bhupesh Sharma

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.