New Asus board and multiple sensors chips (W83667HG/W83791D/ADT7475)

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

 



Il Sun, Nov 23, 2008 at 04:30:58PM +0100, Jean Delvare ha scritto: 
> On Sun, 23 Nov 2008 16:23:52 +0100, Marco Chiappero wrote:
> > [1] By the way, I patched the lm-sensors package too, the compilation
> > runs fine but "sensors" is still unable to show the atk readings.
> 
> If you use lm-sensors 3.0.2 or later and if the atk0110 driver
> implements the standard sysfs interface (it really should), then you
> shouldn't have to patch anything, it should work out of the box.

It does use the standard interface, but last time I checked the sensor
was ignored since it's attached to the ACPI subsys, I was proposing this
patch:

Index: lib/access.c
===================================================================
--- lib/access.c	(revision 5296)
+++ lib/access.c	(working copy)
@@ -349,6 +349,8 @@
 		return "SPI adapter";
 	case SENSORS_BUS_TYPE_VIRTUAL:
 		return "Virtual device";
+	case SENSORS_BUS_TYPE_ACPI:
+		return "ACPI device";
 	}
 
 	/* bus types with several instances */
Index: lib/sensors.h
===================================================================
--- lib/sensors.h	(revision 5296)
+++ lib/sensors.h	(working copy)
@@ -42,6 +42,7 @@
 #define SENSORS_BUS_TYPE_PCI		2
 #define SENSORS_BUS_TYPE_SPI		3
 #define SENSORS_BUS_TYPE_VIRTUAL	4
+#define SENSORS_BUS_TYPE_ACPI		5
 #define SENSORS_BUS_NR_ANY		(-1)
 #define SENSORS_BUS_NR_IGNORE		(-2)
 
Index: lib/sysfs.c
===================================================================
--- lib/sysfs.c	(revision 5296)
+++ lib/sysfs.c	(working copy)
@@ -579,6 +579,11 @@
 			entry.chip.addr = 0;
 		entry.chip.bus.type = SENSORS_BUS_TYPE_ISA;
 		entry.chip.bus.nr = 0;
+	} else
+	if ((!subsys || !strcmp(subsys, "acpi")) &&
+	    sscanf(dev_name, "%*[a-zA-Z0-9_]:%d", &entry.chip.addr) == 1) {
+		entry.chip.bus.type = SENSORS_BUS_TYPE_ACPI;
+		entry.chip.bus.nr = 0;
 	} else {
 		/* Ignore unknown device */
 		err = 0;
Index: lib/data.c
===================================================================
--- lib/data.c	(revision 5296)
+++ lib/data.c	(working copy)
@@ -111,6 +111,8 @@
 		res->bus.type = SENSORS_BUS_TYPE_SPI;
 	else if (!strncmp(name, "virtual", dash - name))
 		res->bus.type = SENSORS_BUS_TYPE_VIRTUAL;
+	else if (!strncmp(name, "acpi", dash - name))
+		res->bus.type = SENSORS_BUS_TYPE_ACPI;
 	else
 		goto ERROR;
 	name = dash + 1;
@@ -174,6 +176,9 @@
 	case SENSORS_BUS_TYPE_VIRTUAL:
 		return snprintf(str, size, "%s-virtual-%x", chip->prefix,
 				chip->addr);
+	case SENSORS_BUS_TYPE_ACPI:
+		return snprintf(str, size, "%s-acpi-%x", chip->prefix,
+				chip->addr);
 	}
 
 	return -SENSORS_ERR_CHIP_NAME;


Luca
-- 
"Perch? ? cos? che ti frega, la vita. Ti piglia quando hai ancora l'anima
 addormentata e ti semina dentro un'immagine, o un odore, o un suono che
 poi non te lo togli pi?. E quella l? era la felicit?."




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

  Powered by Linux