Changeset 1093
- Timestamp:
- 05/26/01 23:23:40 (12 years ago)
- Location:
- lm-sensors/trunk
- Files:
-
- 2 modified
-
CHANGES (modified) (1 diff)
-
kernel/busses/i2c-via.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lm-sensors/trunk/CHANGES
r1090 r1093 41 41 Module i2c-i810: Fixed i2c_i810_init() not found in patched kernel 42 42 Module i2c-sis5595: Allow force_addr=0xaddr; enable if not enabled. 43 Module i2c-via: Ensure i2c bus is tristated correctly. 43 44 Module lm78: Recognize chipid=0x20 44 45 Module lm87: Fix in0, in1 (2.5V and Vccp1) calculations -
lm-sensors/trunk/kernel/busses/i2c-via.c
r707 r1093 64 64 static u16 pm_io_base; 65 65 66 /* 67 It does not appear from the datasheet that the GPIO pins are 68 open drain. So a we set a low value by setting the direction to 69 output and a high value by setting the direction to input and 70 relying on the required I2C pullup. The data value is initialized 71 to 0 in i2c_via_init() and never changed. 72 */ 73 66 74 static void bit_via_setscl(void *data, int state) 67 75 { 68 outb(state ? inb(I2C_ OUT) | I2C_SCL : inb(I2C_OUT) & ~I2C_SCL,69 I2C_ OUT);76 outb(state ? inb(I2C_DIR) & ~I2C_SCL : inb(I2C_DIR) | I2C_SCL, 77 I2C_DIR); 70 78 } 71 79 72 80 static void bit_via_setsda(void *data, int state) 73 81 { 74 outb(state ? inb(I2C_ OUT) | I2C_SDA : inb(I2C_OUT) & ~I2C_SDA,75 I2C_ OUT);82 outb(state ? inb(I2C_DIR) & ~I2C_SDA : inb(I2C_DIR) | I2C_SDA, 83 I2C_DIR); 76 84 } 77 85 … … 180 188 } else { 181 189 request_region(I2C_DIR, IOSPACE, IOTEXT); 182 outb(inb(I2C_DIR) | I2C_SDA | I2C_SCL, I2C_DIR);183 outb(inb(I2C_OUT) | I2C_SDA | I2C_SCL, I2C_OUT);190 outb(inb(I2C_DIR) & ~(I2C_SDA | I2C_SCL), I2C_DIR); 191 outb(inb(I2C_OUT) & ~(I2C_SDA | I2C_SCL), I2C_OUT); 184 192 } 185 193 … … 188 196 return 0; 189 197 } else { 190 outb(inb(I2C_DIR) & ~(I2C_SDA | I2C_SCL), I2C_DIR);191 198 release_region(I2C_DIR, IOSPACE); 192 199 printk
