Changeset 1168

Show
Ignore:
Timestamp:
09/01/01 16:33:41 (13 years ago)
Author:
mds
Message:

fix unreliable initialization of limit registers by

adding a rather large delay after resetting the device
via register 0x40. There is obviously a state machine
in the chip that takes a while to run after you reset it.
Figured out the delay time by trial and error.

Location:
lm-sensors/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • lm-sensors/trunk/CHANGES

    r1165 r1168  
    1717 
    1818----------------------------------------------------------------------------- 
     19 
     202.6.2 (2001????) 
     21  Module via686a: Make limit initializations reliable 
    1922 
    20232.6.1 (20010830) 
  • lm-sensors/trunk/kernel/chips/via686a.c

    r1101 r1168  
    4141#include <asm/io.h> 
    4242#include <linux/types.h> 
     43#include <linux/delay.h> 
    4344#include <linux/i2c.h> 
    4445#include "version.h" 
     
    681682        via686a_write_value(client, VIA686A_REG_CONFIG, 0x80); 
    682683 
     684        /* Have to wait for reset to complete or else the following 
     685           initializations won't work reliably. The delay was arrived at 
     686           empirically, the datasheet doesn't tell you. 
     687           Waiting for the reset bit to clear doesn't work, it 
     688           clears in about 2-4 udelays and that isn't nearly enough. */ 
     689        udelay(50); 
     690 
    683691        via686a_write_value(client, VIA686A_REG_IN_MIN(0), 
    684692                            IN_TO_REG(VIA686A_INIT_IN_MIN_0, 0));