From: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
To: Kai-Heng Feng <kai.heng.feng@canonical.com>,
rui.zhang@intel.com, daniel.lezcano@linaro.org, amitk@kernel.org
Cc: Andrzej Pietrasiewicz <andrzej.p@collabora.com>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
Peter Kaestle <peter@piie.net>,
Matthew Garrett <mjg59@google.com>,
Gayatri Kammela <gayatri.kammela@intel.com>,
Takashi Iwai <tiwai@suse.de>,
Andrew Morton <akpm@linux-foundation.org>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Akinobu Mita <akinobu.mita@gmail.com>,
"open list:THERMAL" <linux-pm@vger.kernel.org>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/3] thermal: int340x: Indicate userspace usage
Date: Sun, 29 Nov 2020 21:29:51 -0800 [thread overview]
Message-ID: <81f0532f85b4924bad463572fd778db36613d2a8.camel@linux.intel.com> (raw)
In-Reply-To: <20201128175450.12456-2-kai.heng.feng@canonical.com>
On Sun, 2020-11-29 at 01:54 +0800, Kai-Heng Feng wrote:
> The device isn't present under ACPI ThermalZone, and there's a
> dedicated
> userspace daemon for this thermal device.
>
> Let thermal core know it shouldn't handle trips to avoid surprising
> thermal shutdown.
>
> Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
> ---
> drivers/thermal/intel/int340x_thermal/int3400_thermal.c | 1 +
> .../thermal/intel/int340x_thermal/int340x_thermal_zone.c | 6 +---
> --
> 2 files changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/thermal/intel/int340x_thermal/int3400_thermal.c
> b/drivers/thermal/intel/int340x_thermal/int3400_thermal.c
> index 0966551cbaaa..2002bc96eb3c 100644
> --- a/drivers/thermal/intel/int340x_thermal/int3400_thermal.c
> +++ b/drivers/thermal/intel/int340x_thermal/int3400_thermal.c
> @@ -439,6 +439,7 @@ static struct thermal_zone_device_ops
> int3400_thermal_ops = {
> static struct thermal_zone_params int3400_thermal_params = {
> .governor_name = "user_space",
> .no_hwmon = true,
> + .userspace = true,
I am copied on only this patch, so I don't know what is this attribute?
I think it is new.
> };
>
> static void int3400_setup_gddv(struct int3400_thermal_priv *priv)
> diff --git
> a/drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.c
> b/drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.c
> index 6e479deff76b..a103eb42ef2d 100644
> --- a/drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.c
> +++ b/drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.c
> @@ -208,6 +208,7 @@ EXPORT_SYMBOL_GPL(int340x_thermal_read_trips);
> static struct thermal_zone_params int340x_thermal_params = {
> .governor_name = "user_space",
> .no_hwmon = true,
> + .userspace = true,
> };
>
> struct int34x_thermal_zone *int340x_thermal_zone_add(struct
> acpi_device *adev,
> @@ -259,14 +260,9 @@ struct int34x_thermal_zone
> *int340x_thermal_zone_add(struct acpi_device *adev,
> ret = PTR_ERR(int34x_thermal_zone->zone);
> goto err_thermal_zone;
> }
> - ret = thermal_zone_device_enable(int34x_thermal_zone->zone);
> - if (ret)
> - goto err_enable;
What is the effect of this?
The INT340X zones don't need to poll for temperature. When HW notifies
then user space gets notified via user space governor. Not sure if the
not enabling break that path.
Thanks,
Srinivas
>
> return int34x_thermal_zone;
>
> -err_enable:
> - thermal_zone_device_unregister(int34x_thermal_zone->zone);
> err_thermal_zone:
> acpi_lpat_free_conversion_table(int34x_thermal_zone-
> >lpat_table);
> kfree(int34x_thermal_zone->aux_trips);
next prev parent reply other threads:[~2020-11-30 5:31 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-28 17:54 [PATCH 1/3] thermal: core: Add indication for userspace usage Kai-Heng Feng
2020-11-28 17:54 ` [PATCH 2/3] thermal: int340x: Indicate " Kai-Heng Feng
2020-11-30 5:29 ` Srinivas Pandruvada [this message]
2020-11-30 5:46 ` Kai-Heng Feng
2020-11-28 17:54 ` [PATCH 3/3] thermal: intel: intel_pch_thermal: " Kai-Heng Feng
2020-11-30 7:57 ` [PATCH 1/3] thermal: core: Add indication for " Daniel Lezcano
2020-11-30 8:23 ` Kai-Heng Feng
2020-11-30 16:19 ` Srinivas Pandruvada
2020-11-30 18:04 ` Kai-Heng Feng
2020-11-30 18:13 ` Srinivas Pandruvada
2020-11-30 18:22 ` Kai-Heng Feng
2020-11-30 18:39 ` Srinivas Pandruvada
2020-12-07 5:36 ` Kai-Heng Feng
2020-12-09 9:30 ` Daniel Lezcano
2020-12-09 16:10 ` Srinivas Pandruvada
-- strict thread matches above, loose matches on Subject: below --
2020-11-30 5:36 Kai-Heng Feng
2020-11-30 5:36 ` [PATCH 2/3] thermal: int340x: Indicate " Kai-Heng Feng
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=81f0532f85b4924bad463572fd778db36613d2a8.camel@linux.intel.com \
--to=srinivas.pandruvada@linux.intel.com \
--cc=akinobu.mita@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=amitk@kernel.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=andrzej.p@collabora.com \
--cc=b.zolnierkie@samsung.com \
--cc=daniel.lezcano@linaro.org \
--cc=gayatri.kammela@intel.com \
--cc=kai.heng.feng@canonical.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mjg59@google.com \
--cc=peter@piie.net \
--cc=rui.zhang@intel.com \
--cc=tiwai@suse.de \
/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;
as well as URLs for NNTP newsgroup(s).