From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: rjw@rjwysocki.net, linux-acpi@vger.kernel.org,
linux-pm@vger.kernel.org, Sebastian Reichel <sre@kernel.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Amit Kucheria <amitk@kernel.org>, Zhang Rui <rui.zhang@intel.com>,
Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>,
Davidlohr Bueso <dave@stgolabs.net>,
Kees Cook <keescook@chromium.org>,
"Lee, Chun-Yi" <joeyli.kernel@gmail.com>,
Chuansheng Liu <chuansheng.liu@intel.com>,
ye xingchen <ye.xingchen@zte.com.cn>,
linux-kernel@vger.kernel.org (open list)
Subject: Re: [PATCH] thermal: Hunt zero trip points thermal zones usage
Date: Fri, 3 Feb 2023 19:08:52 +0100 [thread overview]
Message-ID: <20230203190852.12396f8a@xps-13> (raw)
In-Reply-To: <20230203175832.3406504-1-daniel.lezcano@linaro.org>
Hi Daniel,
daniel.lezcano@linaro.org wrote on Fri, 3 Feb 2023 18:58:31 +0100:
> Some drivers are declaring a thermal zone without any thermal trip
> points.
>
> On the other side, we are introducing the function
> thermal_zone_device_register_with_trips() which provides an array of
> generic thermal trip points. When all the drivers will be converted to
> the generic trip points, keeping two functions will be useless.
>
> Most of the drivers are now using
> thermal_zone_device_register_with_trips() with the generic trip
> points. As soon as the remaining drivers are merged, the
> thermal_zone_device_register_with_trips() will be renamed to
> thermal_zone_device_register().
>
> Obviously this renaming can only happen if there are no more user of
> the thermal_zone_device_register() function.
>
> This change uses thermal_zone_device_register_with_trips() with a NULL
> parameter for the trip point array instead of
> thermal_zone_device_register().
>
> No functional change intended.
>
> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
> ---
> drivers/power/supply/power_supply_core.c | 2 +-
> drivers/thermal/armada_thermal.c | 4 ++--
> drivers/thermal/dove_thermal.c | 4 ++--
> drivers/thermal/intel/int340x_thermal/int3400_thermal.c | 6 +++---
> drivers/thermal/kirkwood_thermal.c | 4 ++--
> drivers/thermal/spear_thermal.c | 5 +++--
> 6 files changed, 13 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/power/supply/power_supply_core.c b/drivers/power/supply/power_supply_core.c
> index 7c790c41e2fe..208a849a71d9 100644
> --- a/drivers/power/supply/power_supply_core.c
> +++ b/drivers/power/supply/power_supply_core.c
> @@ -1166,7 +1166,7 @@ static int psy_register_thermal(struct power_supply *psy)
>
> /* Register battery zone device psy reports temperature */
> if (psy_has_property(psy->desc, POWER_SUPPLY_PROP_TEMP)) {
> - psy->tzd = thermal_zone_device_register(psy->desc->name,
> + psy->tzd = thermal_zone_device_register_with_trips(psy->desc->name, NULL,
> 0, 0, psy, &psy_tzd_ops, NULL, 0, 0);
> if (IS_ERR(psy->tzd))
> return PTR_ERR(psy->tzd);
> diff --git a/drivers/thermal/armada_thermal.c b/drivers/thermal/armada_thermal.c
> index 99e86484a55c..83a4080bffc7 100644
> --- a/drivers/thermal/armada_thermal.c
> +++ b/drivers/thermal/armada_thermal.c
> @@ -856,8 +856,8 @@ static int armada_thermal_probe(struct platform_device *pdev)
> /* Wait the sensors to be valid */
> armada_wait_sensor_validity(priv);
>
> - tz = thermal_zone_device_register(priv->zone_name, 0, 0, priv,
> - &legacy_ops, NULL, 0, 0);
> + tz = thermal_zone_device_register_with_trips(priv->zone_name, NULL, 0, 0, priv,
> + &legacy_ops, NULL, 0, 0);
> if (IS_ERR(tz)) {
> dev_err(&pdev->dev,
> "Failed to register thermal zone device\n");
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Thanks,
Miquèl
next prev parent reply other threads:[~2023-02-03 18:09 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-03 17:58 [PATCH] thermal: Hunt zero trip points thermal zones usage Daniel Lezcano
2023-02-03 18:08 ` Miquel Raynal [this message]
2023-02-06 14:56 ` Daniel Lezcano
2023-02-06 16:08 ` Rafael J. Wysocki
2023-02-06 17:28 ` Rafael J. Wysocki
2023-02-06 18:00 ` Daniel Lezcano
2023-02-06 18:13 ` Rafael J. Wysocki
2023-02-13 20:49 ` Sebastian Reichel
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=20230203190852.12396f8a@xps-13 \
--to=miquel.raynal@bootlin.com \
--cc=amitk@kernel.org \
--cc=chuansheng.liu@intel.com \
--cc=daniel.lezcano@linaro.org \
--cc=dave@stgolabs.net \
--cc=joeyli.kernel@gmail.com \
--cc=keescook@chromium.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=rjw@rjwysocki.net \
--cc=rui.zhang@intel.com \
--cc=sre@kernel.org \
--cc=srinivas.pandruvada@linux.intel.com \
--cc=ye.xingchen@zte.com.cn \
/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