mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Daniel Lezcano <daniel.lezcano@oss.qualcomm.com>
To: manivannan.sadhasivam@oss.qualcomm.com,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	"Daniel Lezcano" <daniel.lezcano@kernel.org>,
	"Zhang Rui" <rui.zhang@intel.com>,
	"Lukasz Luba" <lukasz.luba@arm.com>,
	"Manivannan Sadhasivam" <mani@kernel.org>,
	"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
	"Krzysztof Wilczyński" <kwilczynski@kernel.org>,
	"Rob Herring" <robh@kernel.org>,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Bjorn Andersson" <andersson@kernel.org>,
	"Konrad Dybcio" <konradybcio@kernel.org>,
	"Abel Vesa" <abelvesa@kernel.org>
Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-msm@vger.kernel.org, linux-pci@vger.kernel.org,
	devicetree@vger.kernel.org
Subject: Re: [PATCH 1/4] thermal/of: Add thermal_zone_get_zone_by_node() API
Date: Tue, 1 Dec 2026 17:18:57 +0100	[thread overview]
Message-ID: <001f1f92-df18-4cd8-a08a-00ecb91482e8@oss.qualcomm.com> (raw)
In-Reply-To: <20261125-glymur-thermal-fix-v1-1-b93a9feae156@oss.qualcomm.com>



Le 25/11/2026 à 11:17, Manivannan Sadhasivam via B4 Relay a écrit :
> From: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
> 
> Add an API to allow the drivers to get a registered thermal zone from OF
> node.
> 
> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
> ---
>   drivers/thermal/thermal_of.c | 21 +++++++++++++++++++++
>   include/linux/thermal.h      |  8 ++++++++
>   2 files changed, 29 insertions(+)
> 
> diff --git a/drivers/thermal/thermal_of.c b/drivers/thermal/thermal_of.c
> index 9e96fb1b033e..e38f67c19c8e 100644
> --- a/drivers/thermal/thermal_of.c
> +++ b/drivers/thermal/thermal_of.c
> @@ -530,6 +530,27 @@ void devm_thermal_of_zone_unregister(struct device *dev, struct thermal_zone_dev
>   }
>   EXPORT_SYMBOL_GPL(devm_thermal_of_zone_unregister);
>   
> +/**
> + * thermal_zone_get_zone_by_node() - get a registered zone from its OF node
> + * @np: device tree node of the thermal zone
> + *
> + * Thermal zones described in the device tree are registered using the name
> + * of their device tree node, so resolve @np to its registered thermal zone
> + * by that name.
> + *
> + * Return: a valid thermal zone on success, an ERR_PTR otherwise (-EINVAL for
> + * an invalid argument, -ENODEV if no zone matches @np and -EEXIST if the name
> + * is not unique).
> + */
> +struct thermal_zone_device *thermal_zone_get_zone_by_node(struct device_node *np)
> +{
> +	if (!np)
> +		return ERR_PTR(-EINVAL);
> +
> +	return thermal_zone_get_zone_by_name(np->name);
> +}
> +EXPORT_SYMBOL_GPL(thermal_zone_get_zone_by_node);

I don't think it is worth to add a new function for that as you can 
directly call thermal_zone_get_zone_by_name()


  reply	other threads:[~2026-12-01 16:19 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-25 10:17 [PATCH 0/4] PCI: qcom: Recalibrate the PHY on temperature drift Manivannan Sadhasivam via B4 Relay
2026-11-25 10:17 ` [PATCH 1/4] thermal/of: Add thermal_zone_get_zone_by_node() API Manivannan Sadhasivam via B4 Relay
2026-12-01 16:18   ` Daniel Lezcano [this message]
2026-11-25 10:17 ` [PATCH 2/4] dt-bindings: PCI: qcom,pcie-x1e80100: Add qcom,pcie-recalibration-thermal-zones Manivannan Sadhasivam via B4 Relay
2026-11-25 10:17 ` [PATCH 3/4] PCI: qcom: Recalibrate the PHY on temperature drift Manivannan Sadhasivam via B4 Relay
2026-12-01 16:44   ` Daniel Lezcano
2026-11-25 10:17 ` [PATCH 4/4] arm64: dts: qcom: glymur: Describe the PCIe thermal inputs Manivannan Sadhasivam via B4 Relay
2026-11-25 10:33   ` Konrad Dybcio

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=001f1f92-df18-4cd8-a08a-00ecb91482e8@oss.qualcomm.com \
    --to=daniel.lezcano@oss.qualcomm.com \
    --cc=abelvesa@kernel.org \
    --cc=andersson@kernel.org \
    --cc=bhelgaas@google.com \
    --cc=conor+dt@kernel.org \
    --cc=daniel.lezcano@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=konradybcio@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=kwilczynski@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=lpieralisi@kernel.org \
    --cc=lukasz.luba@arm.com \
    --cc=mani@kernel.org \
    --cc=manivannan.sadhasivam@oss.qualcomm.com \
    --cc=rafael@kernel.org \
    --cc=robh@kernel.org \
    --cc=rui.zhang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®