mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-10 16:30:50 +00:00
Add ACPI bus
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@5593 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
41226b9c8f
commit
11eec21555
5 files changed
+15
No files matched your search
@@ -7,6 +7,8 @@ authors can quickly figure out how to test for the availability of a
|
||||
given new feature.
|
||||
|
||||
0x402 lm-sensors SVN
|
||||
* Added bus type "acpi":
|
||||
#define SENSORS_BUS_TYPE_ACPI
|
||||
* Added support for instantaneous power sensors
|
||||
enum sensors_subfeature_type SENSORS_SUBFEATURE_POWER_INPUT
|
||||
enum sensors_subfeature_type SENSORS_SUBFEATURE_POWER_INPUT_HIGHEST
|
||||
|
||||
@@ -362,6 +362,8 @@ const char *sensors_get_adapter_name(const sensors_bus_id *bus)
|
||||
return "SPI adapter";
|
||||
case SENSORS_BUS_TYPE_VIRTUAL:
|
||||
return "Virtual device";
|
||||
case SENSORS_BUS_TYPE_ACPI:
|
||||
return "ACPI interface";
|
||||
}
|
||||
|
||||
/* bus types with several instances */
|
||||
|
||||
@@ -109,6 +109,8 @@ int sensors_parse_chip_name(const char *name, sensors_chip_name *res)
|
||||
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;
|
||||
@@ -172,6 +174,9 @@ int sensors_snprintf_chip_name(char *str, size_t size,
|
||||
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;
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -596,6 +596,11 @@ static int sensors_read_one_sysfs_chip(const char *dev_path,
|
||||
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;
|
||||
|
||||
Reference in new issue
Block a user