Linux-PM Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] thermal: core: Add thermal zone enable/disable notification
@ 2020-07-27 23:10 Daniel Lezcano
  2020-07-28  7:49 ` Zhang Rui
  2020-07-29  5:36 ` Amit Kucheria
  0 siblings, 2 replies; 4+ messages in thread
From: Daniel Lezcano @ 2020-07-27 23:10 UTC (permalink / raw)
  To: daniel.lezcano, rui.zhang
  Cc: amit.kucheria, andrzej.p, linux-pm, linux-kernel, thierry.reding

Now the calls to enable/disable a thermal zone are centralized in a
call to a function, we can add in these the corresponding netlink
notifications.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
 drivers/thermal/thermal_core.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c
index 9748fbb9a3a1..72bf159bcecc 100644
--- a/drivers/thermal/thermal_core.c
+++ b/drivers/thermal/thermal_core.c
@@ -509,6 +509,11 @@ static int thermal_zone_device_set_mode(struct thermal_zone_device *tz,
 
 	thermal_zone_device_update(tz, THERMAL_EVENT_UNSPECIFIED);
 
+	if (mode == THERMAL_DEVICE_ENABLED)
+		thermal_notify_tz_enable(tz->id);
+	else
+		thermal_notify_tz_disable(tz->id);
+
 	return ret;
 }
 
-- 
2.17.1


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

* Re: [PATCH] thermal: core: Add thermal zone enable/disable notification
  2020-07-27 23:10 [PATCH] thermal: core: Add thermal zone enable/disable notification Daniel Lezcano
@ 2020-07-28  7:49 ` Zhang Rui
  2020-07-29  5:36 ` Amit Kucheria
  1 sibling, 0 replies; 4+ messages in thread
From: Zhang Rui @ 2020-07-28  7:49 UTC (permalink / raw)
  To: Daniel Lezcano
  Cc: amit.kucheria, andrzej.p, linux-pm, linux-kernel, thierry.reding

On Tue, 2020-07-28 at 01:10 +0200, Daniel Lezcano wrote:
> Now the calls to enable/disable a thermal zone are centralized in a
> call to a function, we can add in these the corresponding netlink
> notifications.
> 
> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>

Acked-by: Zhang Rui <rui.zhang@intel.com>
> ---
>  drivers/thermal/thermal_core.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/thermal/thermal_core.c
> b/drivers/thermal/thermal_core.c
> index 9748fbb9a3a1..72bf159bcecc 100644
> --- a/drivers/thermal/thermal_core.c
> +++ b/drivers/thermal/thermal_core.c
> @@ -509,6 +509,11 @@ static int thermal_zone_device_set_mode(struct
> thermal_zone_device *tz,
>  
>  	thermal_zone_device_update(tz, THERMAL_EVENT_UNSPECIFIED);
>  
> +	if (mode == THERMAL_DEVICE_ENABLED)
> +		thermal_notify_tz_enable(tz->id);
> +	else
> +		thermal_notify_tz_disable(tz->id);
> +
>  	return ret;
>  }
>  


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

* Re: [PATCH] thermal: core: Add thermal zone enable/disable notification
  2020-07-27 23:10 [PATCH] thermal: core: Add thermal zone enable/disable notification Daniel Lezcano
  2020-07-28  7:49 ` Zhang Rui
@ 2020-07-29  5:36 ` Amit Kucheria
  2020-07-29  8:40   ` Daniel Lezcano
  1 sibling, 1 reply; 4+ messages in thread
From: Amit Kucheria @ 2020-07-29  5:36 UTC (permalink / raw)
  To: Daniel Lezcano
  Cc: Zhang Rui, Andrzej Pietrasiewicz, Linux PM list, LKML, Thierry Reding

On Tue, Jul 28, 2020 at 4:40 AM Daniel Lezcano
<daniel.lezcano@linaro.org> wrote:
>
> Now the calls to enable/disable a thermal zone are centralized in a
> call to a function, we can add in these the corresponding netlink
> notifications.
>
> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>

Reviewed-by: Amit Kucheria <amit.kucheria@linaro.org>

> ---
>  drivers/thermal/thermal_core.c | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c
> index 9748fbb9a3a1..72bf159bcecc 100644
> --- a/drivers/thermal/thermal_core.c
> +++ b/drivers/thermal/thermal_core.c
> @@ -509,6 +509,11 @@ static int thermal_zone_device_set_mode(struct thermal_zone_device *tz,
>
>         thermal_zone_device_update(tz, THERMAL_EVENT_UNSPECIFIED);
>
> +       if (mode == THERMAL_DEVICE_ENABLED)
> +               thermal_notify_tz_enable(tz->id);
> +       else
> +               thermal_notify_tz_disable(tz->id);
> +
>         return ret;
>  }
>
> --
> 2.17.1
>

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

* Re: [PATCH] thermal: core: Add thermal zone enable/disable notification
  2020-07-29  5:36 ` Amit Kucheria
@ 2020-07-29  8:40   ` Daniel Lezcano
  0 siblings, 0 replies; 4+ messages in thread
From: Daniel Lezcano @ 2020-07-29  8:40 UTC (permalink / raw)
  To: Amit Kucheria
  Cc: Zhang Rui, Andrzej Pietrasiewicz, Linux PM list, LKML, Thierry Reding

On 29/07/2020 07:36, Amit Kucheria wrote:
> On Tue, Jul 28, 2020 at 4:40 AM Daniel Lezcano
> <daniel.lezcano@linaro.org> wrote:
>>
>> Now the calls to enable/disable a thermal zone are centralized in a
>> call to a function, we can add in these the corresponding netlink
>> notifications.
>>
>> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
> 
> Reviewed-by: Amit Kucheria <amit.kucheria@linaro.org>

I've applied the changes, thanks for the review.


-- 
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

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

end of thread, back to index

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-27 23:10 [PATCH] thermal: core: Add thermal zone enable/disable notification Daniel Lezcano
2020-07-28  7:49 ` Zhang Rui
2020-07-29  5:36 ` Amit Kucheria
2020-07-29  8:40   ` Daniel Lezcano

Linux-PM Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-pm/0 linux-pm/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-pm linux-pm/ https://lore.kernel.org/linux-pm \
		linux-pm@vger.kernel.org
	public-inbox-index linux-pm

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-pm


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git