Init cleanups (unused vars and functions, and more).

git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2123 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Jean Delvare committed 2003-11-30 11:27:42 +00:00
1 parent e5483ca3b6
commit c1e28f8896
4 files changed
+14 -41

No files matched your search

+4 -10
View File
@@ -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);
}
+1 -7
View File
@@ -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;
+4 -10
View File
@@ -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)
+5 -14
View File
@@ -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));