Changeset 4144
- Timestamp:
- 09/05/06 14:09:30 (7 years ago)
- Location:
- lm-sensors/trunk
- Files:
-
- 2 modified
-
CHANGES (modified) (1 diff)
-
prog/detect/sensors-detect (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lm-sensors/trunk/CHANGES
r4143 r4144 84 84 Use sysfs for PCI device enumeration 85 85 Add generic PCI SMBus adapter detection 86 Add generic Super-I/O logical device detection 86 87 87 88 -
lm-sensors/trunk/prog/detect/sensors-detect
r4143 r4144 1472 1472 # capabilities (listing such chips here removes the need of manual 1473 1473 # lookup when people report them). 1474 # enter: The password sequence to write to the address register1475 1474 # devid: The device ID(s) we have to match (base device) 1476 1475 # devid_mask (optional): Bitmask to apply before checking the device ID 1477 1476 # logdev: The logical device containing the sensors 1478 # exit (optional): Sequence to write to the address register to exit config1479 # mode. If not provided, a default reset operation is performed.1480 1477 # alias_detect (optional): For chips which can be both on the ISA and the 1481 1478 # I2C bus, a function which detectes whether two entries are the same. 1482 1479 # The function should take three parameters: The ISA address, the 1483 1480 # I2C bus number, and the I2C address. 1481 # Entries are grouped by family. Each family entry has the following fields: 1482 # family: The family name 1483 # guess (optional): Typical logical device address. This lets us do 1484 # generic probing if we fail to recognize the chip. 1485 # enter: The password sequence to write to the address register 1486 # chips: Array of chips 1484 1487 @superio_ids = ( 1485 1488 { 1486 1489 family => "ITE", 1490 guess => 0x290, 1487 1491 enter => 1488 1492 { … … 1717 1721 { 1718 1722 family => "VIA/Winbond/Fintek", 1723 guess => 0x290, 1719 1724 enter => 1720 1725 { … … 2832 2837 } 2833 2838 2839 # Guess if an unknown Super-I/O chip has sensors 2840 sub guess_superio_ld($$$) 2841 { 2842 my ($addrreg, $datareg, $typical_addr) = @_; 2843 my ($oldldn, $ldn, $addr); 2844 2845 # Save logical device number 2846 outb($addrreg, $superio{logdevreg}); 2847 $oldldn = inb($datareg); 2848 2849 for ($ldn = 0; $ldn < 16; $ldn++) { 2850 # Select logical device 2851 outb($addrreg, $superio{logdevreg}); 2852 outb($datareg, $ldn); 2853 2854 # Read base I/O address 2855 outb($addrreg, $superio{basereg}); 2856 $addr = inb($datareg) << 8; 2857 outb($addrreg, $superio{basereg} + 1); 2858 $addr |= inb($datareg); 2859 next unless ($addr & 0xfff8) == $typical_addr; 2860 2861 printf " (logical device \%X has address 0x\%x, could be sensors)\n", 2862 $ldn, $addr; 2863 last; 2864 } 2865 2866 # Be nice, restore original logical device 2867 outb($addrreg, $superio{logdevreg}); 2868 outb($datareg, $oldldn); 2869 } 2870 2834 2871 sub probe_superio($$$) 2835 2872 { … … 2921 2958 } 2922 2959 2923 printf(" Found unknown chip with ID 0x%04x\n", $val) 2924 unless $found; 2960 if (!$found) { 2961 printf("Found unknown chip with ID 0x%04x\n", $val); 2962 # Guess if a logical device could correspond to sensors 2963 guess_superio_ld($addrreg, $datareg, $family->{guess}) 2964 if defined $family->{guess}; 2965 } 2966 2925 2967 exit_superio($addrreg, $datareg); 2926 2968 }
