cb86577da6
- Add a patch to support drivers with an ACPI "bus" (new Asus atk0110 drv)
65 lines
1.9 KiB
Diff
65 lines
1.9 KiB
Diff
Index: lib/access.c
|
|
===================================================================
|
|
--- lib/access.c (revision 5577)
|
|
+++ 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 interface";
|
|
}
|
|
|
|
/* bus types with several instances */
|
|
Index: lib/sensors.h
|
|
===================================================================
|
|
--- lib/sensors.h (revision 5577)
|
|
+++ 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 5577)
|
|
+++ lib/sysfs.c (working copy)
|
|
@@ -596,6 +596,11 @@
|
|
entry.chip.addr = 0;
|
|
entry.chip.bus.type = SENSORS_BUS_TYPE_ISA;
|
|
entry.chip.bus.nr = 0;
|
|
+ } else if (subsys && !strcmp(subsys, "acpi")) {
|
|
+ entry.chip.bus.type = SENSORS_BUS_TYPE_ACPI;
|
|
+ /* For now we assume that acpi devices are unique */
|
|
+ entry.chip.bus.nr = 0;
|
|
+ entry.chip.addr = 0;
|
|
} else {
|
|
/* Ignore unknown device */
|
|
err = 0;
|
|
Index: lib/data.c
|
|
===================================================================
|
|
--- lib/data.c (revision 5577)
|
|
+++ 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;
|