mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-19 19:40:49 +00:00
Some small rounding and initializing bugs solved.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@53 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
000b95cce0
commit
01e8dc6d7c
5 files changed
+24
-18
No files matched your search
+6
-4
@@ -37,8 +37,8 @@
|
||||
#define TEMP_TO_REG(val) (((((val) + 2) / 5) << 7) & 0xff80)
|
||||
|
||||
/* Initial values */
|
||||
#define LM75_INIT_TEMP_OS 60
|
||||
#define LM75_INIT_TEMP_HYST 50
|
||||
#define LM75_INIT_TEMP_OS 600
|
||||
#define LM75_INIT_TEMP_HYST 500
|
||||
|
||||
/* Each client has this additional data */
|
||||
struct lm75_data {
|
||||
@@ -170,8 +170,10 @@ int lm75_attach_adapter(struct i2c_adapter *adapter)
|
||||
err = 0;
|
||||
|
||||
/* Initialize the LM75 chip */
|
||||
lm75_write_value(new_client,LM75_REG_TEMP_OS,LM75_INIT_TEMP_OS);
|
||||
lm75_write_value(new_client,LM75_REG_TEMP_HYST,LM75_INIT_TEMP_HYST);
|
||||
lm75_write_value(new_client,LM75_REG_TEMP_OS,
|
||||
TEMP_TO_REG(LM75_INIT_TEMP_OS));
|
||||
lm75_write_value(new_client,LM75_REG_TEMP_HYST,
|
||||
TEMP_TO_REG(LM75_INIT_TEMP_HYST));
|
||||
lm75_write_value(new_client,LM75_REG_CONF,0);
|
||||
|
||||
continue;
|
||||
|
||||
Reference in new issue
Block a user