diff --git a/CHANGES b/CHANGES index 1ef716ec..c3388206 100644 --- a/CHANGES +++ b/CHANGES @@ -17,6 +17,9 @@ ask CVS about it: ----------------------------------------------------------------------------- +2.6.2 (2001????) + Module via686a: Make limit initializations reliable + 2.6.1 (20010830) File BUGS: Updated File doc/FAQ: More updates and additions diff --git a/kernel/chips/via686a.c b/kernel/chips/via686a.c index 0999a6c5..cf085f54 100644 --- a/kernel/chips/via686a.c +++ b/kernel/chips/via686a.c @@ -40,6 +40,7 @@ #include #include #include +#include #include #include "version.h" #include "sensors.h" @@ -680,6 +681,13 @@ void via686a_init_client(struct i2c_client *client) /* Reset the device */ via686a_write_value(client, VIA686A_REG_CONFIG, 0x80); + /* Have to wait for reset to complete or else the following + initializations won't work reliably. The delay was arrived at + empirically, the datasheet doesn't tell you. + Waiting for the reset bit to clear doesn't work, it + clears in about 2-4 udelays and that isn't nearly enough. */ + udelay(50); + via686a_write_value(client, VIA686A_REG_IN_MIN(0), IN_TO_REG(VIA686A_INIT_IN_MIN_0, 0)); via686a_write_value(client, VIA686A_REG_IN_MAX(0),