diff --git a/kernel/chips/adm1025.c b/kernel/chips/adm1025.c index 16e9fe4d..0f11db71 100644 --- a/kernel/chips/adm1025.c +++ b/kernel/chips/adm1025.c @@ -373,22 +373,16 @@ static int adm1025_detach_client(struct i2c_client *client) } -/* Called when we have found a new ADM1025. It should set limits, etc. */ +/* Called when we have found a new ADM1025. */ static void adm1025_init_client(struct i2c_client *client) { struct adm1025_data *data = client->data; - u8 reg, nr; + u8 reg; data->vrm = DEFAULT_VRM; - /* Restore power-up default values (configuration and status - registers). This makes some other initializations - unnecessary. Set the chip in standby mode until the - limits are properly set. Note that we take great care not to - change the bits 1-6 of the configuration register, since - they hold data we want to preserve. */ - reg = i2c_smbus_read_byte_data(client, ADM1025_REG_CONFIG); - /* Restore configuration and start monitoring */ + /* Start monitoring */ + reg = i2c_smbus_read_byte_data(client, ADM1025_REG_CONFIG); i2c_smbus_write_byte_data(client, ADM1025_REG_CONFIG, (reg|0x01)&0x7F); } diff --git a/kernel/chips/lm83.c b/kernel/chips/lm83.c index d8061bc0..18838a65 100644 --- a/kernel/chips/lm83.c +++ b/kernel/chips/lm83.c @@ -114,7 +114,6 @@ static const u8 LM83_REG_W_HIGH[] = { static int lm83_attach_adapter(struct i2c_adapter *adapter); static int lm83_detect(struct i2c_adapter *adapter, int address, unsigned short flags, int kind); -static void lm83_init_client(struct i2c_client *client); static int lm83_detach_client(struct i2c_client *client); static void lm83_update_client(struct i2c_client *client); static void lm83_temp(struct i2c_client *client, int operation, int @@ -361,9 +360,9 @@ static int lm83_detect(struct i2c_adapter *adapter, int address, unsigned /* * Initialize the LM83 chip + * (Nothing to do for this one.) */ - lm83_init_client(new_client); return 0; ERROR2: @@ -373,11 +372,6 @@ static int lm83_detect(struct i2c_adapter *adapter, int address, unsigned return err; } -static void lm83_init_client(struct i2c_client *client) -{ - -} - static int lm83_detach_client(struct i2c_client *client) { int err; diff --git a/kernel/chips/sis5595.c b/kernel/chips/sis5595.c index 437c89f6..b0dc2ebc 100644 --- a/kernel/chips/sis5595.c +++ b/kernel/chips/sis5595.c @@ -496,20 +496,14 @@ static int sis5595_write_value(struct i2c_client *client, u8 reg, u8 value) return 0; } -/* Called when we have found a new SIS5595. It should set limits, etc. */ +/* Called when we have found a new SIS5595. */ static void sis5595_init_client(struct i2c_client *client) { - struct sis5595_data *data = client->data; - - /* Reset all except Watchdog values and last conversion values - This sets fan-divs to 2, among others */ - sis5595_write_value(client, SIS5595_REG_CONFIG, 0x80); + u8 reg; /* Start monitoring */ - sis5595_write_value(client, SIS5595_REG_CONFIG, - (sis5595_read_value(client, SIS5595_REG_CONFIG) - & 0xf7) | 0x01); - + reg = i2c_smbus_read_byte_data(client, SIS5595_REG_CONFIG); + sis5595_write_value(client, SIS5595_REG_CONFIG, (reg|0x01)&0x7F); } static void sis5595_update_client(struct i2c_client *client) diff --git a/kernel/chips/via686a.c b/kernel/chips/via686a.c index 91c3fd3e..3df00ac1 100644 --- a/kernel/chips/via686a.c +++ b/kernel/chips/via686a.c @@ -587,25 +587,16 @@ static int via686a_detach_client(struct i2c_client *client) return 0; } -/* Called when we have found a new VIA686A. Set limits, etc. */ +/* Called when we have found a new VIA686A. */ static void via686a_init_client(struct i2c_client *client) { - int i; - - /* 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); + u8 reg; /* Start monitoring */ - via686a_write_value(client, VIA686A_REG_CONFIG, 0x01); + reg = via686a_read_value(client, VIA686A_REG_CONFIG); + via686a_write_value(client, VIA686A_REG_CONFIG, (reg|0x01)&0x7F); - /* Cofigure temp interrupt mode for continuous-interrupt operation */ + /* Configure temp interrupt mode for continuous-interrupt operation */ via686a_write_value(client, VIA686A_REG_TEMP_MODE, via686a_read_value(client, VIA686A_REG_TEMP_MODE) & !(VIA686A_TEMP_MODE_MASK | VIA686A_TEMP_MODE_CONTINUOUS));