[PATCH 1/4] libsensors: Detect OpenFirmware hwmon devices

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

 



On a QS22 blade, the BMC containing the (ibmpex) power meters is enumerated
via Open Firmware.  Check for "of_platform" to handle this case.

Signed-off-by: Darrick J. Wong <djwong at us.ibm.com>

Index: lm-sensors-3.0.0/lib/sysfs.c
===================================================================
--- lm-sensors-3.0.0.orig/lib/sysfs.c	2008-03-31 16:08:07.000000000 -0700
+++ lm-sensors-3.0.0/lib/sysfs.c	2008-03-31 16:08:14.000000000 -0700
@@ -532,7 +532,8 @@
 		entry.chip.bus.type = SENSORS_BUS_TYPE_PCI;
 		entry.chip.bus.nr = 0;
 	} else
-	if ((!subsys || !strcmp(subsys, "platform"))) {
+	if ((!subsys || !strcmp(subsys, "platform") ||
+			!strcmp(subsys, "of_platform"))) {
 		/* must be new ISA (platform driver) */
 		if (sscanf(dev_name, "%*[a-z0-9_].%d", &entry.chip.addr) != 1)
 			entry.chip.addr = 0;




[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux