Skip to contentSkip to conversation

Linux 2.6 and CONFIG_ISA

DISCUSSION Jean Delvare 2 participants 9 messages May 19, 2005 I2C subsystem host drivers

lore
Share & tools
lore
#0 lore raw

Hi all,

After reading the following post on LKML:
http://marc.theaimsgroup.com/?l=linux-kernel&m7377669427411&w=2
I did some research about how ISA and I2C are supposed to interact through the different Kconfig files in Linux 2.6. Here are my conclusions, on which I'd like to have feedback and comments.

#1 In arch/i386/Kconfig, it is suggested that ISA busses are old and deprecated, and that new machines don't have one. This is wrong. Recent motherboards *do* have an ISA bus. They do not have ISA *slots* which is quite different. I think that this information should be added to CONFIG_ISA's help (and possibly backported to Linux 2.4).

#2 The Elektor is an ISA card (at least according to i2c/busses/Kconfig), so I'd expect it to depend on ISA. It doesn't, nor does it in Linux 2.4. Should be fixed?

#3 The ELV and Velleman adapters are said to depend on ISA, while I don't see any reason why they would. They are parallel port adapters. The dependancy doesn't exit in our CVS repository nor in Linux 2.4.

#4 The i2c-isa driver depends on ISA. This is a problem because most people won't have ISA support selected, but are likely to need i2c-isa. This is the problem described in the post on LKML those URL is given above. I think I remember seeing a way to do reverse-dependancies in Kconfigs (i.e. if B is selected, then A is automatically selected) but cannot find an example of that anymore. This is done with the "select" directive if I'm not mistaking. Thus I'd suggest to use it in this case. Another point raised here is wether i2c-isa really does depend on ISA. Looking through the code, it doesn't, at least not directly. OTOH i2c-sensor does as soon as any adapter uses the isa algorithm (which for some reason seems to be included in i2c-sensors instead of being in i2c-isa -- I guess there is a reason for that but I did not look deep enough into the code to tell what it is). As long as only i2c-isa does use that algorithm it doesn't make much different I guess, still its not very clean. No proposal here.

After listening to your remarks and comments, I could submit a patch to fix whatever needs to be.

Signature · 2 lines
Jean Delvare
http://www.ensicaen.ismra.fr/~delvare/
#1 lore raw

Quoting Greg KH <[email protected]>:

Quoted 3 lines

I just too the requirement for CONFIG_ISA off of i2c-isa so that x86_64 users can use that driver. We might want to consider a rename of the driver in the future...

I am not sure I understand your sentence ;) Nevermind, I have patch ready that should help users and limit further reports about the ISA bus:

1* Elektor depends on ISA.
2* ELV and Velleman do not depend on ISA.
3* i2c-isa is M by default, and has an additional help text 4* via686a autoselects i2c-isa
5* i2c-isa doesn't depend on ISA

If I understand it correctly, CONFIG_ISA does *not* do anything but enable the user to select other drivers or enable specific parts in drivers. So I don't see any drawback nor possible problem not depending on it.

I will send this patch to you this evening.

Signature · 2 lines
Jean Delvare
http://www.ensicaen.ismra.fr/~delvare/
#2 lore raw
In reply to Jean Delvare

And I add:

5# ISA-only chip drivers selection should autodelect i2c-isa. These are via686a and soon vt1211.

Signature · 2 lines
Jean Delvare
http://www.ensicaen.ismra.fr/~delvare/
#3 lore raw
In reply to Jean Delvare
Quoted 7 lines · Jean Delvare

Hi all,

After reading the following post on LKML:
http://marc.theaimsgroup.com/?l=linux-kernel&m7377669427411&w=2
I did some research about how ISA and I2C are supposed to interact through the different Kconfig files in Linux 2.6. Here are my conclusions, on which I'd like to have feedback and comments.

I just too the requirement for CONFIG_ISA off of i2c-isa so that x86_64 users can use that driver. We might want to consider a rename of the driver in the future...

thanks,

greg k-h

#4 lore raw
In reply to Jean Delvare

Quoting myself:

Quoted 5 lines

1* Elektor depends on ISA.
2* ELV and Velleman do not depend on ISA.
3* i2c-isa is M by default, and has an additional help text 4* via686a autoselects i2c-isa
5* i2c-isa doesn't depend on ISA

Here's the patch:

drivers/i2c/busses/Kconfig +9 -4
diff -ru linux-2.6.1-g1/drivers/i2c/busses/Kconfig linux-2.6.1-g1-k1/drivers/i2c/busses/Kconfig
@@ -48,7 +48,7 @@
 
 config I2C_ELEKTOR
 	tristate "Elektor ISA card"
-	depends on I2C_ALGOPCF && BROKEN_ON_SMP
+	depends on I2C_ALGOPCF && ISA && BROKEN_ON_SMP
 	help
 	  This supports the PCF8584 ISA bus I2C adapter.  Say Y if you own
 	  such an adapter.
@@ -58,7 +58,7 @@
 
 config I2C_ELV
 	tristate "ELV adapter"
-	depends on I2C_ALGOBIT && ISA
+	depends on I2C_ALGOBIT
 	help
 	  This supports parallel-port I2C adapters called ELV.  Say Y if you
 	  own such an adapter.
@@ -107,11 +107,16 @@
 
 config I2C_ISA
 	tristate "ISA Bus support"
-	depends on I2C && ISA && EXPERIMENTAL
+	depends on I2C && EXPERIMENTAL
+	default m
 	help
 	  If you say yes to this option, support will be included for i2c
 	  interfaces that are on the ISA bus.
 
+	  The ISA bus exists in your computer even if you don't have ISA slots.
+	  It is very common to find hardware monitoring chips there, so you
+	  should say yes here.
+
 	  This driver can also be built as a module.  If so, the module
 	  will be called i2c-isa.
 
@@ -320,7 +325,7 @@
 
 config I2C_VELLEMAN
 	tristate "Velleman K8000 adapter"
-	depends on I2C_ALGOBIT && ISA
+	depends on I2C_ALGOBIT
 	help
 	  This supports the Velleman K8000 parallel-port I2C adapter.  Say Y
 	  if you own such an adapter.
drivers/i2c/chips/Kconfig +1 -0
diff -ru linux-2.6.1-g1/drivers/i2c/chips/Kconfig linux-2.6.1-g1-k1/drivers/i2c/chips/Kconfig
@@ -116,6 +116,7 @@
 	tristate "VIA686A"
 	depends on I2C && EXPERIMENTAL
 	select I2C_SENSOR
+	select I2C_ISA
 	help
 	  If you say yes here you get support for the integrated sensors in
 	  Via 686A/B South Bridges.
Signature · 2 lines
Jean Delvare
http://www.ensicaen.ismra.fr/~delvare/
#5 lore raw
In reply to Jean Delvare
Quoted 7 lines · Jean Delvare

Quoting Greg KH <[email protected]>:

Quoted 3 lines

I just too the requirement for CONFIG_ISA off of i2c-isa so that x86_64 users can use that driver. We might want to consider a rename of the driver in the future...

I am not sure I understand your sentence ;)

I took the CONFIG_ISA dependancy off of CONFIG_I2C_ISA as seen in the following patch.

thanks,

greg k-h

drivers/i2c/busses/Kconfig +1 -1
diff -Nru a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig
@@ -108,7 +108,7 @@
 
 config I2C_ISA
 	tristate "ISA Bus support"
-	depends on I2C && ISA && EXPERIMENTAL
+	depends on I2C && EXPERIMENTAL
 	help
 	  If you say yes to this option, support will be included for i2c
 	  interfaces that are on the ISA bus.
#6 lore raw
In reply to Jean Delvare
Quoted 9 lines · Jean Delvare

Quoting myself:

Quoted 5 lines

1* Elektor depends on ISA.
2* ELV and Velleman do not depend on ISA.
3* i2c-isa is M by default, and has an additional help text 4* via686a autoselects i2c-isa
5* i2c-isa doesn't depend on ISA

Here's the patch:

Applied with a bit of editing to get around my previous change.

thanks,

greg k-h

#7 lore raw
In reply to Jean Delvare
Quoted 1 line

Applied with a bit of editing to get around my previous change.

BTW, wouldn't it make sense to apply the same idea to i2c algorithms? I.e. adapters would not depend on them, but select them instead. I don't expect people to know which algorithms them need. The way is is now, I think that users may miss half a dozen adapters just because they did not enable i2c-algo-bit. Not very friendly, is it?

Thanks.

Signature · 2 lines
Jean Delvare
http://www.ensicaen.ismra.fr/~delvare/
#8 lore raw
In reply to Jean Delvare
Quoted 3 lines · Jean Delvare
Quoted 1 line

Applied with a bit of editing to get around my previous change.

BTW, wouldn't it make sense to apply the same idea to i2c algorithms?

Yes it would. Care to make a patch?

thanks,

greg k-h