All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] thermal: rcar-thermal: minor fixes
@ 2014-02-28 13:10 ` Patrick Titiano
  0 siblings, 0 replies; 12+ messages in thread
From: Patrick Titiano @ 2014-02-28 13:10 UTC (permalink / raw)
  To: magnus.damm, kuninori.morimoto.gx, eduardo.valentin
  Cc: bcousson, linux-pm, linux-sh, Patrick Titiano

Hi,
Here are 2 minor updates to the rcar-thermal driver.

First patch removes an unecessary mask applied in a if statement.
Because the same mask was already applied in the preceding statement,
the second one can be removed.

Second patch avoids updating the thermal zone in case an IRQ was triggered but
the temperature didn't effectively change.
Note this is not a driver issue.
Below is a captured debug trace illustrating the purpose of this patch:
out of 8 thermal zone updates, only 2 are actually necessary.

[   41.120000] rcar_thermal_work(): cctemp%000
[   41.120000] rcar_thermal_work(): new_ctemp0000
[   41.120000] rcar_thermal_work(): temp is now 30000C, update thermal zone
[   58.990000] rcar_thermal_work(): cctemp0000
[   58.990000] rcar_thermal_work(): nctemp0000
[   58.990000] rcar_thermal_work(): same temp, do not update thermal zone
[   59.290000] rcar_thermal_work(): cctemp0000
[   59.290000] rcar_thermal_work(): nctemp0000
[   59.290000] rcar_thermal_work(): same temp, do not update thermal zone
[   59.590000] rcar_thermal_work(): cctemp0000
[   59.590000] rcar_thermal_work(): nctemp0000
[   59.590000] rcar_thermal_work(): same temp, do not update thermal zone
[   59.890000] rcar_thermal_work(): cctemp0000
[   59.890000] rcar_thermal_work(): nctemp0000
[   59.890000] rcar_thermal_work(): same temp, do not update thermal zone
[   60.190000] rcar_thermal_work(): cctemp0000
[   60.190000] rcar_thermal_work(): nctemp0000
[   60.190000] rcar_thermal_work(): same temp, do not update thermal zone
[   60.490000] rcar_thermal_work(): cctemp0000
[   60.490000] rcar_thermal_work(): nctemp0000
[   60.490000] rcar_thermal_work(): same temp, do not update thermal zone
[   60.790000] rcar_thermal_work(): cctemp0000
[   60.790000] rcar_thermal_work(): nctemp5000
[   60.790000] rcar_thermal_work(): temp is now 35000C, update thermal zone

I suspect this may be due to sensor sampling accuracy / fluctuation,
but no formal proof.

Patrick Titiano (2):
  thermal: rcar-thermal: fix same mask applied twice
  thermal: rcar-thermal: update thermal zone only when temperature
    changes

 drivers/thermal/rcar_thermal.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

-- 
1.8.3.2


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

* [PATCH 0/2] thermal: rcar-thermal: minor fixes
@ 2014-02-28 13:10 ` Patrick Titiano
  0 siblings, 0 replies; 12+ messages in thread
From: Patrick Titiano @ 2014-02-28 13:10 UTC (permalink / raw)
  To: magnus.damm, kuninori.morimoto.gx, eduardo.valentin
  Cc: bcousson, linux-pm, linux-sh, Patrick Titiano

Hi,
Here are 2 minor updates to the rcar-thermal driver.

First patch removes an unecessary mask applied in a if statement.
Because the same mask was already applied in the preceding statement,
the second one can be removed.

Second patch avoids updating the thermal zone in case an IRQ was triggered but
the temperature didn't effectively change.
Note this is not a driver issue.
Below is a captured debug trace illustrating the purpose of this patch:
out of 8 thermal zone updates, only 2 are actually necessary.

[   41.120000] rcar_thermal_work(): cctemp=25000
[   41.120000] rcar_thermal_work(): new_ctemp=30000
[   41.120000] rcar_thermal_work(): temp is now 30000C, update thermal zone
[   58.990000] rcar_thermal_work(): cctemp=30000
[   58.990000] rcar_thermal_work(): nctemp=30000
[   58.990000] rcar_thermal_work(): same temp, do not update thermal zone
[   59.290000] rcar_thermal_work(): cctemp=30000
[   59.290000] rcar_thermal_work(): nctemp=30000
[   59.290000] rcar_thermal_work(): same temp, do not update thermal zone
[   59.590000] rcar_thermal_work(): cctemp=30000
[   59.590000] rcar_thermal_work(): nctemp=30000
[   59.590000] rcar_thermal_work(): same temp, do not update thermal zone
[   59.890000] rcar_thermal_work(): cctemp=30000
[   59.890000] rcar_thermal_work(): nctemp=30000
[   59.890000] rcar_thermal_work(): same temp, do not update thermal zone
[   60.190000] rcar_thermal_work(): cctemp=30000
[   60.190000] rcar_thermal_work(): nctemp=30000
[   60.190000] rcar_thermal_work(): same temp, do not update thermal zone
[   60.490000] rcar_thermal_work(): cctemp=30000
[   60.490000] rcar_thermal_work(): nctemp=30000
[   60.490000] rcar_thermal_work(): same temp, do not update thermal zone
[   60.790000] rcar_thermal_work(): cctemp=30000
[   60.790000] rcar_thermal_work(): nctemp=35000
[   60.790000] rcar_thermal_work(): temp is now 35000C, update thermal zone

