diff options
author | Jean Delvare <khali@linux-fr.org> | 2005-07-19 23:56:35 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2005-09-05 09:14:10 -0700 |
commit | 2d8672c5a6ba0d3f1d8d3ad61ef67868941364f0 (patch) | |
tree | f01f038198bad63fee4c7d23af806ad0ab4e5071 /drivers/hwmon/w83781d.c | |
parent | 5042c7d752fe72c6924037058367f63902e68c5c (diff) | |
download | op-kernel-dev-2d8672c5a6ba0d3f1d8d3ad61ef67868941364f0.zip op-kernel-dev-2d8672c5a6ba0d3f1d8d3ad61ef67868941364f0.tar.gz |
[PATCH] I2C: Separate non-i2c hwmon drivers from i2c-core (5/9)
Call the ISA chip drivers detection function directly instead of relying
on i2c_detect. The net effect is that address lists won't be handled
anymore, but they were mostly useless in the ISA case anyway (pc87360,
smsc47m1, smsc47b397 had already dropped them).
We don't need to handle multiple devices, all we may need is a way to
force a given address instead of the original one (some drivers already
do: sis5595, via686a, w83627hf), and, for drivers supporting multiple
chips, a way to force one given kind. All this may be added later on
demand, but I actually don't think there will be much demand.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/hwmon/w83781d.c')
-rw-r--r-- | drivers/hwmon/w83781d.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/hwmon/w83781d.c b/drivers/hwmon/w83781d.c index 69b061e..a4ab819 100644 --- a/drivers/hwmon/w83781d.c +++ b/drivers/hwmon/w83781d.c @@ -50,7 +50,8 @@ static unsigned short normal_i2c[] = { 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, I2C_CLIENT_END }; -static unsigned int normal_isa[] = { 0x0290, I2C_CLIENT_ISA_END }; +static unsigned int normal_isa[] = { I2C_CLIENT_ISA_END }; +static unsigned short isa_address = 0x290; /* Insmod parameters */ SENSORS_INSMOD_5(w83781d, w83782d, w83783s, w83627hf, as99127f); @@ -259,6 +260,7 @@ struct w83781d_data { }; static int w83781d_attach_adapter(struct i2c_adapter *adapter); +static int w83781d_isa_attach_adapter(struct i2c_adapter *adapter); static int w83781d_detect(struct i2c_adapter *adapter, int address, int kind); static int w83781d_detach_client(struct i2c_client *client); @@ -280,7 +282,7 @@ static struct i2c_driver w83781d_driver = { static struct i2c_driver w83781d_isa_driver = { .owner = THIS_MODULE, .name = "w83781d-isa", - .attach_adapter = w83781d_attach_adapter, + .attach_adapter = w83781d_isa_attach_adapter, .detach_client = w83781d_detach_client, }; @@ -871,6 +873,12 @@ w83781d_attach_adapter(struct i2c_adapter *adapter) return i2c_detect(adapter, &addr_data, w83781d_detect); } +static int +w83781d_isa_attach_adapter(struct i2c_adapter *adapter) +{ + return w83781d_detect(adapter, isa_address, -1); +} + /* Assumes that adapter is of I2C, not ISA variety. * OTHERWISE DON'T CALL THIS */ |