linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Javi Merino <javi.merino@arm.com>
To: Lukasz Majewski <l.majewski@samsung.com>
Cc: Eduardo Valentin <edubezval@gmail.com>,
	Zhang Rui <rui.zhang@intel.com>,
	Kukjin Kim <kgene.kim@samsung.com>, Kukjin Kim <kgene@kernel.org>,
	Linux PM list <linux-pm@vger.kernel.org>,
	"linux-samsung-soc@vger.kernel.org"
	<linux-samsung-soc@vger.kernel.org>,
	Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
	Lukasz Majewski <l.majewski@majess.pl>,
	Amit Daniel Kachhap <amit.daniel@samsung.com>,
	Abhilash Kesavan <kesavan.abhilash@gmail.com>,
	Abhilash Kesavan <a.kesavan@samsung.com>,
	Kyungmin Park <kyungmin.park@samsung.com>,
	Chanwoo Choi <cw00.choi@samsung.com>
Subject: Re: [PATCH 2/2] thermal: of: Enable thermal_zoneX when sensor is correctly added
Date: Tue, 20 Jan 2015 18:26:09 +0000	[thread overview]
Message-ID: <20150120182608.GA5760@e104805> (raw)
In-Reply-To: <1421667844-13627-3-git-send-email-l.majewski@samsung.com>

On Mon, Jan 19, 2015 at 11:44:04AM +0000, Lukasz Majewski wrote:
> Up till now the thermal_zone mode was by default "disabled". With this
> patch the default behavior was changed to "enable".
> 
> One can read the mode at:
> /sys/class/thermal/thermal_zone0/mode
> 
> Reported-by: Abhilash Kesavan <a.kesavan@samsung.com>
> Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>

We are facing the same issue with Juno.  When registering thermal
zones from device tree they were coming up disabled.  I've tested it
on my Juno board and it fixes it.

Tested-by: Javi Merino <javi.merino@arm.com>

> ---
>  drivers/thermal/of-thermal.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/thermal/of-thermal.c b/drivers/thermal/of-thermal.c
> index d717f3d..668fb1b 100644
> --- a/drivers/thermal/of-thermal.c
> +++ b/drivers/thermal/of-thermal.c
> @@ -497,6 +497,9 @@ thermal_zone_of_sensor_register(struct device *dev, int sensor_id, void *data,
>  		if (sensor_specs.np == sensor_np && id == sensor_id) {
>  			tzd = thermal_zone_of_add_sensor(child, sensor_np,
>  							 data, ops);
> +			if (!IS_ERR(tzd))
> +				tzd->ops->set_mode(tzd, THERMAL_DEVICE_ENABLED);
> +
>  			of_node_put(sensor_specs.np);
>  			of_node_put(child);
>  			goto exit;

      reply	other threads:[~2015-01-20 18:26 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-19 11:44 [PATCH 0/2] thermal: Set default thermal_zoneX mode to "enabled" Lukasz Majewski
2015-01-19 11:44 ` [PATCH 1/2] thermal: exynos: Reorder exynos_map_dt_data() function Lukasz Majewski
2015-01-22  8:29   ` Abhilash Kesavan
2015-01-22  9:01     ` Lukasz Majewski
2015-01-22 12:32       ` Abhilash Kesavan
2015-01-29 23:06         ` Eduardo Valentin
2015-01-30  8:14           ` Lukasz Majewski
2015-01-30 15:06             ` Abhilash Kesavan
2015-02-02  5:36               ` Abhilash Kesavan
2015-02-04 10:36                 ` Lukasz Majewski
2015-02-04 11:50                   ` Abhilash Kesavan
2015-04-15  6:45             ` Joonyoung Shim
2015-04-15 11:05               ` Lukasz Majewski
2015-04-16  1:01                 ` Joonyoung Shim
2015-04-17 12:39                   ` Lukasz Majewski
2015-04-22  1:34                     ` Joonyoung Shim
2015-04-22  8:49                       ` Lukasz Majewski
2015-01-19 11:44 ` [PATCH 2/2] thermal: of: Enable thermal_zoneX when sensor is correctly added Lukasz Majewski
2015-01-20 18:26   ` Javi Merino [this message]

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=20150120182608.GA5760@e104805 \
    --to=javi.merino@arm.com \
    --cc=a.kesavan@samsung.com \
    --cc=amit.daniel@samsung.com \
    --cc=b.zolnierkie@samsung.com \
    --cc=cw00.choi@samsung.com \
    --cc=edubezval@gmail.com \
    --cc=kesavan.abhilash@gmail.com \
    --cc=kgene.kim@samsung.com \
    --cc=kgene@kernel.org \
    --cc=kyungmin.park@samsung.com \
    --cc=l.majewski@majess.pl \
    --cc=l.majewski@samsung.com \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=rui.zhang@intel.com \
    /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).