aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/lm78.c
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2005-07-19 17:56:35 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2005-09-05 12:14:10 -0400
commit2d8672c5a6ba0d3f1d8d3ad61ef67868941364f0 (patch)
treef01f038198bad63fee4c7d23af806ad0ab4e5071 /drivers/hwmon/lm78.c
parent5042c7d752fe72c6924037058367f63902e68c5c (diff)
[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/lm78.c')
-rw-r--r--drivers/hwmon/lm78.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/hwmon/lm78.c b/drivers/hwmon/lm78.c
index a69e7d4670ad..c3712f8d9964 100644
--- a/drivers/hwmon/lm78.c
+++ b/drivers/hwmon/lm78.c
@@ -34,7 +34,8 @@ static unsigned short normal_i2c[] = { 0x20, 0x21, 0x22, 0x23, 0x24,
34 0x25, 0x26, 0x27, 0x28, 0x29, 34 0x25, 0x26, 0x27, 0x28, 0x29,
35 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 35 0x2a, 0x2b, 0x2c, 0x2d, 0x2e,
36 0x2f, I2C_CLIENT_END }; 36 0x2f, I2C_CLIENT_END };
37static unsigned int normal_isa[] = { 0x0290, I2C_CLIENT_ISA_END }; 37static unsigned int normal_isa[] = { I2C_CLIENT_ISA_END };
38static unsigned short isa_address = 0x290;
38 39
39/* Insmod parameters */ 40/* Insmod parameters */
40SENSORS_INSMOD_2(lm78, lm79); 41SENSORS_INSMOD_2(lm78, lm79);
@@ -160,6 +161,7 @@ struct lm78_data {
160 161
161 162
162static int lm78_attach_adapter(struct i2c_adapter *adapter); 163static int lm78_attach_adapter(struct i2c_adapter *adapter);
164static int lm78_isa_attach_adapter(struct i2c_adapter *adapter);
163static int lm78_detect(struct i2c_adapter *adapter, int address, int kind); 165static int lm78_detect(struct i2c_adapter *adapter, int address, int kind);
164static int lm78_detach_client(struct i2c_client *client); 166static int lm78_detach_client(struct i2c_client *client);
165 167
@@ -181,7 +183,7 @@ static struct i2c_driver lm78_driver = {
181static struct i2c_driver lm78_isa_driver = { 183static struct i2c_driver lm78_isa_driver = {
182 .owner = THIS_MODULE, 184 .owner = THIS_MODULE,
183 .name = "lm78-isa", 185 .name = "lm78-isa",
184 .attach_adapter = lm78_attach_adapter, 186 .attach_adapter = lm78_isa_attach_adapter,
185 .detach_client = lm78_detach_client, 187 .detach_client = lm78_detach_client,
186}; 188};
187 189
@@ -480,6 +482,11 @@ static int lm78_attach_adapter(struct i2c_adapter *adapter)
480 return i2c_detect(adapter, &addr_data, lm78_detect); 482 return i2c_detect(adapter, &addr_data, lm78_detect);
481} 483}
482 484
485static int lm78_isa_attach_adapter(struct i2c_adapter *adapter)
486{
487 return lm78_detect(adapter, isa_address, -1);
488}
489
483/* This function is called by i2c_detect */ 490/* This function is called by i2c_detect */
484int lm78_detect(struct i2c_adapter *adapter, int address, int kind) 491int lm78_detect(struct i2c_adapter *adapter, int address, int kind)
485{ 492{