Changeset 4357
- Timestamp:
- 04/03/07 14:55:30 (2 years ago)
- Files:
-
- lm-sensors/branches/lm-sensors-3.0.0/CHANGES (modified) (1 diff)
- lm-sensors/branches/lm-sensors-3.0.0/Makefile (modified) (1 diff)
- lm-sensors/branches/lm-sensors-3.0.0/README (modified) (2 diffs)
- lm-sensors/branches/lm-sensors-3.0.0/doc/busses/i2c-piix4 (modified) (1 diff)
- lm-sensors/branches/lm-sensors-3.0.0/doc/busses/i2c-viapro (modified) (3 diffs)
- lm-sensors/branches/lm-sensors-3.0.0/doc/chips/SUMMARY (modified) (1 diff)
- lm-sensors/branches/lm-sensors-3.0.0/doc/chips/lm90 (modified) (1 diff)
- lm-sensors/branches/lm-sensors-3.0.0/doc/chips/max6650 (modified) (6 diffs)
- lm-sensors/branches/lm-sensors-3.0.0/doc/chips/smsc47m1 (modified) (2 diffs)
- lm-sensors/branches/lm-sensors-3.0.0/doc/useful_addresses.html (modified) (1 diff)
- lm-sensors/branches/lm-sensors-3.0.0/etc/sensors.conf.eg (modified) (1 diff)
- lm-sensors/branches/lm-sensors-3.0.0/kernel/busses/i2c-ali1563.c (modified) (4 diffs)
- lm-sensors/branches/lm-sensors-3.0.0/kernel/busses/i2c-amd8111.c (modified) (10 diffs)
- lm-sensors/branches/lm-sensors-3.0.0/kernel/busses/i2c-nforce2.c (modified) (2 diffs)
- lm-sensors/branches/lm-sensors-3.0.0/kernel/busses/i2c-piix4.c (modified) (3 diffs)
- lm-sensors/branches/lm-sensors-3.0.0/kernel/busses/i2c-viapro.c (modified) (5 diffs)
- lm-sensors/branches/lm-sensors-3.0.0/kernel/chips/adm1024.c (modified) (1 diff)
- lm-sensors/branches/lm-sensors-3.0.0/kernel/chips/adm1025.c (modified) (1 diff)
- lm-sensors/branches/lm-sensors-3.0.0/kernel/chips/adm1026.c (modified) (1 diff)
- lm-sensors/branches/lm-sensors-3.0.0/kernel/chips/bmcsensors.c (modified) (3 diffs)
- lm-sensors/branches/lm-sensors-3.0.0/kernel/chips/fscher.c (modified) (1 diff)
- lm-sensors/branches/lm-sensors-3.0.0/kernel/chips/fscpos.c (modified) (1 diff)
- lm-sensors/branches/lm-sensors-3.0.0/kernel/chips/fscscy.c (modified) (1 diff)
- lm-sensors/branches/lm-sensors-3.0.0/kernel/chips/it87.c (modified) (1 diff)
- lm-sensors/branches/lm-sensors-3.0.0/kernel/chips/lm78.c (modified) (1 diff)
- lm-sensors/branches/lm-sensors-3.0.0/kernel/chips/lm85.c (modified) (1 diff)
- lm-sensors/branches/lm-sensors-3.0.0/kernel/chips/lm90.c (modified) (1 diff)
- lm-sensors/branches/lm-sensors-3.0.0/kernel/chips/maxilife.c (modified) (1 diff)
- lm-sensors/branches/lm-sensors-3.0.0/kernel/chips/mic74.c (modified) (1 diff)
- lm-sensors/branches/lm-sensors-3.0.0/kernel/chips/sis5595.c (modified) (1 diff)
- lm-sensors/branches/lm-sensors-3.0.0/kernel/chips/smsc47m1.c (modified) (23 diffs)
- lm-sensors/branches/lm-sensors-3.0.0/kernel/chips/w83627hf.c (modified) (1 diff)
- lm-sensors/branches/lm-sensors-3.0.0/kernel/chips/w83781d.c (modified) (1 diff)
- lm-sensors/branches/lm-sensors-3.0.0/lib/Module.mk (modified) (1 diff)
- lm-sensors/branches/lm-sensors-3.0.0/lib/chips.c (modified) (6 diffs)
- lm-sensors/branches/lm-sensors-3.0.0/lib/chips.h (modified) (2 diffs)
- lm-sensors/branches/lm-sensors-3.0.0/lib/proc.c (modified) (3 diffs)
- lm-sensors/branches/lm-sensors-3.0.0/lib/sysfs.c (modified) (2 diffs)
- lm-sensors/branches/lm-sensors-3.0.0/lm_sensors.lsm (modified) (1 diff)
- lm-sensors/branches/lm-sensors-3.0.0/mkpatch/mkpatch.pl (modified) (3 diffs)
- lm-sensors/branches/lm-sensors-3.0.0/prog/detect/i2cdetect.8 (modified) (2 diffs)
- lm-sensors/branches/lm-sensors-3.0.0/prog/detect/i2cdetect.c (modified) (1 diff)
- lm-sensors/branches/lm-sensors-3.0.0/prog/detect/sensors-detect (modified) (91 diffs)
- lm-sensors/branches/lm-sensors-3.0.0/prog/dump/i2cdump.c (modified) (7 diffs)
- lm-sensors/branches/lm-sensors-3.0.0/prog/dump/isadump.c (modified) (2 diffs)
- lm-sensors/branches/lm-sensors-3.0.0/prog/pwm/fancontrol.pl (modified) (4 diffs)
- lm-sensors/branches/lm-sensors-3.0.0/prog/sensors/chips.c (modified) (10 diffs)
- lm-sensors/branches/lm-sensors-3.0.0/prog/sensors/chips.h (modified) (2 diffs)
- lm-sensors/branches/lm-sensors-3.0.0/prog/sensors/main.c (modified) (5 diffs)
- lm-sensors/branches/lm-sensors-3.0.0/version.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
lm-sensors/branches/lm-sensors-3.0.0/CHANGES
r4301 r4357 3 3 4 4 SVN HEAD 5 File sensors.conf.eg: Add a dme1737 section 6 Library: Clean up pwm symbol names translation 7 Add dme1737 support 8 Program isadump: Detect when address bit 7 is a busy flag 9 Program sensors: Drop ddcmon and eeprom support 10 Add dme1737 support 11 Program sensors-detect: Stop Super-I/O probe after first family success 12 Fix SMSC DME1737 detection 13 14 15 2.10.3 (20070319) 16 Library: Do not skip i2c adapters with only a class device and no 17 physical device. This change is required to survive the 18 planned struct class_dev removal from future 2.6 kernels. 19 Add support for the SMSC LPC47M292 fans (prefix smsc47m2) 20 Recognize i2c-isa-based devices as such even after class_dev 21 is gone 22 Compile with -D_REENTRANT 23 Fix support of Linux 2.6's max6650 driver 24 Fix max1619 support 25 Man page i2cdetect.8: Scanning range can be restricted 26 Module bmcsensors: Fix debugging messages 27 Module i2c-ali1563: Improve the status messages (2.6 backport) 28 Fix device initialization (2.6 backport) 29 Module i2c-amd8111: Cleanups (2.6 backport) 30 Fix initialization race (2.6 backport) 31 Module i2c-nforce2: Drop unused reference to pci_dev (2.6 backport) 32 Module i2c-piix4: Add ATI SB600 support (2.6 backport) 33 Module i2c-viapro: Add CX700 support (2.6 backport) 34 Module smsc47m1: Add SMSC LPC47M292 support 35 Get rid of a useless semaphore (2.6 backport) 36 Programs i2cdetect, i2cdump, isadump: Flush output in real time 37 Program i2cdump: Cleaner output in SMBus block read mode 38 Program fancontrol.pl: Fix pwmN_enable access (#2190) 39 Program sensors: Add smsc47m2 support (fans) 40 Fix -A option (hide adapter name) on error 41 Program sensors-detect: Only probe relevant I2C addresses 42 Drop ARP-capable device detection 43 Add Maxim MAX6655/MAX6656 detection 44 (Olexiy Avramchenko) 45 Add Maxim MAX1668, MAX1805, MAX1989 detection 46 Add VIA CX700 detection 47 Drop legacy W83627HF ISA detection 48 Don't bufferize stdout during probes 49 Speed up the LM75 and LM77 detection 50 Clean up the EEPROM detection 51 Add Dallas DS75 detection 52 Add SMSC LPC47M292 detection 53 Add nVidia MCP61 and MCP65 detection 54 Fix ADM1028 detection 55 Add Nat. Semi. PC8347L Super-I/O detection 56 Add SMSC SCH5504 Super-I/O detection (no sensors) 57 Make the LM78 and W83781D detection safer 58 5 59 6 60 2.10.2 (20070115) lm-sensors/branches/lm-sensors-3.0.0/Makefile
r4272 r4357 280 280 LIBCPPFLAGS := $(LIBCPPFLAGS) -DSYSFS_SUPPORT 281 281 endif 282 LIBCFLAGS := -fpic $(ALL_CFLAGS)282 LIBCFLAGS := -fpic -D_REENTRANT $(ALL_CFLAGS) 283 283 284 284 .PHONY: all user clean install user_install uninstall user_uninstall version package lm-sensors/branches/lm-sensors-3.0.0/README
r4252 r4357 48 48 AMD 8111 SMBus 2.0 49 49 Apple Hydra (used on some PPC machines) 50 ATI IXP200, IXP300, IXP400 50 ATI IXP200, IXP300, IXP400, SB600 51 51 DEC 21272/21274 (Tsunami/Typhoon - on Alpha boards) 52 52 Intel ICH/ICH0/ICH2/ICH3/ICH4/ICH5/ICH6/ICH7/ICH8/ICH9 (82801xx) … … 61 61 3Dfx Voodoo 3 and Banshee 62 62 VIA Technologies VT82C586B, VT82C596A/B, VT82C686A/B, VT8231, 63 VT8233, VT8233A, VT8235, VT8237R/A and VT825163 VT8233, VT8233A, VT8235, VT8237R/A, VT8251, CX700 64 64 65 65 lm-sensors/branches/lm-sensors-3.0.0/doc/busses/i2c-piix4
r4064 r4357 10 10 * ServerWorks OSB4, CSB5, CSB6 and HT-1000 southbridges 11 11 Datasheet: Only available via NDA from ServerWorks 12 * ATI IXP southbridges IXP200, IXP300, IXP40012 * ATI IXP200, IXP300, IXP400 and SB600 southbridges 13 13 Datasheet: Not publicly available 14 14 * Standard Microsystems (SMSC) SLC90E66 (Victory66) southbridge lm-sensors/branches/lm-sensors-3.0.0/doc/busses/i2c-viapro
r4127 r4357 11 11 12 12 * VIA Technologies, Inc. VT8231, VT8233, VT8233A, VT8235, VT8237R/A, VT8251 13 Datasheet: available on request from Via 13 Datasheet: available on request and under NDA from VIA 14 15 * VIA Technologies, Inc. CX700 16 Datasheet: available on request and under NDA from VIA 14 17 15 18 Authors: … … 46 49 device 1106:3337 (VT8237A) 47 50 device 1106:3287 (VT8251) 51 device 1106:8324 (CX700) 48 52 49 53 If none of these show up, you should look in the BIOS for settings like … … 53 57 VT8231), this driver supports I2C block transactions. Such transactions 54 58 are mainly useful to read from and write to EEPROMs. 59 60 The CX700 additionally appears to support SMBus PEC, although this driver 61 doesn't implement it. lm-sensors/branches/lm-sensors-3.0.0/doc/chips/SUMMARY
r4259 r4357 221 221 smsc47m192 - - 2 2 no yes (LPC) 222 222 smsc47m997 - - 2 2 no yes (LPC) 223 (reported as a "smsc47m2") 224 smsc47m292 - - 3 3 no yes (LPC) 223 225 224 226 thmc50 lm-sensors/branches/lm-sensors-3.0.0/doc/chips/lm90
r3181 r4357 177 177 Instead, it will try to write the PEC value to the register (because the 178 178 SMBus Send Byte transaction with PEC is similar to a Write Byte transaction 179 without PEC), which is not what we want. Thus, PEC is explicit ely disabled179 without PEC), which is not what we want. Thus, PEC is explicitly disabled 180 180 on SMBus Send Byte transactions in the lm90 driver. 181 181 lm-sensors/branches/lm-sensors-3.0.0/doc/chips/max6650
r2028 r4357 5 5 ---------- 6 6 7 The MAX6 551 is a fan controller. It has two distinct functions:7 The MAX6651 is a fan controller. It has two distinct functions: 8 8 9 9 1) Speed control, with feedback, for a single fan. The code can write … … 15 15 controlled one. 16 16 17 The MAX6 550 is similar but only has one measurement tachometer.17 The MAX6650 is similar but only has one measurement tachometer. 18 18 19 19 Both chips have a few general purpose i/o pins, some of which can be … … 23 23 http://www.maxim-ic.com/quick_view2.cfm/qv_pk/2296/ln/en 24 24 25 If that has moved searching for MAX6 550 from Maxim's home page should25 If that has moved searching for MAX6650 from Maxim's home page should 26 26 work. 27 27 … … 80 80 done it. 81 81 82 o It does not differentiate between a MAX6 550 and a MAX6551, as I can83 see no obvious way to do this. It has only been tested with a MAX6 55184 so if anyone gets a board with a MAX6 550 to test with maybe something82 o It does not differentiate between a MAX6650 and a MAX6651, as I can 83 see no obvious way to do this. It has only been tested with a MAX6651 84 so if anyone gets a board with a MAX6650 to test with maybe something 85 85 will be revealed, such as the three missing tachometer registers 86 86 returning all ones or something. (OK, so maybe I should have called … … 97 97 register, but there are several registers with all zero bits at the 98 98 high end. The driver checks that all of these are in fact zero before 99 declaring the chip to be a MAX6 550/1.99 declaring the chip to be a MAX6650/1. 100 100 101 101 sensors-detect … … 103 103 104 104 Support for MAX6650/1 has been added to sensors-detect. It has been 105 tested as correctly detecting a MAX6 551 at I2C address 0x1B. Like the105 tested as correctly detecting a MAX6651 at I2C address 0x1B. Like the 106 106 driver, it cannot yet distinguish a MAX6650 and MAX6651. 107 107 lm-sensors/branches/lm-sensors-3.0.0/doc/chips/smsc47m1
r4218 r4357 17 17 http://www.smsc.com/main/tools/discontinued/47m15x.pdf 18 18 http://www.smsc.com/main/datasheets/47m192.pdf 19 * SMSC LPC47M292 20 Prefix: 'smsc47m2' 21 Addresses scanned: none, address read from Super I/O config space 22 Datasheet: Not public 19 23 * SMSC LPC47M997 20 24 Addresses scanned: none, address read from Super I/O config space … … 42 46 contain monitoring and PWM control circuitry for two fans. 43 47 44 The 47M15x and 47M192 chips contain a full 'hardware monitoring block'45 in addition to the fan monitoring and control. The hardware monitoring 46 block is not supported by the driver.48 The LPC47M15x, LPC47M192 and LPC47M292 chips contain a full 'hardware 49 monitoring block' in addition to the fan monitoring and control. The 50 hardware monitoring block is not supported by the driver. 47 51 48 52 No documentation is available for the 47M997, but it has the same device lm-sensors/branches/lm-sensors-3.0.0/doc/useful_addresses.html
r4226 r4357 157 157 As far we know only one motherboard manufacturer provides sensors.conf files:</p> 158 158 <ul> 159 <li><a href="http://www.tyan.com/support/html/software_utilities.html#lms">TYAN motherboads sensors.conf 160 files database</a></li> 159 <li><a href="http://www.tyan.com/archive/support/html/software_utilities.html#lms">TYAN motherboads sensors.conf 160 files database (archive link)</a></li> 161 <li><a href="ftp://ftp.tyan.com/software/lms/">TYAN motherboads sensors.conf 162 files database (ftp link)</a> 163 </li> 161 164 </ul> 162 165 lm-sensors/branches/lm-sensors-3.0.0/etc/sensors.conf.eg
r4264 r4357 2814 2814 label temp3 "Core1 Temp" 2815 2815 label temp4 "Core1 Temp" 2816 2817 2818 # 2819 # Sample configuration for the SMSC DME1737 and ASUS A8000 2820 # 2821 chip "dme1737-*" 2822 2823 # Voltage inputs 2824 label in0 "V5stby" 2825 label in1 "Vccp" 2826 label in2 "V3.3" 2827 label in3 "V5" 2828 label in4 "V12" 2829 label in5 "V3.3stby" 2830 label in6 "Vbat" 2831 2832 # Temperature inputs 2833 label temp1 "RD1 Temp" 2834 label temp2 "Int Temp" 2835 label temp3 "CPU Temp" 2836 2837 # Fan inputs 2838 label fan1 "CPU_Fan" 2839 label fan2 "Fan2" 2840 label fan3 "Fan3" 2841 label fan4 "Fan4" 2842 label fan5 "Fan5" 2843 label fan6 "Fan6" 2844 2845 # PWM Outputs 2846 label pwm1 "CPU_PWM" 2847 label pwm2 "Fan2_PWM" 2848 label pwm3 "Fan3_PWM" 2849 label pwm5 "Fan5_PWM" 2850 label pwm6 "Fan6_PWM" 2851 2852 # Set voltage limits 2853 # set in0_min 5.0 * 0.95 2854 # set in0_max 5.0 * 1.05 2855 # set in1_min 1.4 * 0.95 2856 # set in1_max 1.4 * 1.05 2857 # set in2_min 3.3 * 0.95 2858 # set in2_max 3.3 * 1.05 2859 # set in3_min 5.0 * 0.95 2860 # set in3_max 5.0 * 1.05 2861 # set in4_min 12.0 * 0.95 2862 # set in4_max 12.0 * 1.05 2863 # set in5_min 3.3 * 0.95 2864 # set in5_max 3.3 * 1.05 2865 # set in6_min 3.0 * 0.95 2866 # set in6_max 3.0 * 1.05 2867 2868 # Set Temp Limits 2869 # set temp1_min 10 2870 # set temp1_max 75 2871 # set temp2_min 10 2872 # set temp2_max 75 2873 # set temp3_min 10 2874 # set temp3_max 75 2875 2876 # Set Fan limits 2877 # set fan1_min 1000 2878 # set fan2_min 1000 2879 # set fan3_min 1000 2880 # set fan4_min 1000 2881 # set fan5_min 1000 2882 # set fan6_min 1000 lm-sensors/branches/lm-sensors-3.0.0/kernel/busses/i2c-ali1563.c
r3149 r4357 327 327 328 328 329 static void ali1563_enable(struct pci_dev * dev)329 static int __devinit ali1563_setup(struct pci_dev * dev) 330 330 { 331 331 u16 ctrl; 332 332 333 333 pci_read_config_word(dev,ALI1563_SMBBA,&ctrl); 334 ctrl |= 0x7;335 pci_write_config_word(dev,ALI1563_SMBBA,ctrl);336 }337 338 static int __devinit ali1563_setup(struct pci_dev * dev)339 {340 u16 ctrl;341 342 pci_read_config_word(dev,ALI1563_SMBBA,&ctrl);343 printk(KERN_DEBUG "ali1563: SMBus control = %04x\n",ctrl);344 345 /* Check if device is even enabled first */346 if (!(ctrl & ALI1563_SMB_IOEN)) {347 printk(KERN_WARNING "ali1563: I/O space not enabled, trying manually\n");348 ali1563_enable(dev);349 }350 if (!(ctrl & ALI1563_SMB_IOEN)) {351 printk(KERN_WARNING "ali1563: I/O space still not enabled, giving up\n");352 goto Err;353 }354 if (!(ctrl & ALI1563_SMB_HOSTEN)) {355 printk(KERN_WARNING "ali1563: Host Controller not enabled\n");356 goto Err;357 }358 334 359 335 /* SMB I/O Base in high 12 bits and must be aligned with the … … 364 340 goto Err; 365 341 } 342 343 /* Check if device is enabled */ 344 if (!(ctrl & ALI1563_SMB_HOSTEN)) { 345 printk(KERN_WARNING "ali1563: Host Controller not enabled\n"); 346 goto Err; 347 } 348 if (!(ctrl & ALI1563_SMB_IOEN)) { 349 printk(KERN_WARNING "I/O space not enabled, trying manually\n"); 350 pci_write_config_word(dev, ALI1563_SMBBA, 351 ctrl | ALI1563_SMB_IOEN); 352 pci_read_config_word(dev, ALI1563_SMBBA, &ctrl); 353 if (!(ctrl & ALI1563_SMB_IOEN)) { 354 printk(KERN_WARNING "I/O space still not enabled, " 355 "giving up\n"); 356 goto Err; 357 } 358 } 359 366 360 if (!request_region(ali1563_smba, ALI1563_SMB_IOSIZE, 367 361 ali1563_pci_driver.name)) { 368 printk(KERN_WARNING "ali1563: Could not allocate I/O space"); 362 printk(KERN_WARNING "ali1563: Could not allocate I/O space " 363 "at 0x%04x\n", ali1563_smba); 369 364 goto Err; 370 365 } 366 printk(KERN_INFO "ali1563: Found ALi1563 SMBus at 0x%04x\n", 367 ali1563_smba); 371 368 372 369 return 0; … … 412 409 int error; 413 410 414 if ((error = ali1563_setup(dev))){ 411 if ((error = ali1563_setup(dev))) { 412 printk(KERN_WARNING "ali1563: ALi1563 SMBus probe failed " 413 "(%d)\n", error); 415 414 return error; 416 415 } … … 419 418 if ((error = i2c_add_adapter(&ali1563_adapter))) 420 419 ali1563_shutdown(dev); 421 printk(KERN_DEBUG "%s: Returning %d\n",__FUNCTION__,error);422 420 return error; 423 421 } lm-sensors/branches/lm-sensors-3.0.0/kernel/busses/i2c-amd8111.c
r3177 r4357 216 216 amd_ec_write(smbus, AMD_SMB_CMD, command); 217 217 if (read_write == I2C_SMBUS_WRITE) { 218 amd_ec_write(smbus, AMD_SMB_DATA, data->word );218 amd_ec_write(smbus, AMD_SMB_DATA, data->word & 0xff); 219 219 amd_ec_write(smbus, AMD_SMB_DATA + 1, data->word >> 8); 220 220 } … … 225 225 amd_ec_write(smbus, AMD_SMB_CMD, command); 226 226 if (read_write == I2C_SMBUS_WRITE) { 227 len = min_t(u8, data->block[0], 32);227 len = min_t(u8, data->block[0], I2C_SMBUS_BLOCK_MAX); 228 228 amd_ec_write(smbus, AMD_SMB_BCNT, len); 229 229 for (i = 0; i < len; i++) … … 234 234 235 235 case I2C_SMBUS_I2C_BLOCK_DATA: 236 len = min_t(u8, data->block[0], 32);236 len = min_t(u8, data->block[0], I2C_SMBUS_BLOCK_MAX); 237 237 amd_ec_write(smbus, AMD_SMB_CMD, command); 238 238 amd_ec_write(smbus, AMD_SMB_BCNT, len); … … 245 245 case I2C_SMBUS_PROC_CALL: 246 246 amd_ec_write(smbus, AMD_SMB_CMD, command); 247 amd_ec_write(smbus, AMD_SMB_DATA, data->word );247 amd_ec_write(smbus, AMD_SMB_DATA, data->word & 0xff); 248 248 amd_ec_write(smbus, AMD_SMB_DATA + 1, data->word >> 8); 249 249 protocol = AMD_SMB_PRTCL_PROC_CALL | pec; … … 252 252 253 253 case I2C_SMBUS_BLOCK_PROC_CALL: 254 len = min_t(u8, data->block[0], 31);254 len = min_t(u8, data->block[0], I2C_SMBUS_BLOCK_MAX - 1); 255 255 amd_ec_write(smbus, AMD_SMB_CMD, command); 256 256 amd_ec_write(smbus, AMD_SMB_BCNT, len); … … 304 304 case I2C_SMBUS_BLOCK_PROC_CALL: 305 305 amd_ec_read(smbus, AMD_SMB_BCNT, &len); 306 len = min_t(u8, len, 32);306 len = min_t(u8, len, I2C_SMBUS_BLOCK_MAX); 307 307 case I2C_SMBUS_I2C_BLOCK_DATA: 308 308 for (i = 0; i < len; i++) … … 355 355 int error; 356 356 357 if ( ~pci_resource_flags(dev, 0) & IORESOURCE_IO)358 return - 1;357 if (!(pci_resource_flags(dev, 0) & IORESOURCE_IO)) 358 return -ENODEV; 359 359 360 360 if (!(smbus = kmalloc(sizeof(struct amd_smbus), GFP_KERNEL))) 361 return - 1;361 return -ENOMEM; 362 362 memset(smbus, 0, sizeof(struct amd_smbus)); 363 363 … … 369 369 if (!request_region(smbus->base, smbus->size, amd8111_driver.name)) { 370 370 kfree(smbus); 371 return - 1;371 return -EBUSY; 372 372 } 373 373 … … 379 379 smbus->adapter.dec_use = amd8111_dec; 380 380 381 pci_write_config_dword(smbus->dev, AMD_PCI_MISC, 0); 382 381 383 error = i2c_add_adapter(&smbus->adapter); 382 384 if (error) { … … 384 386 release_region(smbus->base, smbus->size); 385 387 kfree(smbus); 386 return -1; 387 } 388 389 pci_write_config_dword(smbus->dev, AMD_PCI_MISC, 0); 388 return error; 389 } 390 390 391 391 printk(KERN_INFO "i2c-amd8111.c: AMD8111 SMBus 2.0 adapter at %#x\n", smbus->base); lm-sensors/branches/lm-sensors-3.0.0/kernel/busses/i2c-nforce2.c
r4054 r4357 83 83 84 84 struct nforce2_smbus { 85 struct pci_dev *dev;86 85 struct i2c_adapter adapter; 87 86 int base; … … 337 336 smbus->size = 8; 338 337 } 339 smbus->dev = dev;340 338 341 339 if (!request_region(smbus->base, smbus->size, nforce2_driver.name)) { lm-sensors/branches/lm-sensors-3.0.0/kernel/busses/i2c-piix4.c
r4278 r4357 24 24 Intel PIIX4, 440MX 25 25 Serverworks OSB4, CSB5, CSB6, HT-1000 26 ATI IXP200, IXP300, IXP400 26 ATI IXP200, IXP300, IXP400, SB600 27 27 SMSC Victory66 28 28 … … 439 439 #define PCI_DEVICE_ID_ATI_IXP300_SMBUS 0x4363 440 440 #define PCI_DEVICE_ID_ATI_IXP400_SMBUS 0x4372 441 #define PCI_DEVICE_ID_ATI_IXP600_SMBUS 0x4385 441 442 442 443 #ifndef PCI_DEVICE_ID_SERVERWORKS_CSB6 … … 471 472 .vendor = PCI_VENDOR_ID_ATI, 472 473 .device = PCI_DEVICE_ID_ATI_IXP400_SMBUS, 474 .subvendor = PCI_ANY_ID, 475 .subdevice = PCI_ANY_ID, 476 .driver_data = 0, 477 }, 478 { 479 .vendor = PCI_VENDOR_ID_ATI, 480 .device = PCI_DEVICE_ID_ATI_IXP600_SMBUS, 473 481 .subvendor = PCI_ANY_ID, 474 482 .subdevice = PCI_ANY_ID, lm-sensors/branches/lm-sensors-3.0.0/kernel/busses/i2c-viapro.c
r4125 r4357 5 5 Philip Edelbrock <phil@netroedge.com>, Kyösti Mälkki <kmalkki@cc.hut.fi>, 6 6 Mark D. Studebaker <mdsxyz123@yahoo.com> 7 Copyright (C) 2005 Jean Delvare <khali@linux-fr.org>7 Copyright (C) 2005 - 2007 Jean Delvare <khali@linux-fr.org> 8 8 9 9 This program is free software; you can redistribute it and/or modify … … 37 37 VT8237A 0x3337 yes 38 38 VT8251 0x3287 yes 39 CX700 0x8324 yes 39 40 40 41 Note: we assume there can only be one device, with one SMBus interface. … … 64 65 #define PCI_DEVICE_ID_VIA_8237 0x3227 65 66 #endif 66 /* 8237A is undefined as for the kernel 2.4.33*/67 /* 8237A is undefined */ 67 68 #ifndef PCI_DEVICE_ID_VIA_8237A 68 69 #define PCI_DEVICE_ID_VIA_8237A 0x3337 69 70 #endif 70 /* 8251 is undefined as for the kernel 2.4.33*/71 /* 8251 is undefined */ 71 72 #ifndef PCI_DEVICE_ID_VIA_8251 72 73 #define PCI_DEVICE_ID_VIA_8251 0x3287 74 #endif 75 /* CX700 is undefined */ 76 #ifndef PCI_DEVICE_ID_VIA_CX700 77 #define PCI_DEVICE_ID_VIA_CX700 0x8324 73 78 #endif 74 79 … … 419 424 420 425 switch (id->device) { 426 case PCI_DEVICE_ID_VIA_CX700: 421 427 case PCI_DEVICE_ID_VIA_8251: 422 428 case PCI_DEVICE_ID_VIA_8237: … … 517 523 .driver_data = SMBBA3 518 524 }, 525 { 526 .vendor = PCI_VENDOR_ID_VIA, 527 .device = PCI_DEVICE_ID_VIA_CX700, 528 .subvendor = PCI_ANY_ID, 529 .subdevice = PCI_ANY_ID, 530 .driver_data = SMBBA3 531 }, 519 532 { 0, } 520 533 }; lm-sensors/branches/lm-sensors-3.0.0/kernel/chips/adm1024.c
r3000 r4357 144 144 205-(val)*5) 145 145 146 /* For each registered ADM1024, we need to keep some data in memory. That 147 data is pointed to by adm1024_list[NR]->data. The structure itself is 146 /* For each registered ADM1024, we need to keep some data in memory. It is 148 147 dynamically allocated, at the same time when a new adm1024 client is 149 148 allocated. */ lm-sensors/branches/lm-sensors-3.0.0/kernel/chips/adm1025.c
r3000 r4357 113 113 #define ALARMS_FROM_REG(val) (val) 114 114 115 /* For each registered ADM1025, we need to keep some data in memory. That 116 data is pointed to by adm1025_list[NR]->data. The structure itself is 115 /* For each registered ADM1025, we need to keep some data in memory. It is 117 116 dynamically allocated, at the same time when a new adm1025 client is 118 117 allocated. */ lm-sensors/branches/lm-sensors-3.0.0/kernel/chips/adm1026.c
r3156 r4357 299 299 struct adm1026_data { 300 300 struct i2c_client client; 301 struct semaphore lock;302 301 int sysctl_id; 303 302 enum chips type; lm-sensors/branches/lm-sensors-3.0.0/kernel/chips/bmcsensors.c
r4277 r4357 39 39 40 40 struct bmcsensors_data { 41 struct semaphore lock;42 41 int sysctl_id; 43 42 … … 881 880 state = STATE_READING; 882 881 #ifdef DEBUG 883 printk(KERN_DEBUG "bmcsensors.o: starting update\n" , j);882 printk(KERN_DEBUG "bmcsensors.o: starting update\n"); 884 883 #endif 885 884 bmcsensors_get_reading(client, 0); … … 889 888 bmc_do_pause(HZ / 25); 890 889 #ifdef DEBUG 891 printk( "bmcsensors.o: update complete; j = %d\n", j);890 printk(KERN_DEBUG "bmcsensors.o: update complete; j = %d\n", j); 892 891 #endif 893 892 data->last_updated = jiffies; lm-sensors/branches/lm-sensors-3.0.0/kernel/chips/fscher.c
r3147 r4357 104 104 /* Initial limits */ 105 105 106 /* For each registered FSCHER, we need to keep some data in memory. That 107 data is pointed to by fscher_list[NR]->data. The structure itself is 106 /* For each registered FSCHER, we need to keep some data in memory. It is 108 107 dynamically allocated, at the same time when a new fscher client is 109 108 allocated. */ lm-sensors/branches/lm-sensors-3.0.0/kernel/chips/fscpos.c
r3156 r4357 108 108 /* Initial limits */ 109 109 110 /* For each registered FSCPOS, we need to keep some data in memory. That 111 data is pointed to by fscpos_list[NR]->data. The structure itself is 110 /* For each registered FSCPOS, we need to keep some data in memory. It is 112 111 dynamically allocated, at the same time when a new fscpos client is 113 112 allocated. */ lm-sensors/branches/lm-sensors-3.0.0/kernel/chips/fscscy.c
r3147 r4357 152 152 /* Initial limits */ 153 153 154 /* For each registered FSCSCY, we need to keep some data in memory. That 155 data is pointed to by fscscy_list[NR]->data. The structure itself is 154 /* For each registered FSCSCY, we need to keep some data in memory. It is 156 155 dynamically allocated, at the same time when a new fscscy client is 157 156 allocated. */ lm-sensors/branches/lm-sensors-3.0.0/kernel/chips/it87.c
r3200 r4357 216 216 #define DIV_FROM_REG(val) (1 << (val)) 217 217 218 /* For each registered IT87, we need to keep some data in memory. That 219 data is pointed to by it87_list[NR]->data. The structure itself is 218 /* For each registered IT87, we need to keep some data in memory. It is 220 219 dynamically allocated, at the same time when a new it87 client is 221 220 allocated. */ lm-sensors/branches/lm-sensors-3.0.0/kernel/chips/lm78.c
r3156 r4357 112 112 some corners. */ 113 113 114 /* For each registered LM78, we need to keep some data in memory. That 115 data is pointed to by lm78_list[NR]->data. The structure itself is 114 /* For each registered LM78, we need to keep some data in memory. It is 116 115 dynamically allocated, at the same time when a new lm78 client is 117 116 allocated. */ lm-sensors/branches/lm-sensors-3.0.0/kernel/chips/lm85.c
r3156 r4357 374 374 struct lm85_data { 375 375 struct i2c_client client; 376 struct semaphore lock;377 376 int sysctl_id; 378 377 enum chips type; lm-sensors/branches/lm-sensors-3.0.0/kernel/chips/lm90.c
r3181 r4357 303 303 304 304 /* The ADM1032 supports PEC but not on write byte transactions, so we need 305 to explicit ely ask for a transaction without PEC. */305 to explicitly ask for a transaction without PEC. */ 306 306 static inline s32 adm1032_write_byte(struct i2c_client *client, u8 value) 307 307 { lm-sensors/branches/lm-sensors-3.0.0/kernel/chips/maxilife.c
r3147 r4357 234 234 235 235 /* For each registered MaxiLife controller, we need to keep some data in 236 memory. That data is pointed to by maxi_list[NR]->data. The structure 237 itself is dynamically allocated, at the same time when a new MaxiLife 236 memory. It is dynamically allocated, at the same time when a new MaxiLife 238 237 client is allocated. We assume MaxiLife will only be present on the 239 238 SMBus and not on the ISA bus. */ lm-sensors/branches/lm-sensors-3.0.0/kernel/chips/mic74.c
r3147 r4357 55 55 /* All registers are 0, except for MIC74_REG_DATA which is 0xFF */ 56 56 57 /* For each registered MIC74, we need to keep some data in memory. That 58 data is pointed to by mic74_list[NR]->data. The structure itself is 57 /* For each registered MIC74, we need to keep some data in memory. It is 59 58 dynamically allocated, at the same time when a new mic74 client is 60 59 allocated. */ lm-sensors/branches/lm-sensors-3.0.0/kernel/chips/sis5595.c
r3044 r4357 162 162 #define DIV_TO_REG(val) ((val)==8?3:(val)==4?2:(val)==1?0:1) 163 163 164 /* For the SIS5595, we need to keep some data in memory. That 165 data is pointed to by sis5595_list[NR]->data. The structure itself is 164 /* For the SIS5595, we need to keep some data in memory. It is 166 165 dynamically allocated, at the time when the new sis5595 client is 167 166 allocated. */