I suspect this may be due to sensor sampling accuracy / fluctuation,
but no formal proof.

Patrick Titiano (2):
  thermal: rcar-thermal: fix same mask applied twice
  thermal: rcar-thermal: update thermal zone only when temperature
    changes

 drivers/thermal/rcar_thermal.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

-- 
1.8.3.2


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

* [PATCH 1/2] thermal: rcar-thermal: fix same mask applied twice
  2014-02-28 13:10 ` Patrick Titiano
@ 2014-02-28 13:10   ` Patrick Titiano
  -1 siblings, 0 replies; 12+ messages in thread
From: Patrick Titiano @ 2014-02-28 13:10 UTC (permalink / raw)
  To: magnus.damm, kuninori.morimoto.gx, eduardo.valentin
  Cc: bcousson, linux-pm, linux-sh, Patrick Titiano

Mask is already applied preceding the if statement.
Remove the second mask.

Signed-off-by: Patrick Titiano <ptitiano@baylibre.com>
---
 drivers/thermal/rcar_thermal.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/thermal/rcar_thermal.c b/drivers/thermal/rcar_thermal.c
index e2bb589..6ea8c5c 100644
--- a/drivers/thermal/rcar_thermal.c
+++ b/drivers/thermal/rcar_thermal.c
@@ -316,7 +316,7 @@ static u32 rcar_thermal_had_changed(struct rcar_thermal_priv *priv, u32 status)
 
 	status = (status >> rcar_id_to_shift(priv)) & 0x3;
 
