Changeset 1535
- Timestamp:
- 09/18/02 21:17:30 (6 years ago)
- Files:
-
- lm-sensors/trunk/CONTRIBUTORS (modified) (1 diff)
- lm-sensors/trunk/doc/chips/adm1021 (modified) (3 diffs)
- lm-sensors/trunk/etc/sensors.conf.eg (modified) (1 diff)
- lm-sensors/trunk/kernel/chips/adm1021.c (modified) (7 diffs)
- lm-sensors/trunk/lib/chips.c (modified) (1 diff)
- lm-sensors/trunk/lib/chips.h (modified) (1 diff)
- lm-sensors/trunk/prog/detect/sensors-detect (modified) (3 diffs)
- lm-sensors/trunk/prog/sensors/main.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
lm-sensors/trunk/CONTRIBUTORS
r1528 r1535 77 77 * Alexander Malysh <amalysh@web.de> 78 78 Author of the i2c-sis630 bus driver. 79 Added Onsemi MC1066 support to the adm1021 driver. 79 80 lm-sensors/trunk/doc/chips/adm1021
r1299 r1535 46 46 Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e (inclusive) 47 47 Datasheet: Publicly available at the TI website 48 * Onsemi MC1066 49 Prefix `mc1066' 50 Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e (inclusive) 51 Datasheet: Publicly available at the Onsemi website 48 52 49 53 … … 74 78 * probe_range: short array (min = 1, max = 48) 75 79 List of adapter,start-addr,end-addr triples to scan additionally 80 * read_only: int (0 = disable, 1 = enable , default 0) 81 Read only mode.This is useful for Laptop's if BIOS managed Thermal Zone (Fan on/off). 82 Otherwise it confuse BIOS by writing any limit register's. 76 83 77 84 … … 204 211 remote_temp_over SENSORS_MAX1617A_REMOTE_TEMP_OVER remote_temp:1 205 212 alarms SENSORS_MAX1617A_ALARMS alarms:1 213 214 215 Chip `mc1066' 216 LABEL LABEL CLASS COMPUTE CLASS ACCESS MAGNITUDE 217 temp NONE NONE R 0 218 temp_low temp temp RW 0 219 temp_over temp temp RW 0 220 remote_temp NONE NONE R 0 221 remote_temp_low remote_temp remote_temp RW 0 222 remote_temp_over remote_temp remote_temp RW 0 223 alarms NONE NONE R 0 224 225 LABEL FEATURE SYMBOL SYSCTL FILE:NR 226 temp SENSORS_MAX1617_TEMP temp:3 227 temp_low SENSORS_MAX1617_TEMP_HYST temp:2 228 temp_over SENSORS_MAX1617_TEMP_OVER temp:1 229 remote_temp SENSORS_MAX1617_REMOTE_TEMP remote_temp:3 230 remote_temp_low SENSORS_MAX1617_REMOTE_TEMP_HYST remote_temp:2 231 remote_temp_over SENSORS_MAX1617_REMOTE_TEMP_OVER remote_temp:1 232 alarms SENSORS_MAX1617_ALARMS alarms:1 233 206 234 207 235 lm-sensors/trunk/etc/sensors.conf.eg
r1502 r1535 1338 1338 set aout 0 1339 1339 1340 chip "adm1021-*" "adm1023-*" "max1617-*" "max1617a-*" "thmc10-*" "lm84-*" "gl523sm-*" 1340 chip "adm1021-*" "adm1023-*" "max1617-*" "max1617a-*" "thmc10-*" "lm84-*" "gl523sm-*" "mc1066-*" 1341 1341 1342 1342 label temp "Board" lm-sensors/trunk/kernel/chips/adm1021.c
r1201 r1535 50 50 51 51 /* Insmod parameters */ 52 SENSORS_INSMOD_ 7(adm1021, adm1023, max1617, max1617a, thmc10, lm84, gl523sm);52 SENSORS_INSMOD_8(adm1021, adm1023, max1617, max1617a, thmc10, lm84, gl523sm, mc1066); 53 53 54 54 /* adm1021 constants specified below */ … … 59 59 #define ADM1021_REG_REMOTE_TEMP 0x01 60 60 #define ADM1021_REG_STATUS 0x02 61 #define ADM1021_REG_MAN_ID 0x0FE /* 0x41 = AMD, 0x49 = TI, 0x4D = Maxim, 0x23 = Genesys */61 #define ADM1021_REG_MAN_ID 0x0FE /* 0x41 = AMD, 0x49 = TI, 0x4D = Maxim, 0x23 = Genesys , 0x54 = Onsemi*/ 62 62 #define ADM1021_REG_DEV_ID 0x0FF /* ADM1021 = 0x0X, ADM1023 = 0x3X */ 63 63 #define ADM1021_REG_DIE_CODE 0x0FF /* MAX1617A */ … … 156 156 static void adm1021_update_client(struct i2c_client *client); 157 157 158 /* (amalysh) read only mode, otherwise any limit's writing confuse BIOS */ 159 static int read_only = 0; 160 158 161 159 162 /* This is the driver that will be inserted */ … … 281 284 (new_client, ADM1021_REG_CONV_RATE_R) == 0x00) 282 285 kind = lm84; 286 else if (i == 0x54) 287 kind = mc1066; 283 288 else 284 289 kind = max1617; … … 306 311 type_name = "gl523sm"; 307 312 client_name = "GL523SM chip"; 313 } else if (kind == mc1066) { 314 type_name = "mc1066"; 315 client_name = "MC1066 chip"; 308 316 } else { 309 317 #ifdef DEBUG … … 421 429 int adm1021_write_value(struct i2c_client *client, u8 reg, u16 value) 422 430 { 431 if (read_only > 0) 432 return 0; 433 423 434 return i2c_smbus_write_byte_data(client, reg, value); 424 435 } … … 642 653 MODULE_DESCRIPTION("adm1021 driver"); 643 654 655 MODULE_PARM(read_only, "i"); 656 MODULE_PARM_DESC(read_only, "Don't set any values, read only mode"); 657 644 658 int init_module(void) 645 659 { lm-sensors/trunk/lib/chips.c
r1502 r1535 2995 2995 { SENSORS_ADM1021_PREFIX, adm1021_features }, 2996 2996 { SENSORS_MAX1617_PREFIX, max1617_features }, 2997 { SENSORS_MC1066_PREFIX, max1617_features }, 2997 2998 { SENSORS_MAX1617A_PREFIX, max1617a_features }, 2998 2999 /* Cheat on LM84 for now - no separate #defines */ lm-sensors/trunk/lib/chips.h
r1502 r1535 188 188 189 189 #define SENSORS_MAX1617_PREFIX "max1617" 190 #define SENSORS_MC1066_PREFIX "mc1066" 190 191 191 192 #define SENSORS_MAX1617_TEMP 51 /* R */ lm-sensors/trunk/prog/detect/sensors-detect
r1533 r1535 909 909 i2c_addrs => [0x18..0x1a,0x29..0x2b,0x4c..0x4e], 910 910 i2c_detect => sub { adm1021_detect 5, @_ }, 911 }, 912 { 913 name => "Onsemi MC1066", 914 driver => "adm1021", 915 i2c_addrs => [0x18..0x1a,0x29..0x2b,0x4c..0x4e], 916 i2c_detect => sub { adm1021_detect 6, @_ }, 911 917 }, 912 918 { … … 2263 2269 2264 2270 # $_[0]: Chip to detect 2265 # (0 = ADM1021, 1 = MAX1617, 2 = MAX1617A, 3 = THMC10, 4 = LM84, 5 = GL523 )2271 # (0 = ADM1021, 1 = MAX1617, 2 = MAX1617A, 3 = THMC10, 4 = LM84, 5 = GL523, 6 = MC1066) 2266 2272 # $_[1]: A reference to the file descriptor to access this chip. 2267 2273 # We may assume an i2c_set_slave_addr was already done. … … 2285 2291 return if $chip == 2 and i2c_smbus_read_byte_data($file,0xfe) != 0x4d and 2286 2292 i2c_smbus_read_byte_data($file,0xff) != 0x01; 2293 return if $chip == 6 and i2c_smbus_read_byte_data($file,0xfe) != 0x54; 2287 2294 # The remaining things are flaky at best. Perhaps something can be done 2288 2295 # with the fact that some registers are unreadable? lm-sensors/trunk/prog/sensors/main.c
r1502 r1535 302 302 !strcmp(name.prefix,"max1617a") || !strcmp(name.prefix, "thmc10") || 303 303 !strcmp(name.prefix,"lm84") || !strcmp(name.prefix, "gl523") || 304 !strcmp(name.prefix, "adm1023") )304 !strcmp(name.prefix, "adm1023") || !strcmp(name.prefix, "mc1066")) 305 305 print_adm1021(&name); 306 306 else if (!strcmp(name.prefix,"adm9240") ||
