Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1421611 > unrolled thread

Re: lm-senser can't detect thermal on thermal_zone

Started byZhang Rui <rui.zhang@intel.com>
First post2016-06-14 08:40 +0200
Last post2016-06-14 15:30 +0200
Articles 2 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: lm-senser can't detect thermal on thermal_zone Zhang Rui <rui.zhang@intel.com> - 2016-06-14 08:40 +0200
    Re: lm-senser can't detect thermal on thermal_zone Zhang Rui <rui.zhang@intel.com> - 2016-06-14 15:30 +0200

#1421611 — Re: lm-senser can't detect thermal on thermal_zone

FromZhang Rui <rui.zhang@intel.com>
Date2016-06-14 08:40 +0200
SubjectRe: lm-senser can't detect thermal on thermal_zone
Message-ID<rJQaZ-134-3@gated-at.bofh.it>
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

[toc] | [next] | [standalone]


#1421900

FromZhang Rui <rui.zhang@intel.com>
Date2016-06-14 15:30 +0200
Message-ID<rJWzL-5ng-1@gated-at.bofh.it>
In reply to#1421611
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

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web