Re: [PATCH 3/8] [-mm] ACPI: add ACPI Fan sysfs interface

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
> > 
> > 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
-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux