* lm-senser can't detect thermal on thermal_zone
@ 2016-05-12 8:09 Kuninori Morimoto
2016-05-13 0:44 ` Zhang, Rui
0 siblings, 1 reply; 9+ messages in thread
From: Kuninori Morimoto @ 2016-05-12 8:09 UTC (permalink / raw)
To: Zhang Rui, Linux-Kernel, Eduardo Valentin, linux-pm
Cc: Linux-Renesas, Hiep Cao Minh, shimoda
Hi Zhang, Eduardo
Our platform now is using thermal_zone, but lm-senser became no longer working.
It works on non thermal_zone. we can get current thermal from
/sys/class/thermal/thermal_zone0 on thermal_zone.
What does lm-senser is doing ? and why it doesn't work on thermal_zone ??
-- thermal_zone enable patch --
a8b805f3606f7af7f2b44763d3d6cf05f7c15afd
(ARM: dts: r8a7790: enable to use thermal-zone)
-- lm-senser error on thermal-zone ----
> sensors
No sensors found!
Make sure you loaded all the kernel drivers you need.
Try sensors-detect to find out which these are.
-- thermal-zone / non thermal-zone situation --
non thermal-zon
sensor command: OK
read from /sys/class/thermal/thermal_zone0 : OK
thermal-zon
sensor command: NG
read from /sys/class/thermal/thermal_zone0 : OK
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: lm-senser can't detect thermal on thermal_zone
2016-05-12 8:09 lm-senser can't detect thermal on thermal_zone Kuninori Morimoto
@ 2016-05-13 0:44 ` Zhang, Rui
2016-05-13 2:04 ` Kuninori Morimoto
0 siblings, 1 reply; 9+ messages in thread
From: Zhang, Rui @ 2016-05-13 0:44 UTC (permalink / raw)
To: kuninori.morimoto.gx
Cc: edubezval, linux-kernel, linux-renesas-soc, linux-pm,
yoshihiro.shimoda.uh, cm-hiep
On Thu, 2016-05-12 at 08:09 +0000, Kuninori Morimoto wrote:
> Hi Zhang, Eduardo
>
> Our platform now is using thermal_zone, but lm-senser became no longer working.
> It works on non thermal_zone. we can get current thermal from
> /sys/class/thermal/thermal_zone0 on thermal_zone.
> What does lm-senser is doing ? and why it doesn't work on thermal_zone ??
>
> -- thermal_zone enable patch --
>
> a8b805f3606f7af7f2b44763d3d6cf05f7c15afd
> (ARM: dts: r8a7790: enable to use thermal-zone)
>
> -- lm-senser error on thermal-zone ----
>
> > sensors
> No sensors found!
> Make sure you loaded all the kernel drivers you need.
> Try sensors-detect to find out which these are.
>
> -- thermal-zone / non thermal-zone situation --
>
> non thermal-zon
> sensor command: OK
> read from /sys/class/thermal/thermal_zone0 : OK
>
> thermal-zon
> sensor command: NG
> read from /sys/class/thermal/thermal_zone0 : OK
config THERMAL_HWMON
bool
prompt "Expose thermal sensors as hwmon device"
depends on HWMON=y || HWMON=THERMAL
default y
please check if the thermal subsystem is built in, while hwmon subsystem
is built as module.
you should either set CONFIG_HWMON=y, or set both CONFIG_HWMON and
CONFIG_THERMAL as module.
thanks,
rui
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: lm-senser can't detect thermal on thermal_zone
2016-05-13 0:44 ` Zhang, Rui
@ 2016-05-13 2:04 ` Kuninori Morimoto
2016-05-30 6:28 ` Kuninori Morimoto
0 siblings, 1 reply; 9+ messages in thread
From: Kuninori Morimoto @ 2016-05-13 2:04 UTC (permalink / raw)
To: Zhang, Rui
Cc: edubezval, linux-kernel, linux-renesas-soc, linux-pm,
yoshihiro.shimoda.uh, cm-hiep
Hi Zhang
Thank you for your help
> > non thermal-zon
> > sensor command: OK
> > read from /sys/class/thermal/thermal_zone0 : OK
> >
> > thermal-zon
> > sensor command: NG
> > read from /sys/class/thermal/thermal_zone0 : OK
>
> config THERMAL_HWMON
> bool
> prompt "Expose thermal sensors as hwmon device"
> depends on HWMON=y || HWMON=THERMAL
> default y
>
> please check if the thermal subsystem is built in, while hwmon subsystem
> is built as module.
> you should either set CONFIG_HWMON=y, or set both CONFIG_HWMON and
> CONFIG_THERMAL as module.
Thanks. but it seems our system has it.
I noticed that thermal_zone case uses of_parse_thermal_zones()
and it has this.
/* No hwmon because there might be hwmon drivers registering */
tzp->no_hwmon = true;
and on thermal_zone_device_register() check this for hwmon
struct thermal_zone_device *thermal_zone_device_register(xxxx)
{
...
if (!tz->tzp || !tz->tzp->no_hwmon) {
result = thermal_add_hwmon_sysfs(tz);
...
}
...
}
Does this mean "thermal_zone doesn't use lm-senser" ?
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: lm-senser can't detect thermal on thermal_zone
2016-05-13 2:04 ` Kuninori Morimoto
@ 2016-05-30 6:28 ` Kuninori Morimoto
2016-06-09 3:07 ` Kuninori Morimoto
0 siblings, 1 reply; 9+ messages in thread
From: Kuninori Morimoto @ 2016-05-30 6:28 UTC (permalink / raw)
To: Kuninori Morimoto
Cc: Zhang, Rui, edubezval, linux-kernel, linux-renesas-soc, linux-pm,
yoshihiro.shimoda.uh, cm-hiep
Hi Zhang
Can you check this email ?
> Thank you for your help
>
> > > non thermal-zon
> > > sensor command: OK
> > > read from /sys/class/thermal/thermal_zone0 : OK
> > >
> > > thermal-zon
> > > sensor command: NG
> > > read from /sys/class/thermal/thermal_zone0 : OK
> >
> > config THERMAL_HWMON
> > bool
> > prompt "Expose thermal sensors as hwmon device"
> > depends on HWMON=y || HWMON=THERMAL
> > default y
> >
> > please check if the thermal subsystem is built in, while hwmon subsystem
> > is built as module.
> > you should either set CONFIG_HWMON=y, or set both CONFIG_HWMON and
> > CONFIG_THERMAL as module.
>
> Thanks. but it seems our system has it.
>
> I noticed that thermal_zone case uses of_parse_thermal_zones()
> and it has this.
>
> /* No hwmon because there might be hwmon drivers registering */
> tzp->no_hwmon = true;
>
> and on thermal_zone_device_register() check this for hwmon
>
> struct thermal_zone_device *thermal_zone_device_register(xxxx)
> {
> ...
> if (!tz->tzp || !tz->tzp->no_hwmon) {
> result = thermal_add_hwmon_sysfs(tz);
> ...
> }
> ...
> }
>
> Does this mean "thermal_zone doesn't use lm-senser" ?
Best regards
---
Kuninori Morimoto
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: lm-senser can't detect thermal on thermal_zone
2016-05-30 6:28 ` Kuninori Morimoto
@ 2016-06-09 3:07 ` Kuninori Morimoto
2016-06-14 6:32 ` Zhang Rui
0 siblings, 1 reply; 9+ messages in thread
From: Kuninori Morimoto @ 2016-06-09 3:07 UTC (permalink / raw)
To: Zhang, Rui
Cc: edubezval, linux-kernel, linux-renesas-soc, linux-pm,
yoshihiro.shimoda.uh, cm-hiep
Hi Zhang
Can you check this email ?
> > Thank you for your help
> >
> > > > non thermal-zon
> > > > sensor command: OK
> > > > read from /sys/class/thermal/thermal_zone0 : OK
> > > >
> > > > thermal-zon
> > > > sensor command: NG
> > > > read from /sys/class/thermal/thermal_zone0 : OK
> > >
> > > config THERMAL_HWMON
> > > bool
> > > prompt "Expose thermal sensors as hwmon device"
> > > depends on HWMON=y || HWMON=THERMAL
> > > default y
> > >
> > > please check if the thermal subsystem is built in, while hwmon subsystem
> > > is built as module.
> > > you should either set CONFIG_HWMON=y, or set both CONFIG_HWMON and
> > > CONFIG_THERMAL as module.
> >
> > Thanks. but it seems our system has it.
> >
> > I noticed that thermal_zone case uses of_parse_thermal_zones()
> > and it has this.
> >
> > /* No hwmon because there might be hwmon drivers registering */
> > tzp->no_hwmon = true;
> >
> > and on thermal_zone_device_register() check this for hwmon
> >
> > struct thermal_zone_device *thermal_zone_device_register(xxxx)
> > {
> > ...
> > if (!tz->tzp || !tz->tzp->no_hwmon) {
> > result = thermal_add_hwmon_sysfs(tz);
> > ...
> > }
> > ...
> > }
> >
> > Does this mean "thermal_zone doesn't use lm-senser" ?
>
>
> Best regards
> ---
> Kuninori Morimoto
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: lm-senser can't detect thermal on thermal_zone
2016-06-09 3:07 ` Kuninori Morimoto
@ 2016-06-14 6:32 ` Zhang Rui
2016-06-14 7:03 ` Kuninori Morimoto
0 siblings, 1 reply; 9+ messages in thread
From: Zhang Rui @ 2016-06-14 6:32 UTC (permalink / raw)
To: Kuninori Morimoto
Cc: edubezval, linux-kernel, linux-renesas-soc, linux-pm,
yoshihiro.shimoda.uh, cm-hiep
On Thu, 2016-06-09 at 03:07 +0000, Kuninori Morimoto wrote:
>
> Hi Zhang
>
> Can you check this email ?
>
> >
> > >
> > > Thank you for your help
> > >
> > > >
> > > > >
> > > > > non thermal-zon
> > > > > sensor command: OK
> > > > > read from /sys/class/thermal/thermal_zone0 : OK
> > > > >
> > > > > thermal-zon
> > > > > sensor command: NG
> > > > > read from /sys/class/thermal/thermal_zone0 : OK
> > > > config THERMAL_HWMON
> > > > bool
> > > > prompt "Expose thermal sensors as hwmon device"
> > > > depends on HWMON=y || HWMON=THERMAL
> > > > default y
> > > >
> > > > please check if the thermal subsystem is built in, while hwmon
> > > > subsystem
> > > > is built as module.
> > > > you should either set CONFIG_HWMON=y, or set both CONFIG_HWMON
> > > > and
> > > > CONFIG_THERMAL as module.
> > > Thanks. but it seems our system has it.
> > >
> > > I noticed that thermal_zone case uses of_parse_thermal_zones()
> > > and it has this.
> > >
> > > /* No hwmon because there might be hwmon drivers
> > > registering */
> > > tzp->no_hwmon = true;
> > >
> > > and on thermal_zone_device_register() check this for hwmon
> > >
> > > struct thermal_zone_device *thermal_zone_device_register(xxxx)
> > > {
> > > ...
> > > if (!tz->tzp || !tz->tzp->no_hwmon) {
> > > result = thermal_add_hwmon_sysfs(tz);
> > > ...
> > > }
> > > ...
> > > }
> > >
> > > Does this mean "thermal_zone doesn't use lm-senser" ?
I'd prefer to say of_thermal registered thermal_zone doesn't use lm-
sensor.
If you're really want to see hwmon interface, I think you should use
thermal API (thermal_zone_device_register) directly.
thanks,
rui
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: lm-senser can't detect thermal on thermal_zone
2016-06-14 6:32 ` Zhang Rui
@ 2016-06-14 7:03 ` Kuninori Morimoto
2016-06-14 13:24 ` Zhang Rui
0 siblings, 1 reply; 9+ messages in thread
From: Kuninori Morimoto @ 2016-06-14 7:03 UTC (permalink / raw)
To: Zhang Rui
Cc: edubezval, linux-kernel, linux-renesas-soc, linux-pm,
yoshihiro.shimoda.uh, cm-hiep
Hi Zhang
> > > > struct thermal_zone_device *thermal_zone_device_register(xxxx)
> > > > {
> > > > ...
> > > > if (!tz->tzp || !tz->tzp->no_hwmon) {
> > > > result = thermal_add_hwmon_sysfs(tz);
> > > > ...
> > > > }
> > > > ...
> > > > }
> > > >
> > > > Does this mean "thermal_zone doesn't use lm-senser" ?
>
> I'd prefer to say of_thermal registered thermal_zone doesn't use lm-
> sensor.
> If you're really want to see hwmon interface, I think you should use
> thermal API (thermal_zone_device_register) directly.
Thank you for your feedback.
My driver is supporting both of_thermal and thermal API.
So, switching is not a big deal.
But can you teach me why of_thermal doesn't use lm-senser ??
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: lm-senser can't detect thermal on thermal_zone
2016-06-14 7:03 ` Kuninori Morimoto
@ 2016-06-14 13:24 ` Zhang Rui
2016-06-16 0:23 ` Kuninori Morimoto
0 siblings, 1 reply; 9+ messages in thread
From: Zhang Rui @ 2016-06-14 13:24 UTC (permalink / raw)
To: Kuninori Morimoto
Cc: edubezval, linux-kernel, linux-renesas-soc, linux-pm,
yoshihiro.shimoda.uh, cm-hiep
On 二, 2016-06-14 at 07:03 +0000, Kuninori Morimoto wrote:
> Hi Zhang
>
> >
> > >
> > > >
> > > > >
> > > > > struct thermal_zone_device
> > > > > *thermal_zone_device_register(xxxx)
> > > > > {
> > > > > ...
> > > > > if (!tz->tzp || !tz->tzp->no_hwmon) {
> > > > > result = thermal_add_hwmon_sysfs(tz);
> > > > > ...
> > > > > }
> > > > > ...
> > > > > }
> > > > >
> > > > > Does this mean "thermal_zone doesn't use lm-senser" ?
> > I'd prefer to say of_thermal registered thermal_zone doesn't use
> > lm-
> > sensor.
> > If you're really want to see hwmon interface, I think you should
> > use
> > thermal API (thermal_zone_device_register) directly.
> Thank you for your feedback.
> My driver is supporting both of_thermal and thermal API.
> So, switching is not a big deal.
>
> But can you teach me why of_thermal doesn't use lm-senser ??
I don't know if there is a solid reason that we can not expose the
hwmon interface. But just like the comment says, "/* No hwmon because
there might be hwmon drivers registering */", given that of_thermal
just parses THERMAL data of device tree, it is reasonable to me for
exposing thermal interfaces only.
thanks,
rui
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: lm-senser can't detect thermal on thermal_zone
2016-06-14 13:24 ` Zhang Rui
@ 2016-06-16 0:23 ` Kuninori Morimoto
0 siblings, 0 replies; 9+ messages in thread
From: Kuninori Morimoto @ 2016-06-16 0:23 UTC (permalink / raw)
To: Zhang Rui
Cc: edubezval, linux-kernel, linux-renesas-soc, linux-pm,
yoshihiro.shimoda.uh, cm-hiep
Hi Zhang
Thank you for your feedback
> > > > > > *thermal_zone_device_register(xxxx)
> > > > > > {
> > > > > > ...
> > > > > > if (!tz->tzp || !tz->tzp->no_hwmon) {
> > > > > > result = thermal_add_hwmon_sysfs(tz);
> > > > > > ...
> > > > > > }
> > > > > > ...
> > > > > > }
(snip)
> I don't know if there is a solid reason that we can not expose the
> hwmon interface. But just like the comment says, "/* No hwmon because
> there might be hwmon drivers registering */", given that of_thermal
> just parses THERMAL data of device tree, it is reasonable to me for
> exposing thermal interfaces only.
I see.
I will re-consider my driver, and will send patch.
Thanks
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2016-06-16 0:23 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-12 8:09 lm-senser can't detect thermal on thermal_zone Kuninori Morimoto
2016-05-13 0:44 ` Zhang, Rui
2016-05-13 2:04 ` Kuninori Morimoto
2016-05-30 6:28 ` Kuninori Morimoto
2016-06-09 3:07 ` Kuninori Morimoto
2016-06-14 6:32 ` Zhang Rui
2016-06-14 7:03 ` Kuninori Morimoto
2016-06-14 13:24 ` Zhang Rui
2016-06-16 0:23 ` Kuninori Morimoto
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).