-	if (status & 0x3) {
+	if (status) {
 		dev_dbg(dev, "thermal%d %s%s\n",
 			priv->id,
 			(status & 0x2) ? "Rising " : "",
-- 
1.8.3.2


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

* [PATCH 1/2] thermal: rcar-thermal: fix same mask applied twice
@ 2014-02-28 13:10   ` Patrick Titiano
  0 siblings, 0 replies; 12+ messages in thread
From: Patrick Titiano @ 2014-02-28 13:10 UTC (permalink / raw)
  To: magnus.damm, kuninori.morimoto.gx, eduardo.valentin
  Cc: bcousson, linux-pm, linux-sh, Patrick Titiano

Mask is already applied preceding the if statement.
Remove the second mask.

Signed-off-by: Patrick Titiano <ptitiano@baylibre.com>
---
 drivers/thermal/rcar_thermal.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/thermal/rcar_thermal.c b/drivers/thermal/rcar_thermal.c
index e2bb589..6ea8c5c 100644
--- a/drivers/thermal/rcar_thermal.c
+++ b/drivers/thermal/rcar_thermal.c
@@ -316,7 +316,7 @@ static u32 rcar_thermal_had_changed(struct rcar_thermal_priv *priv, u32 status)
 
 	status = (status >> rcar_id_to_shift(priv)) & 0x3;
 
-	if (status & 0x3) {
+	if (status) {
 		dev_dbg(dev, "thermal%d %s%s\n",
 			priv->id,
 			(status & 0x2) ? "Rising " : "",
-- 
1.8.3.2


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

* [PATCH 2/2] thermal: rcar-thermal: update thermal zone only when temperature changes
  2014-02-28 13:10 ` Patrick Titiano
@ 2014-02-28 13:10   ` Patrick Titiano
  -1 siblings, 0 replies; 12+ messages in thread
From: Patrick Titiano @ 2014-02-28 13:10 UTC (permalink / raw)
  To: magnus.damm, kuninori.morimoto.gx, eduardo.valentin
  Cc: bcousson, linux-pm, linux-sh, Patrick Titiano

Avoid updating the thermal zone in case an IRQ was triggered but the
temperature didn't effectively change.
Note this is not a driver issue.
Below is a captured debug trace illustrating the purpose of this patch:
out of 8 thermal zone updates, only 2 are actually necessary.

[   41.120000] rcar_thermal_work(): cctemp%000
[   41.120000] rcar_thermal_work(): nctemp0000
[   41.120000] rcar_thermal_work(): temp is now 30000C, update thermal zone
[   58.990000] rcar_thermal_work(): cctemp0000
[   58.990000] rcar_thermal_work(): nctemp0000
[   58.990000] rcar_thermal_work(): same temp, do not update thermal zone
[   59.290000] rcar_thermal_work(): cctemp0000
[   59.290000] rcar_thermal_work(): nctemp0000
[   59.290000] rcar_thermal_work(): same temp, do not update thermal zone
[   59.590000] rcar_thermal_work(): cctemp0000
[   59.590000] rcar_thermal_work(): nctemp0000
[   59.590000] rcar_thermal_work(): same temp, do not update thermal zone
[   59.890000] rcar_thermal_work(): cctemp0000
[   59.890000] rcar_thermal_work(): nctemp0000
[   59.890000] rcar_thermal_work(): same temp, do not update thermal zone
[   60.190000] rcar_thermal_work(): cctemp0000
[   60.190000] rcar_thermal_work(): nctemp0000
[   60.190000] rcar_thermal_work(): same temp, do not update thermal zone
[   60.490000] rcar_thermal_work(): cctemp0000
[   60.490000] rcar_thermal_work(): nctemp0000
[   60.490000] rcar_thermal_work(): same temp, do not update thermal zone
[   60.790000] rcar_thermal_work(): cctemp0000
[   60.790000] rcar_thermal_work(): nctemp5000
[   60.790000] rcar_thermal_work(): temp is now 35000C, update thermal zone

I suspect this may be due to sensor sampling accuracy / fluctuation,
but no formal proof.

Signed-off-by: Patrick Titiano <ptitiano@baylibre.com>
---
 drivers/thermal/rcar_thermal.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/thermal/rcar_thermal.c b/drivers/thermal/rcar_thermal.c
index 6ea8c5c..187693c 100644
--- a/drivers/thermal/rcar_thermal.c
+++ b/drivers/thermal/rcar_thermal.c
@@ -302,12 +302,17 @@ static void _rcar_thermal_irq_ctrl(struct rcar_thermal_priv *priv, int enable)
 static void rcar_thermal_work(struct work_struct *work)
 {
 	struct rcar_thermal_priv *priv;
+	unsigned long cctemp, nctemp;
 
 	priv = container_of(work, struct rcar_thermal_priv, work.work);
 
+	rcar_thermal_get_temp(priv->zone, &cctemp);
 	rcar_thermal_update_temp(priv);
 	rcar_thermal_irq_enable(priv);
-	thermal_zone_device_update(priv->zone);
+
+	rcar_thermal_get_temp(priv->zone, &nctemp);
+	if (nctemp != cctemp)
+		thermal_zone_device_update(priv->zone);
 }
 
 static u32 rcar_thermal_had_changed(struct rcar_thermal_priv *priv, u32 status)
-- 
1.8.3.2


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

* [PATCH 2/2] thermal: rcar-thermal: update thermal zone only when temperature changes
@ 2014-02-28 13:10   ` Patrick Titiano
  0 siblings, 0 replies; 12+ messages in thread
From: Patrick Titiano @ 2014-02-28 13:10 UTC (permalink / raw)
  To: magnus.damm, kuninori.morimoto.gx, eduardo.valentin
  Cc: bcousson, linux-pm, linux-sh, Patrick Titiano

Avoid updating the thermal zone in case an IRQ was triggered but the
temperature didn't effectively change.
Note this is not a driver issue.
Below is a captured debug trace illustrating the purpose of this patch:
out of 8 thermal zone updates, only 2 are actually necessary.

[   41.120000] rcar_thermal_work(): cctemp=25000
[   41.120000] rcar_thermal_work(): nctemp=30000
[   41.120000] rcar_thermal_work(): temp is now 30000C, update thermal zone
[   58.990000] rcar_thermal_work(): cctemp=30000
[   58.990000] rcar_thermal_work(): nctemp=30000
[   58.990000] rcar_thermal_work(): same temp, do not update thermal zone
[   59.290000] rcar_thermal_work(): cctemp=30000
[   59.290000] rcar_thermal_work(): nctemp=30000
[   59.290000] rcar_thermal_work(): same temp, do not update thermal zone
[   59.590000] rcar_thermal_work(): cctemp=30000
[   59.590000] rcar_thermal_work(): nctemp=30000
[   59.590000] rcar_thermal_work(): same temp, do not update thermal zone
[   59.890000] rcar_thermal_work(): cctemp=30000
[   59.890000] rcar_thermal_work(): nctemp=30000
[   59.890000] rcar_thermal_work(): same temp, do not update thermal zone
[   60.190000] rcar_thermal_work(): cctemp=30000
[   60.190000] rcar_thermal_work(): nctemp=30000
[   60.190000] rcar_thermal_work(): same temp, do not update thermal zone
[   60.490000] rcar_thermal_work(): cctemp=30000
[   60.490000] rcar_thermal_work(): nctemp=30000
[   60.490000] rcar_thermal_work(): same temp, do not update thermal zone
[   60.790000] rcar_thermal_work(): cctemp=30000
[   60.790000] rcar_thermal_work(): nctemp=35000
[   60.790000] rcar_thermal_work(): temp is now 35000C, update thermal zone

I suspect this may be due to sensor sampling accuracy / fluctuation,
but no formal proof.

Signed-off-by: Patrick Titiano <ptitiano@baylibre.com>
---
 drivers/thermal/rcar_thermal.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/thermal/rcar_thermal.c b/drivers/thermal/rcar_thermal.c
index 6ea8c5c..187693c 100644
--- a/drivers/thermal/rcar_thermal.c
+++ b/drivers/thermal/rcar_thermal.c
@@ -302,12 +302,17 @@ static void _rcar_thermal_irq_ctrl(struct rcar_thermal_priv *priv, int enable)
 static void rcar_thermal_work(struct work_struct *work)
 {
 	struct rcar_thermal_priv *priv;
+	unsigned long cctemp, nctemp;
 
 	priv = container_of(work, struct rcar_thermal_priv, work.work);
 
+	rcar_thermal_get_temp(priv->zone, &cctemp);
 	rcar_thermal_update_temp(priv);
 	rcar_thermal_irq_enable(priv);
-	thermal_zone_device_update(priv->zone);
+
+	rcar_thermal_get_temp(priv->zone, &nctemp);
+	if (nctemp != cctemp)
+		thermal_zone_device_update(priv->zone);
 }
 
 static u32 rcar_thermal_had_changed(struct rcar_thermal_priv *priv, u32 status)
-- 
1.8.3.2


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

* Re: [PATCH 0/2] thermal: rcar-thermal: minor fixes
  2014-02-28 13:10 ` Patrick Titiano
@ 2014-03-02 23:52   ` Kuninori Morimoto
  -1 siblings, 0 replies; 12+ messages in thread
From: Kuninori Morimoto @ 2014-03-02 23:52 UTC (permalink / raw)
  To: Patrick Titiano
  Cc: magnus.damm, kuninori.morimoto.gx, eduardo.valentin, bcousson,
	linux-pm, linux-sh


Hi

> Here are 2 minor updates to the rcar-thermal driver.
> 
> First patch removes an unecessary mask applied in a if statement.
> Because the same mask was already applied in the preceding statement,
> the second one can be removed.
> 
> Second patch avoids updating the thermal zone in case an IRQ was triggered but
> the temperature didn't effectively change.
> Note this is not a driver issue.
> Below is a captured debug trace illustrating the purpose of this patch:
> out of 8 thermal zone updates, only 2 are actually necessary.
> 
> [   41.120000] rcar_thermal_work(): cctemp%000
> [   41.120000] rcar_thermal_work(): new_ctemp0000
> [   41.120000] rcar_thermal_work(): temp is now 30000C, update thermal zone
> [   58.990000] rcar_thermal_work(): cctemp0000
> [   58.990000] rcar_thermal_work(): nctemp0000
> [   58.990000] rcar_thermal_work(): same temp, do not update thermal zone
> [   59.290000] rcar_thermal_work(): cctemp0000
> [   59.290000] rcar_thermal_work(): nctemp0000
> [   59.290000] rcar_thermal_work(): same temp, do not update thermal zone
> [   59.590000] rcar_thermal_work(): cctemp0000
> [   59.590000] rcar_thermal_work(): nctemp0000
> [   59.590000] rcar_thermal_work(): same temp, do not update thermal zone
> [   59.890000] rcar_thermal_work(): cctemp0000
> [   59.890000] rcar_thermal_work(): nctemp0000
> [   59.890000] rcar_thermal_work(): same temp, do not update thermal zone
> [   60.190000] rcar_thermal_work(): cctemp0000
> [   60.190000] rcar_thermal_work(): nctemp0000
> [   60.190000] rcar_thermal_work(): same temp, do not update thermal zone
> [   60.490000] rcar_thermal_work(): cctemp0000
> [   60.490000] rcar_thermal_work(): nctemp0000
> [   60.490000] rcar_thermal_work(): same temp, do not update thermal zone
> [   60.790000] rcar_thermal_work(): cctemp0000
> [   60.790000] rcar_thermal_work(): nctemp5000
> [   60.790000] rcar_thermal_work(): temp is now 35000C, update thermal zone
> 
> I suspect this may be due to sensor sampling accuracy / fluctuation,
> but no formal proof.
> 
> Patrick Titiano (2):
>   thermal: rcar-thermal: fix same mask applied twice
>   thermal: rcar-thermal: update thermal zone only when temperature
>     changes
> 
>  drivers/thermal/rcar_thermal.c | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)

For all patches

Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>



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

* Re: [PATCH 0/2] thermal: rcar-thermal: minor fixes
@ 2014-03-02 23:52   ` Kuninori Morimoto
  0 siblings, 0 replies; 12+ messages in thread
From: Kuninori Morimoto @ 2014-03-02 23:52 UTC (permalink / raw)
  To: Patrick Titiano
  Cc: magnus.damm, kuninori.morimoto.gx, eduardo.valentin, bcousson,
	linux-pm, linux-sh


Hi

> Here are 2 minor updates to the rcar-thermal driver.
> 
> First patch removes an unecessary mask applied in a if statement.
> Because the same mask was already applied in the preceding statement,
> the second one can be removed.
> 
> Second patch avoids updating the thermal zone in case an IRQ was triggered but
> the temperature didn't effectively change.
> Note this is not a driver issue.
> Below is a captured debug trace illustrating the purpose of this patch:
> out of 8 thermal zone updates, only 2 are actually necessary.
> 
> [   41.120000] rcar_thermal_work(): cctemp=25000
> [   41.120000] rcar_thermal_work(): new_ctemp=30000
> [   41.120000] rcar_thermal_work(): temp is now 30000C, update thermal zone
> [   58.990000] rcar_thermal_work(): cctemp=30000
> [   58.990000] rcar_thermal_work(): nctemp=30000
> [   58.990000] rcar_thermal_work(): same temp, do not update thermal zone
> [   59.290000] rcar_thermal_work(): cctemp=30000
> [   59.290000] rcar_thermal_work(): nctemp=30000
> [   59.290000] rcar_thermal_work(): same temp, do not update thermal zone
> [   59.590000] rcar_thermal_work(): cctemp=30000
> [   59.590000] rcar_thermal_work(): nctemp=30000
> [   59.590000] rcar_thermal_work(): same temp, do not update thermal zone
> [   59.890000] rcar_thermal_work(): cctemp=30000
> [   59.890000] rcar_thermal_work(): nctemp=30000
> [   59.890000] rcar_thermal_work(): same temp, do not update thermal zone
> [   60.190000] rcar_thermal_work(): cctemp=30000
> [   60.190000] rcar_thermal_work(): nctemp=30000
> [   60.190000] rcar_thermal_work(): same temp, do not update thermal zone
> [   60.490000] rcar_thermal_work(): cctemp=30000
> [   60.490000] rcar_thermal_work(): nctemp=30000
> [   60.490000] rcar_thermal_work(): same temp, do not update thermal zone
> [   60.790000] rcar_thermal_work(): cctemp=30000
> [   60.790000] rcar_thermal_work(): nctemp=35000
> [   60.790000] rcar_thermal_work(): temp is now 35000C, update thermal zone
> 
> I suspect this may be due to sensor sampling accuracy / fluctuation,
> but no formal proof.
> 
> Patrick Titiano (2):
>   thermal: rcar-thermal: fix same mask applied twice
>   thermal: rcar-thermal: update thermal zone only when temperature
>     changes
> 
>  drivers/thermal/rcar_thermal.c | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)

For all patches

Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>



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

* Re: [PATCH 0/2] thermal: rcar-thermal: minor fixes
  2014-03-02 23:52   ` Kuninori Morimoto
@ 2014-03-03 14:51     ` Zhang Rui
  -1 siblings, 0 replies; 12+ messages in thread
From: Zhang Rui @ 2014-03-03 14:51 UTC (permalink / raw)
  To: Kuninori Morimoto
  Cc: Patrick Titiano, magnus.damm, kuninori.morimoto.gx,
	eduardo.valentin, bcousson, linux-pm, linux-sh

On Sun, 2014-03-02 at 15:52 -0800, Kuninori Morimoto wrote:
> Hi
> 
> > Here are 2 minor updates to the rcar-thermal driver.
> > 
> > First patch removes an unecessary mask applied in a if statement.
> > Because the same mask was already applied in the preceding statement,
> > the second one can be removed.
> > 
> > Second patch avoids updating the thermal zone in case an IRQ was triggered but
> > the temperature didn't effectively change.
> > Note this is not a driver issue.
> > Below is a captured debug trace illustrating the purpose of this patch:
> > out of 8 thermal zone updates, only 2 are actually necessary.
> > 
> > [   41.120000] rcar_thermal_work(): cctemp%000
> > [   41.120000] rcar_thermal_work(): new_ctemp0000
> > [   41.120000] rcar_thermal_work(): temp is now 30000C, update thermal zone
> > [   58.990000] rcar_thermal_work(): cctemp0000
> > [   58.990000] rcar_thermal_work(): nctemp0000
> > [   58.990000] rcar_thermal_work(): same temp, do not update thermal zone
> > [   59.290000] rcar_thermal_work(): cctemp0000
> > [   59.290000] rcar_thermal_work(): nctemp0000
> > [   59.290000] rcar_thermal_work(): same temp, do not update thermal zone
> > [   59.590000] rcar_thermal_work(): cctemp0000
> > [   59.590000] rcar_thermal_work(): nctemp0000
> > [   59.590000] rcar_thermal_work(): same temp, do not update thermal zone
> > [   59.890000] rcar_thermal_work(): cctemp0000
> > [   59.890000] rcar_thermal_work(): nctemp0000
> > [   59.890000] rcar_thermal_work(): same temp, do not update thermal zone
> > [   60.190000] rcar_thermal_work(): cctemp0000
> > [   60.190000] rcar_thermal_work(): nctemp0000
> > [   60.190000] rcar_thermal_work(): same temp, do not update thermal zone
> > [   60.490000] rcar_thermal_work(): cctemp0000
> > [   60.490000] rcar_thermal_work(): nctemp0000
> > [   60.490000] rcar_thermal_work(): same temp, do not update thermal zone
> > [   60.790000] rcar_thermal_work(): cctemp0000
> > [   60.790000] rcar_thermal_work(): nctemp5000
> > [   60.790000] rcar_thermal_work(): temp is now 35000C, update thermal zone
> > 
> > I suspect this may be due to sensor sampling accuracy / fluctuation,
> > but no formal proof.
> > 
> > Patrick Titiano (2):
> >   thermal: rcar-thermal: fix same mask applied twice
> >   thermal: rcar-thermal: update thermal zone only when temperature
> >     changes
> > 
> >  drivers/thermal/rcar_thermal.c | 9 +++++++--
> >  1 file changed, 7 insertions(+), 2 deletions(-)
> 
> For all patches
> 
> Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> 
applied.

thanks,
rui
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



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

* Re: [PATCH 0/2] thermal: rcar-thermal: minor fixes
@ 2014-03-03 14:51     ` Zhang Rui
  0 siblings, 0 replies; 12+ messages in thread
From: Zhang Rui @ 2014-03-03 14:51 UTC (permalink / raw)
  To: Kuninori Morimoto
  Cc: Patrick Titiano, magnus.damm, kuninori.morimoto.gx,
	eduardo.valentin, bcousson, linux-pm, linux-sh

On Sun, 2014-03-02 at 15:52 -0800, Kuninori Morimoto wrote:
> Hi
> 
> > Here are 2 minor updates to the rcar-thermal driver.
> > 
> > First patch removes an unecessary mask applied in a if statement.
> > Because the same mask was already applied in the preceding statement,
> > the second one can be removed.
> > 
> > Second patch avoids updating the thermal zone in case an IRQ was triggered but
> > the temperature didn't effectively change.
> > Note this is not a driver issue.
> > Below is a captured debug trace illustrating the purpose of this patch:
> > out of 8 thermal zone updates, only 2 are actually necessary.
> > 
> > [   41.120000] rcar_thermal_work(): cctemp=25000
> > [   41.120000] rcar_thermal_work(): new_ctemp=30000
> > [   41.120000] rcar_thermal_work(): temp is now 30000C, update thermal zone
> > [   58.990000] rcar_thermal_work(): cctemp=30000
> > [   58.990000] rcar_thermal_work(): nctemp=30000
> > [   58.990000] rcar_thermal_work(): same temp, do not update thermal zone
> > [   59.290000] rcar_thermal_work(): cctemp=30000
> > [   59.290000] rcar_thermal_work(): nctemp=30000
> > [   59.290000] rcar_thermal_work(): same temp, do not update thermal zone
> > [   59.590000] rcar_thermal_work(): cctemp=30000
> > [   59.590000] rcar_thermal_work(): nctemp=30000
> > [   59.590000] rcar_thermal_work(): same temp, do not update thermal zone
> > [   59.890000] rcar_thermal_work(): cctemp=30000
> > [   59.890000] rcar_thermal_work(): nctemp=30000
> > [   59.890000] rcar_thermal_work(): same temp, do not update thermal zone
> > [   60.190000] rcar_thermal_work(): cctemp=30000
> > [   60.190000] rcar_thermal_work(): nctemp=30000
> > [   60.190000] rcar_thermal_work(): same temp, do not update thermal zone
> > [   60.490000] rcar_thermal_work(): cctemp=30000
> > [   60.490000] rcar_thermal_work(): nctemp=30000
> > [   60.490000] rcar_thermal_work(): same temp, do not update thermal zone
> > [   60.790000] rcar_thermal_work(): cctemp=30000
> > [   60.790000] rcar_thermal_work(): nctemp=35000
> > [   60.790000] rcar_thermal_work(): temp is now 35000C, update thermal zone
> > 
> > I suspect this may be due to sensor sampling accuracy / fluctuation,
> > but no formal proof.
> > 
> > Patrick Titiano (2):
> >   thermal: rcar-thermal: fix same mask applied twice
> >   thermal: rcar-thermal: update thermal zone only when temperature
> >     changes
> > 
> >  drivers/thermal/rcar_thermal.c | 9 +++++++--
> >  1 file changed, 7 insertions(+), 2 deletions(-)
> 
> For all patches
> 
> Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> 
applied.

thanks,
rui
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



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

* Re: [PATCH 0/2] thermal: rcar-thermal: minor fixes
  2014-03-03 14:51     ` Zhang Rui
@ 2014-03-05 14:45       ` Patrick Titiano
  -1 siblings, 0 replies; 12+ messages in thread
From: Patrick Titiano @ 2014-03-05 14:45 UTC (permalink / raw)
  To: Zhang Rui, Kuninori Morimoto
  Cc: magnus.damm, kuninori.morimoto.gx, eduardo.valentin, bcousson,
	linux-pm, linux-sh



On 03/03/2014 15:51, Zhang Rui wrote:
> On Sun, 2014-03-02 at 15:52 -0800, Kuninori Morimoto wrote:
>> Hi
>>
>>> Here are 2 minor updates to the rcar-thermal driver.
>>>
>>> First patch removes an unecessary mask applied in a if statement.
>>> Because the same mask was already applied in the preceding statement,
>>> the second one can be removed.
>>>
>>> Second patch avoids updating the thermal zone in case an IRQ was triggered but
>>> the temperature didn't effectively change.
>>> Note this is not a driver issue.
>>> Below is a captured debug trace illustrating the purpose of this patch:
>>> out of 8 thermal zone updates, only 2 are actually necessary.
>>>
>>> [   41.120000] rcar_thermal_work(): cctemp%000
>>> [   41.120000] rcar_thermal_work(): new_ctemp0000
>>> [   41.120000] rcar_thermal_work(): temp is now 30000C, update thermal zone
>>> [   58.990000] rcar_thermal_work(): cctemp0000
>>> [   58.990000] rcar_thermal_work(): nctemp0000
>>> [   58.990000] rcar_thermal_work(): same temp, do not update thermal zone
>>> [   59.290000] rcar_thermal_work(): cctemp0000
>>> [   59.290000] rcar_thermal_work(): nctemp0000
>>> [   59.290000] rcar_thermal_work(): same temp, do not update thermal zone
>>> [   59.590000] rcar_thermal_work(): cctemp0000
>>> [   59.590000] rcar_thermal_work(): nctemp0000
>>> [   59.590000] rcar_thermal_work(): same temp, do not update thermal zone
>>> [   59.890000] rcar_thermal_work(): cctemp0000
>>> [   59.890000] rcar_thermal_work(): nctemp0000
>>> [   59.890000] rcar_thermal_work(): same temp, do not update thermal zone
>>> [   60.190000] rcar_thermal_work(): cctemp0000
>>> [   60.190000] rcar_thermal_work(): nctemp0000
>>> [   60.190000] rcar_thermal_work(): same temp, do not update thermal zone
>>> [   60.490000] rcar_thermal_work(): cctemp0000
>>> [   60.490000] rcar_thermal_work(): nctemp0000
>>> [   60.490000] rcar_thermal_work(): same temp, do not update thermal zone
>>> [   60.790000] rcar_thermal_work(): cctemp0000
>>> [   60.790000] rcar_thermal_work(): nctemp5000
>>> [   60.790000] rcar_thermal_work(): temp is now 35000C, update thermal zone
>>>
>>> I suspect this may be due to sensor sampling accuracy / fluctuation,
>>> but no formal proof.
>>>
>>> Patrick Titiano (2):
>>>   thermal: rcar-thermal: fix same mask applied twice
>>>   thermal: rcar-thermal: update thermal zone only when temperature
>>>     changes
>>>
>>>  drivers/thermal/rcar_thermal.c | 9 +++++++--
>>>  1 file changed, 7 insertions(+), 2 deletions(-)
>>
>> For all patches
>>
>> Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
>>
> applied.
> 
> thanks,
> rui
>>

Thanks Morimoto-san and Rui!
Patrick.


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

* Re: [PATCH 0/2] thermal: rcar-thermal: minor fixes
@ 2014-03-05 14:45       ` Patrick Titiano
  0 siblings, 0 replies; 12+ messages in thread
From: Patrick Titiano @ 2014-03-05 14:45 UTC (permalink / raw)
  To: Zhang Rui, Kuninori Morimoto
  Cc: magnus.damm, kuninori.morimoto.gx, eduardo.valentin, bcousson,
	linux-pm, linux-sh



On 03/03/2014 15:51, Zhang Rui wrote:
> On Sun, 2014-03-02 at 15:52 -0800, Kuninori Morimoto wrote:
>> Hi
>>
>>> Here are 2 minor updates to the rcar-thermal driver.
>>>
>>> First patch removes an unecessary mask applied in a if statement.
>>> Because the same mask was already applied in the preceding statement,
>>> the second one can be removed.
>>>
>>> Second patch avoids updating the thermal zone in case an IRQ was triggered but
>>> the temperature didn't effectively change.
>>> Note this is not a driver issue.
>>> Below is a captured debug trace illustrating the purpose of this patch:
>>> out of 8 thermal zone updates, only 2 are actually necessary.
>>>
>>> [   41.120000] rcar_thermal_work(): cctemp=25000
>>> [   41.120000] rcar_thermal_work(): new_ctemp=30000
>>> [   41.120000] rcar_thermal_work(): temp is now 30000C, update thermal zone
>>> [   58.990000] rcar_thermal_work(): cctemp=30000
>>> [   58.990000] rcar_thermal_work(): nctemp=30000
>>> [   58.990000] rcar_thermal_work(): same temp, do not update thermal zone
>>> [   59.290000] rcar_thermal_work(): cctemp=30000
>>> [   59.290000] rcar_thermal_work(): nctemp=30000
>>> [   59.290000] rcar_thermal_work(): same temp, do not update thermal zone
>>> [   59.590000] rcar_thermal_work(): cctemp=30000
>>> [   59.590000] rcar_thermal_work(): nctemp=30000
>>> [   59.590000] rcar_thermal_work(): same temp, do not update thermal zone
>>> [   59.890000] rcar_thermal_work(): cctemp=30000
>>> [   59.890000] rcar_thermal_work(): nctemp=30000
>>> [   59.890000] rcar_thermal_work(): same temp, do not update thermal zone
>>> [   60.190000] rcar_thermal_work(): cctemp=30000
>>> [   60.190000] rcar_thermal_work(): nctemp=30000
>>> [   60.190000] rcar_thermal_work(): same temp, do not update thermal zone
>>> [   60.490000] rcar_thermal_work(): cctemp=30000
>>> [   60.490000] rcar_thermal_work(): nctemp=30000
>>> [   60.490000] rcar_thermal_work(): same temp, do not update thermal zone
>>> [   60.790000] rcar_thermal_work(): cctemp=30000
>>> [   60.790000] rcar_thermal_work(): nctemp=35000
>>> [   60.790000] rcar_thermal_work(): temp is now 35000C, update thermal zone
>>>
>>> I suspect this may be due to sensor sampling accuracy / fluctuation,
>>> but no formal proof.
>>>
>>> Patrick Titiano (2):
>>>   thermal: rcar-thermal: fix same mask applied twice
>>>   thermal: rcar-thermal: update thermal zone only when temperature
>>>     changes
>>>
>>>  drivers/thermal/rcar_thermal.c | 9 +++++++--
>>>  1 file changed, 7 insertions(+), 2 deletions(-)
>>
>> For all patches
>>
>> Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
>>
> applied.
> 
> thanks,
> rui
>>

Thanks Morimoto-san and Rui!
Patrick.


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

end of thread, other threads:[~2014-03-05 14:45 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-28 13:10 [PATCH 0/2] thermal: rcar-thermal: minor fixes Patrick Titiano
2014-02-28 13:10 ` Patrick Titiano
2014-02-28 13:10 ` [PATCH 1/2] thermal: rcar-thermal: fix same mask applied twice Patrick Titiano
2014-02-28 13:10   ` Patrick Titiano
2014-02-28 13:10 ` [PATCH 2/2] thermal: rcar-thermal: update thermal zone only when temperature changes Patrick Titiano
2014-02-28 13:10   ` Patrick Titiano
2014-03-02 23:52 ` [PATCH 0/2] thermal: rcar-thermal: minor fixes Kuninori Morimoto
2014-03-02 23:52   ` Kuninori Morimoto
2014-03-03 14:51   ` Zhang Rui
2014-03-03 14:51     ` Zhang Rui
2014-03-05 14:45     ` Patrick Titiano
2014-03-05 14:45       ` Patrick Titiano

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.