Changeset 800
- Timestamp:
- 05/06/00 22:58:10 (9 years ago)
- Files:
-
- lm-sensors/trunk/CHANGES (modified) (1 diff)
- lm-sensors/trunk/kernel/chips/w83781d.c (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
lm-sensors/trunk/CHANGES
r798 r800 19 19 Module via686a: Enable sensors if not enabled by BIOS 20 20 Module w83781d: Improve w83783s support, w83627hf always has 2 pwm 21 Module w83781d: Fix sensor2&3 selection, enable VBAT (in8) monitoring 21 22 Program isadump: Add Winbond-style bank selection 22 23 Program sensors-detect: Fix i801 detection lm-sensors/trunk/kernel/chips/w83781d.c
r797 r800 2 2 w83781d.c - Part of lm_sensors, Linux kernel modules for hardware 3 3 monitoring 4 Copyright (c) 1998, 1999 Frodo Looijaard <frodol@dds.nl>,4 Copyright (c) 1998, 1999, 2000 Frodo Looijaard <frodol@dds.nl>, 5 5 Philip Edelbrock <phil@netroedge.com>, 6 6 and Mark Studebaker <mdsxyz123@yahoo.com> … … 27 27 as99127f 9 3 2-4 3 0x20 0x12c3 yes no 28 28 w83781d 7 3 0 3 0x10 0x5ca3 yes yes 29 w83627hf 9 3 2 -43 0x20 0x5ca3 yes yes(LPC)29 w83627hf 9 3 2 3 0x20 0x5ca3 yes yes(LPC) 30 30 w83782d 9 3 2-4 3 0x30 0x5ca3 yes yes 31 31 w83783s 5-6 3 2 1-2 0x40 0x5ca3 yes no … … 106 106 #define W83781D_REG_ALARM1 0x41 107 107 #define W83781D_REG_ALARM2 0x42 108 #define W83781D_REG_ALARM3 0x450 /* W83782D only*/108 #define W83781D_REG_ALARM3 0x450 /* not on W83781D */ 109 109 110 110 #define W83781D_REG_BEEP_CONFIG 0x4D … … 124 124 125 125 /* PWM 782D (1-4) and 783S (1-2) only */ 126 #define W83781D_REG_PWM1 0x5B /* 782d and 783s datasheets disagree */ 127 /* on which is which. */ 128 #define W83781D_REG_PWM2 0x5A /* We follow the 782d convention here */ 126 #define W83781D_REG_PWM1 0x5B /* 782d and 783s/627hf datasheets disagree */ 127 /* on which is which; */ 128 #define W83781D_REG_PWM2 0x5A /* We follow the 782d convention here, */ 129 /* However 782d is probably wrong. */ 129 130 #define W83781D_REG_PWM3 0x5E 130 131 #define W83781D_REG_PWM4 0x5F … … 141 142 /* The following are undocumented in the data sheets however we 142 143 received the information in an email from Winbond tech support */ 143 /* Sensor selection 782D/783S only*/144 /* Sensor selection - not on 781d */ 144 145 #define W83781D_REG_SCFG1 0x5D 145 146 static const u8 BIT_SCFG1[] = { 0x02, 0x04, 0x08 }; 146 147 #define W83781D_REG_SCFG2 0x59 147 static const u8 BIT_SCFG2[] = { 0x10, 0x 04, 0x08};148 static const u8 BIT_SCFG2[] = { 0x10, 0x20, 0x40 }; 148 149 #define W83781D_DEFAULT_BETA 3435 149 150 … … 1055 1056 } 1056 1057 1057 /* The SMBus locks itself, usually, but nothing may access the Winbond between1058 bank switches. ISA access must always be locked explicitly!1059 We ignore the W83781D BUSY flag at this moment - it could lead to deadlocks,1060 would slow down the W83781D access and should not be necessary.1061 There are some ugly typecasts here, but the good news is - they should1062 nowhere else be necessary! */1063 1058 int w83781d_write_value(struct i2c_client *client, u16 reg, u16 value) 1064 1059 { … … 1178 1173 Data sheet documentation is sparse. 1179 1174 We also assume that it is only for the 781D although I suspect 1180 that the 782D/783Dsupport it as well....1175 that the others support it as well.... 1181 1176 */ 1182 1177 … … 1255 1250 w83781d_write_value(client, W83781D_REG_IN_MAX(8), 1256 1251 IN_TO_REG(W83781D_INIT_IN_MAX_8)); 1252 w83781d_write_value(client, W83781D_REG_VBAT, 1253 (w83781d_read_value(client, W83781D_REG_VBAT) | 0x01)); 1257 1254 } 1258 1255 w83781d_write_value(client, W83781D_REG_FAN_MIN(1),
