public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Thomas Renninger <trenn@suse.de>
To: Jean Delvare <khali@linux-fr.org>
Cc: Zhang Rui <rui.zhang@intel.com>, linux-acpi@vger.kernel.org
Subject: Re: Thermal zone names
Date: Mon, 25 Aug 2008 00:06:08 +0200	[thread overview]
Message-ID: <200808250006.09106.trenn@suse.de> (raw)
In-Reply-To: <20080821174852.0689681d@hyperion.delvare>

On Thursday 21 August 2008 05:48:52 pm Jean Delvare wrote:
> Hi Rui,
>
> On Thu, 21 Aug 2008 09:36:20 +0800, Zhang Rui wrote:
> > On Thu, 2008-08-21 at 04:34 +0800, Jean Delvare wrote:
> > > Hi Rui,
> > >
> > > The ACPI thermal zones in /proc/acpi/thermal_zone have a name. The
> > > ACPI
> > > thermal zones in /sys/class/thermal do not.
> >
> > First, the name used in procfs doesn't make sense.
> > It just uses the arbitrary stings exported by BIOS. Some of them is
> > meaningless, and even there may be duplicate names.
>
> I thought that these names were unique identifiers for ACPI?
Theoretically no: You can have the same device name in different scopes.
e.g. XYZ.THERM and ZYX.THERM
while THERM could always be a thermal device.

In practice they must not be identical or we have duplicate names in:
/proc/acpi/thermal_zone/*
The only place where we really saw duplicate entries of the same device type
was for video devices. But this showed the broken design of /proc/acpi which
cannot happen for /sys/bus/acpi/devices/* anymore.

But Zhang is right, the assumption in /proc/ that the names are always unique
was wrong.
>
> > The only benefit is that we can easily figure out which device in the
> > ACPI namespace this interface is for.
> >
> > Second, /sys/class/thermal/thermal_zoneX/device is the symbol link to
> > the real device node, and there is a sysfs I/F named "path" which can be
> > used for the same purpose (find corresponding devices in ACPI namespace)
> >
> > so it's okay that the ACPI thermal zones in /sys/class/thermal doesn't
> > have a name.
>
> For lm-sensors users, the fact that the information is available
> somewhere in sysfs isn't too interesting. Either the name is used as
> the default label, or it's not.
I found a function inside a thermal zone on an HP which seem to be the name.
It is not mentioned in the spec, but we could document that and tell vendors 
to use it. Hmm, it should start with "_" if this should get specified at 
later time?

I post a little RFC patch which makes use of this one as a hwmon thermal 
device/zone name.
Totally untested...

        Thomas

  reply	other threads:[~2008-08-24 22:06 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-20 20:34 Thermal zone names Jean Delvare
2008-08-21  1:36 ` Zhang Rui
2008-08-21 15:48   ` Jean Delvare
2008-08-24 22:06     ` Thomas Renninger [this message]
2008-08-24 22:11     ` [RFC PATCH] Read name/location of thermal zone from ACPI function and pass it to hwmon Thomas Renninger
2008-08-24 22:11     ` [PATCH 1/2] patch acpi_introduce_evaluate_string.patch Thomas Renninger
2008-08-25  1:31       ` Zhao Yakui
2008-08-24 22:11     ` [PATCH 2/2] Give ACPI hwmon thermal devices a name if BIOS provides one Thomas Renninger
2008-08-24 22:20       ` Thomas Renninger
2008-08-25  2:15         ` Zhang Rui
2008-08-25 10:48           ` Thomas Renninger
2008-08-25  1:58       ` Zhang Rui
2008-08-25  7:44         ` Jean Delvare

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=200808250006.09106.trenn@suse.de \
    --to=trenn@suse.de \
    --cc=khali@linux-fr.org \
    --cc=linux-acpi@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