Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/staging

* 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/staging:
hwmon: (lm93) Add support for LM94

+28 -4
+7
Documentation/hwmon/lm93
··· 6 6 Prefix 'lm93' 7 7 Addresses scanned: I2C 0x2c-0x2e 8 8 Datasheet: http://www.national.com/ds.cgi/LM/LM93.pdf 9 + * National Semiconductor LM94 10 + Prefix 'lm94' 11 + Addresses scanned: I2C 0x2c-0x2e 12 + Datasheet: http://www.national.com/ds.cgi/LM/LM94.pdf 9 13 10 14 Authors: 11 15 Mark M. Hoffman <mhoffman@lightlink.com> ··· 59 55 (i.e. smart tachometer mode). It also adds measurement and control support 60 56 for dynamic Vccp monitoring and PROCHOT. It is designed to monitor a dual 61 57 processor Xeon class motherboard with a minimum of external components. 58 + 59 + LM94 is also supported in LM93 compatible mode. Extra sensors and features of 60 + LM94 are not supported. 62 61 63 62 64 63 User Interface
+2 -2
drivers/hwmon/Kconfig
··· 618 618 depends on I2C 619 619 select HWMON_VID 620 620 help 621 - If you say yes here you get support for National Semiconductor LM93 622 - sensor chips. 621 + If you say yes here you get support for National Semiconductor LM93, 622 + LM94, and compatible sensor chips. 623 623 624 624 This driver can also be built as a module. If so, the module 625 625 will be called lm93.
+19 -2
drivers/hwmon/lm93.c
··· 135 135 #define LM93_MFR_ID 0x73 136 136 #define LM93_MFR_ID_PROTOTYPE 0x72 137 137 138 + /* LM94 REGISTER VALUES */ 139 + #define LM94_MFR_ID_2 0x7a 140 + #define LM94_MFR_ID 0x79 141 + #define LM94_MFR_ID_PROTOTYPE 0x78 142 + 138 143 /* SMBus capabilities */ 139 144 #define LM93_SMBUS_FUNC_FULL (I2C_FUNC_SMBUS_BYTE_DATA | \ 140 145 I2C_FUNC_SMBUS_WORD_DATA | I2C_FUNC_SMBUS_BLOCK_DATA) ··· 2509 2504 { 2510 2505 struct i2c_adapter *adapter = client->adapter; 2511 2506 int mfr, ver; 2507 + const char *name; 2512 2508 2513 2509 if (!i2c_check_functionality(adapter, LM93_SMBUS_FUNC_MIN)) 2514 2510 return -ENODEV; ··· 2523 2517 } 2524 2518 2525 2519 ver = lm93_read_byte(client, LM93_REG_VER); 2526 - if (ver != LM93_MFR_ID && ver != LM93_MFR_ID_PROTOTYPE) { 2520 + switch (ver) { 2521 + case LM93_MFR_ID: 2522 + case LM93_MFR_ID_PROTOTYPE: 2523 + name = "lm93"; 2524 + break; 2525 + case LM94_MFR_ID_2: 2526 + case LM94_MFR_ID: 2527 + case LM94_MFR_ID_PROTOTYPE: 2528 + name = "lm94"; 2529 + break; 2530 + default: 2527 2531 dev_dbg(&adapter->dev, 2528 2532 "detect failed, bad version id 0x%02x!\n", ver); 2529 2533 return -ENODEV; 2530 2534 } 2531 2535 2532 - strlcpy(info->type, "lm93", I2C_NAME_SIZE); 2536 + strlcpy(info->type, name, I2C_NAME_SIZE); 2533 2537 dev_dbg(&adapter->dev,"loading %s at %d,0x%02x\n", 2534 2538 client->name, i2c_adapter_id(client->adapter), 2535 2539 client->addr); ··· 2618 2602 2619 2603 static const struct i2c_device_id lm93_id[] = { 2620 2604 { "lm93", 0 }, 2605 + { "lm94", 0 }, 2621 2606 { } 2622 2607 }; 2623 2608 MODULE_DEVICE_TABLE(i2c, lm93_id);