Changeset 4689
- Timestamp:
- 08/19/07 17:07:05 (6 years ago)
- Location:
- lm-sensors/branches/lm-sensors-3.0.0
- Files:
-
- 5 modified
-
CHANGES (modified) (1 diff)
-
lib/access.c (modified) (1 diff)
-
lib/data.c (modified) (2 diffs)
-
lib/sensors.h (modified) (1 diff)
-
lib/sysfs.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
lm-sensors/branches/lm-sensors-3.0.0/CHANGES
r4677 r4689 24 24 New function sensors_snprintf_chip_name() 25 25 Drop support for dashes in chip names 26 Add support for devices on SPI adapters 26 27 Makefile: Drop the package and version targets 27 28 Man page sensors.conf.5: Update the chip statement section -
lm-sensors/branches/lm-sensors-3.0.0/lib/access.c
r4687 r4689 323 323 case SENSORS_BUS_TYPE_PCI: 324 324 return "PCI adapter"; 325 /* SPI should not be here, but for now SPI adapters have no name 326 so we don't have any custom string to return. */ 327 case SENSORS_BUS_TYPE_SPI: 328 return "SPI adapter"; 325 329 } 326 330 -
lm-sensors/branches/lm-sensors-3.0.0/lib/data.c
r4688 r4689 107 107 else if (!strncmp(name, "pci", dash - name)) 108 108 res->bus.type = SENSORS_BUS_TYPE_PCI; 109 else if (!strncmp(name, "spi", dash - name)) 110 res->bus.type = SENSORS_BUS_TYPE_SPI; 109 111 else 110 112 goto ERROR; 111 113 name = dash + 1; 112 114 113 /* Some bus types (i2c ) have an additional bus number. For these, the114 next part is either a "*" (any bus of that type) or a decimal115 number. */115 /* Some bus types (i2c, spi) have an additional bus number. 116 For these, the next part is either a "*" (any bus of that type) 117 or a decimal number. */ 116 118 switch (res->bus.type) { 117 119 case SENSORS_BUS_TYPE_I2C: 120 case SENSORS_BUS_TYPE_SPI: 118 121 if (!strncmp(name, "*-", 2)) { 119 122 res->bus.nr = SENSORS_BUS_NR_ANY; … … 163 166 return snprintf(str, size, "%s-i2c-%hd-%02x", chip->prefix, 164 167 chip->bus.nr, chip->addr); 168 case SENSORS_BUS_TYPE_SPI: 169 return snprintf(str, size, "%s-spi-%hd-%x", chip->prefix, 170 chip->bus.nr, chip->addr); 165 171 } 166 172 -
lm-sensors/branches/lm-sensors-3.0.0/lib/sensors.h
r4688 r4689 34 34 #define SENSORS_BUS_TYPE_ISA 1 35 35 #define SENSORS_BUS_TYPE_PCI 2 36 #define SENSORS_BUS_TYPE_SPI 3 36 37 #define SENSORS_BUS_NR_ANY (-1) 37 38 #define SENSORS_BUS_NR_IGNORE (-2) -
lm-sensors/branches/lm-sensors-3.0.0/lib/sysfs.c
r4687 r4689 253 253 } 254 254 } 255 } else if (sscanf(dev->name, "spi%hd.%d", &entry.chip.bus.nr, 256 &entry.chip.addr) == 2) { 257 /* SPI */ 258 entry.chip.bus.type = SENSORS_BUS_TYPE_SPI; 255 259 } else if (sscanf(dev->name, "%*[a-z0-9_].%d", &entry.chip.addr) == 1) { 256 260 /* must be new ISA (platform driver) */
