[lm-sensors] [PATCH 2/2] acpi_power_meter: hwmon driver for ACPI 4.0 power meters

Darrick J. Wong djwong at us.ibm.com
Mon Aug 3 22:52:29 CEST 2009

On Mon, Jul 27, 2009 at 02:45:55PM +0800, Zhang Rui wrote:
> Hi, Darrick,
> great job. :)


> we should at least send a netlink event for an ACPI power meter
> notification, shouldn't we?

Yes, an event would be useful at the very least for when the system starts
capping, though unfortunately there doesn't seem to be a Notify event for when
capping ends.

> we should create the hwmon sysfs I/F for the hwmon device,
> i.e. add the hwmon attributes
> under /sys/devices/LINUXSYS:00/.../ACPI000D:00/hwmon0/
> rather than /sys/devices/LINUXSYS:00/.../ACPI000D:00/

Hee, this is a tricky matter.  The other hwmon drivers create sysfs attributes
under the sysfs object, not in a separate "hwmonX" object, and as I recall
libsensors reads symlinks under the device object to figure out which bus the
sensor device lives on.  If it can't figure that out, it ignores the hwmon

> 	  if (acpi_disable)
> 		return -ENODEV;


> plus, _PMD is not supported in this driver, right?
> I agree with Yakui that we can create some ACPI device sysfs attributes
> besides the hwmon ones. e.g. exporting devices measured by the current
> ACPI power meter device to user space.

I agree.


More information about the lm-sensors mailing list