linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Thermal: Allow first update of cooling device state
@ 2014-02-17  3:02 Wei Ni
  2014-02-24  7:13 ` Wei Ni
  2014-02-27  6:49 ` Zhang Rui
  0 siblings, 2 replies; 3+ messages in thread
From: Wei Ni @ 2014-02-17  3:02 UTC (permalink / raw)
  To: rui.zhang; +Cc: durgadoss.r, eduardo.valentin, linux-pm, Wei Ni

In initialization, if the cooling device is initialized at
max cooling state, and the thermal zone temperature is below
the first trip point, then the cooling state can't be updated
to the right state, untill the first trip point be triggered.

To fix this issue, allow first update of cooling device state
during registration, initialized "updated" device field as
"false" (instead of "true").

Signed-off-by: Wei Ni <wni@nvidia.com>
---
 drivers/thermal/thermal_core.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c
index 338a88b..02f57af 100644
--- a/drivers/thermal/thermal_core.c
+++ b/drivers/thermal/thermal_core.c
@@ -1107,7 +1107,7 @@ __thermal_cooling_device_register(struct device_node *np,
 	INIT_LIST_HEAD(&cdev->thermal_instances);
 	cdev->np = np;
 	cdev->ops = ops;
-	cdev->updated = true;
+	cdev->updated = false;
 	cdev->device.class = &thermal_class;
 	cdev->devdata = devdata;
 	dev_set_name(&cdev->device, "cooling_device%d", cdev->id);
-- 
1.7.9.5


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

* Re: [PATCH] Thermal: Allow first update of cooling device state
  2014-02-17  3:02 [PATCH] Thermal: Allow first update of cooling device state Wei Ni
@ 2014-02-24  7:13 ` Wei Ni
  2014-02-27  6:49 ` Zhang Rui
  1 sibling, 0 replies; 3+ messages in thread
From: Wei Ni @ 2014-02-24  7:13 UTC (permalink / raw)
  To: rui.zhang@intel.com
  Cc: durgadoss.r@intel.com, eduardo.valentin@ti.com,
	linux-pm@vger.kernel.org, Wei Ni, linux-kernel@vger.kernel.org

Hi, Rui
Do you have any comment for it ?

Thanks.
Wei.

On 02/17/2014 11:02 AM, Wei Ni wrote:
> In initialization, if the cooling device is initialized at
> max cooling state, and the thermal zone temperature is below
> the first trip point, then the cooling state can't be updated
> to the right state, untill the first trip point be triggered.
> 
> To fix this issue, allow first update of cooling device state
> during registration, initialized "updated" device field as
> "false" (instead of "true").
> 
> Signed-off-by: Wei Ni <wni@nvidia.com>
> ---
>  drivers/thermal/thermal_core.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c
> index 338a88b..02f57af 100644
> --- a/drivers/thermal/thermal_core.c
> +++ b/drivers/thermal/thermal_core.c
> @@ -1107,7 +1107,7 @@ __thermal_cooling_device_register(struct device_node *np,
>  	INIT_LIST_HEAD(&cdev->thermal_instances);
>  	cdev->np = np;
>  	cdev->ops = ops;
> -	cdev->updated = true;
> +	cdev->updated = false;
>  	cdev->device.class = &thermal_class;
>  	cdev->devdata = devdata;
>  	dev_set_name(&cdev->device, "cooling_device%d", cdev->id);
> 


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

* Re: [PATCH] Thermal: Allow first update of cooling device state
  2014-02-17  3:02 [PATCH] Thermal: Allow first update of cooling device state Wei Ni
  2014-02-24  7:13 ` Wei Ni
@ 2014-02-27  6:49 ` Zhang Rui
  1 sibling, 0 replies; 3+ messages in thread
From: Zhang Rui @ 2014-02-27  6:49 UTC (permalink / raw)
  To: Wei Ni; +Cc: durgadoss.r, eduardo.valentin, linux-pm

On Mon, 2014-02-17 at 11:02 +0800, Wei Ni wrote:
> In initialization, if the cooling device is initialized at
> max cooling state, and the thermal zone temperature is below
> the first trip point, then the cooling state can't be updated
> to the right state, untill the first trip point be triggered.
> 
> To fix this issue, allow first update of cooling device state
> during registration, initialized "updated" device field as
> "false" (instead of "true").
> 
> Signed-off-by: Wei Ni <wni@nvidia.com>

applied.

thanks,
rui
> ---
>  drivers/thermal/thermal_core.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c
> index 338a88b..02f57af 100644
> --- a/drivers/thermal/thermal_core.c
> +++ b/drivers/thermal/thermal_core.c
> @@ -1107,7 +1107,7 @@ __thermal_cooling_device_register(struct device_node *np,
>  	INIT_LIST_HEAD(&cdev->thermal_instances);
>  	cdev->np = np;
>  	cdev->ops = ops;
> -	cdev->updated = true;
> +	cdev->updated = false;
>  	cdev->device.class = &thermal_class;
>  	cdev->devdata = devdata;
>  	dev_set_name(&cdev->device, "cooling_device%d", cdev->id);



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

end of thread, other threads:[~2014-02-27  6:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-17  3:02 [PATCH] Thermal: Allow first update of cooling device state Wei Ni
2014-02-24  7:13 ` Wei Ni
2014-02-27  6:49 ` Zhang Rui

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).