public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Zhang Rui <rui.zhang@intel.com>
To: Len Brown <lenb@kernel.org>
Cc: "linux-acpi@vger" <linux-acpi@vger.kernel.org>,
	"Karasyov, Konstantin A" <konstantin.a.karasyov@intel.com>
Subject: Re: [PATCH 3/8] [-mm] ACPI: add ACPI Fan sysfs interface
Date: Thu, 22 Mar 2007 14:02:15 +0800	[thread overview]
Message-ID: <1174543335.8833.147.camel@localhost.localdomain> (raw)
In-Reply-To: <200703220047.51688.lenb@kernel.org>

On Thu, 2007-03-22 at 00:47 -0400, Len Brown wrote:
> On Tuesday 20 March 2007 05:21, Zhang Rui wrote:
> > From: Zhang Rui <rui.zhang@intel.com>
> > 
> > Add ACPI Fan device sysfs interface.
> > 
> > Attribute	Mode	Description
> > state		RW	Fan state.
> > 			0: Fan is in D0 state(on).
> > 			3: Fan is in D3 state(off).
> 
> I hate the current /proc/acpi/fan/*/interface,
> and don't think we should carry it forward into sysfs.
> 
As a ACPI control method fan, the value of "state" indicates which D
state the fan is currently in or we want to set it to.
As only D0 and D3 states are available for most of the devices, D0 is
recognised as "on" while D3 is "off".
> Forced to propose an alternative, I'd say:
> 
> 0: off
> 1: on-lowest speed
> 2: on-next faster speed
> 3: on-next faster speed
> ...
> n: maximum speed
> 
> Where n may be device dependent -- probably exported in an additional file.
> 
> So the state file would show the number, not the words on/off
> (because, echo "on" and "off" into the file has no effect,
>  which is the confusing mess we have today)
> 
> Note that for some systems, the different fan speeds are actually
> exported as multiple fan devices, each with a simple on/off.
> 
We don't have any ACPI methods to export this kind of information(exact
fan speed) for ACPI control method fan. All these different state/speed
are mapped into multiple ACPI fan devices with different D-state.

I agree that it would be better to use a more generic interface.
As you can see here:
http://marc.info/?l=linux-acpi&m=117267338700447&w=2

I'd say hwmon style sysfs interface for ACPI fan and thermal zone
devices is a good choice which we have discussed in the mail list about
two weeks ago. :)

Thanks,
Rui

  reply	other threads:[~2007-03-22  6:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-20  9:21 [PATCH 3/8] [-mm] ACPI: add ACPI Fan sysfs interface Zhang Rui
2007-03-22  4:47 ` Len Brown
2007-03-22  6:02   ` Zhang Rui [this message]
2007-03-22 12:04   ` Henrique de Moraes Holschuh

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=1174543335.8833.147.camel@localhost.localdomain \
    --to=rui.zhang@intel.com \
    --cc=konstantin.a.karasyov@intel.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    /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