From f2f711d46a13181f67934ca86b6bc33c0fcddcc1 Mon Sep 17 00:00:00 2001 From: "Mark D. Studebaker" Date: Thu, 15 Aug 2002 03:21:17 +0000 Subject: [PATCH] turn on continuous conversion as suggested in ticket 932 git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@1494 7894878c-1315-0410-8ee3-d5d059ff63e0 --- CHANGES | 1 + kernel/chips/ds1621.c | 10 ++++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CHANGES b/CHANGES index 66dc52b6..7b919eb8 100644 --- a/CHANGES +++ b/CHANGES @@ -20,6 +20,7 @@ ask CVS about it: 2.6.5 (2002????) Library: Fix fan3_div writes for w8378* and it87 Module dmi_scan: new + Module ds1621: Fix enable/disable Module i2c-i801: Check for uninitialized base address; enable if not enabled Module i2c-piix4: Refuse to load on IBM systems diff --git a/kernel/chips/ds1621.c b/kernel/chips/ds1621.c index 6452d07a..f693d6ef 100644 --- a/kernel/chips/ds1621.c +++ b/kernel/chips/ds1621.c @@ -369,15 +369,17 @@ int ds1621_write_value(struct i2c_client *client, u8 reg, u16 value) void ds1621_init_client(struct i2c_client *client) { + int reg; + /* Initialize the DS1621 chip */ ds1621_write_value(client, DS1621_REG_TEMP_OVER, TEMP_TO_REG(DS1621_INIT_TEMP_OVER)); ds1621_write_value(client, DS1621_REG_TEMP_HYST, TEMP_TO_REG(DS1621_INIT_TEMP_HYST)); - ds1621_write_value(client, DS1621_REG_CONF, 0); - - /* perhaps we should start the continous conversion? For now */ - /* you got to do that yourself using the "enable" in proc */ + reg = ds1621_read_value(client, DS1621_REG_CONF); + /* start the continous conversion */ + if(reg & 0x01) + ds1621_write_value(client, DS1621_REG_CONF, reg & 0xfe); } void ds1621_update_client(struct i2c_client *client)