Several minor things

* sensors.conf.eg now contains LM80 declarations
* i2c/i2c-core.c again displays which adapters and clients are found and
  connected, but it does not track the calls to transfer functions in dmesg
* Slight alarms computation bug in lm78.c repaired
* First hacks at lm80.c; expect a fully working version later today


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@113 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Frodo Looijaard committed 1998-12-25 15:50:47 +00:00
1 parent f3cfdfa7a5
commit e1a28393b3
7 files changed
+129 -47

No files matched your search

+1 -1
View File
@@ -720,7 +720,7 @@ void lm78_update_client(struct i2c_client *client)
data->fan_div[0] = (i >> 4) & 0x03;
data->fan_div[1] = i >> 6;
data->alarms = lm78_read_value(client,LM78_REG_ALARM1) +
(lm78_read_value(client,LM78_REG_ALARM2) >> 8);
(lm78_read_value(client,LM78_REG_ALARM2) << 8);
data->last_updated = jiffies;
data->valid = 1;
}
+3 -12
View File
@@ -37,19 +37,12 @@
/* Many LM80 constants specified below */
/* Length of ISA address segment */
#define LM80_EXTENT 8
/* Where are the ISA address/data registers relative to the base address */
#define LM80_ADDR_REG_OFFSET 5
#define LM80_DATA_REG_OFFSET 6
/* The LM80 registers */
#define LM80_REG_IN_MAX(nr) (0x2b + (nr) * 2)
#define LM80_REG_IN_MIN(nr) (0x2c + (nr) * 2)
#define LM80_REG_IN_MAX(nr) (0x2a + (nr) * 2)
#define LM80_REG_IN_MIN(nr) (0x2b + (nr) * 2)
#define LM80_REG_IN(nr) (0x20 + (nr))
#define LM80_REG_FAN_MIN(nr) (0x3a + (nr))
#define LM80_REG_FAN_MIN(nr) (0x3b + (nr))
#define LM80_REG_FAN(nr) (0x27 + (nr))
#define LM80_REG_TEMP 0x27
@@ -66,8 +59,6 @@
/* Conversions. Rounding is only done on the TO_REG variants. */
static int lm80_in_conv[7] = {10000, 10000, 10000, 16892, 38000,
-34768, -15050 };
#define IN_TO_REG(val,nr) (((((val) * 100000 / lm80_in_conv[nr]) + 8) / 16) \
& 0xff)
#define IN_FROM_REG(val,nr) (((val) * 16 * lm80_in_conv[nr]) / 100000)