Changeset 5786
- Timestamp:
- 10/18/09 14:05:16 (4 years ago)
- Location:
- lm-sensors/trunk
- Files:
-
- 6 modified
-
CHANGES (modified) (1 diff)
-
doc/libsensors-API.txt (modified) (1 diff)
-
lib/access.c (modified) (1 diff)
-
lib/data.c (modified) (3 diffs)
-
lib/sensors.h (modified) (2 diffs)
-
lib/sysfs.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lm-sensors/trunk/CHANGES
r5784 r5786 4 4 SVN-HEAD 5 5 libsensors: Support upcoming sysfs path to i2c adapters 6 Add support for HID devices 6 7 fancontrol: Check that all referenced sysfs files exist 7 8 Check that all devices match the configuration file -
lm-sensors/trunk/doc/libsensors-API.txt
r5740 r5786 6 6 authors can quickly figure out how to test for the availability of a 7 7 given new feature. 8 9 0x421 lm-sensors SVN 10 * Added bus type "hid": 11 #define SENSORS_BUS_TYPE_HID 8 12 9 13 0x420 lm-sensors 3.1.1 -
lm-sensors/trunk/lib/access.c
r5748 r5786 364 364 case SENSORS_BUS_TYPE_ACPI: 365 365 return "ACPI interface"; 366 /* HID should probably not be there either, but I don't know if 367 HID buses have a name nor where to find it. */ 368 case SENSORS_BUS_TYPE_HID: 369 return "HID adapter"; 366 370 } 367 371 -
lm-sensors/trunk/lib/data.c
r5740 r5786 122 122 else if (!strncmp(name, "acpi", dash - name)) 123 123 res->bus.type = SENSORS_BUS_TYPE_ACPI; 124 else if (!strncmp(name, "hid", dash - name)) 125 res->bus.type = SENSORS_BUS_TYPE_HID; 124 126 else 125 127 goto ERROR; … … 132 134 case SENSORS_BUS_TYPE_I2C: 133 135 case SENSORS_BUS_TYPE_SPI: 136 case SENSORS_BUS_TYPE_HID: 134 137 if (!strncmp(name, "*-", 2)) { 135 138 res->bus.nr = SENSORS_BUS_NR_ANY; … … 188 191 return snprintf(str, size, "%s-acpi-%x", chip->prefix, 189 192 chip->addr); 193 case SENSORS_BUS_TYPE_HID: 194 return snprintf(str, size, "%s-hid-%hd-%x", chip->prefix, 195 chip->bus.nr, chip->addr); 190 196 } 191 197 -
lm-sensors/trunk/lib/sensors.h
r5740 r5786 32 32 API additions like new flags / enum values. The second digit is for tracking 33 33 larger additions like new methods. */ 34 #define SENSORS_API_VERSION 0x42 034 #define SENSORS_API_VERSION 0x421 35 35 36 36 #define SENSORS_CHIP_NAME_PREFIX_ANY NULL … … 44 44 #define SENSORS_BUS_TYPE_VIRTUAL 4 45 45 #define SENSORS_BUS_TYPE_ACPI 5 46 #define SENSORS_BUS_TYPE_HID 6 46 47 #define SENSORS_BUS_NR_ANY (-1) 47 48 #define SENSORS_BUS_NR_IGNORE (-2) -
lm-sensors/trunk/lib/sysfs.c
r5759 r5786 519 519 const char *hwmon_path) 520 520 { 521 int domain, bus, slot, fn ;521 int domain, bus, slot, fn, vendor, product, id; 522 522 int err = -SENSORS_ERR_KERNEL; 523 523 char *bus_attr; … … 613 613 entry.chip.bus.nr = 0; 614 614 entry.chip.addr = 0; 615 } else 616 if (subsys && !strcmp(subsys, "hid") && 617 sscanf(dev_name, "%x:%x:%x.%x", &bus, &vendor, &product, &id) == 4) { 618 entry.chip.bus.type = SENSORS_BUS_TYPE_HID; 619 /* As of kernel 2.6.32, the hid device names don't look good */ 620 entry.chip.bus.nr = bus; 621 entry.chip.addr = id; 615 622 } else { 616 623 /* Ignore unknown device */
