I2C Elektor Driver

When I use the Elektor ISA Card driver as a module, the "cat /proc/ioports" output shows something like

0340-0341: tÄÜ':;jkkhrf56r te726etedzwzdg6

instead of showing me the name of the driver.

When I compile the Elektor Card driver into the kernel everything is fine (I need the drivers as module for debugging reasons).

I was using several IO addresses (300, 310,..), but it's always the same.

There is no other devive in the system which is using the same IO address.

I'm using config_I2c, config_i2c_algopfc, config_i2c_elektor and config_i2c_chardev and kernel 2.4.18 (ELINOS 2.2).

"cat /proc/devices" shows "i2c"; /proc/bus/i2c is empty.

Can anybody help?

Thank you!

Mathias...

Reply to
Mathias Gummert
Loading thread data ...

  • When you observe this, is the driver actually loaded (check with lsmod)?
  • What does /proc/interrupts say?

  • Do you see a message like "i2c-elektor.o: found device at " on the console or in /var/log/messages?

  • Do you perhaps see a message like "i2c-elektor.o: Request irq failed" on the console or in /var/log/messages?

My guess is that driver installation fails at some point and the driver's init function exits without properly releasing the I/O region. Looking at the driver source it seems that this is exactly what happens if the driver attempts to use an interrupt number that is already claimed by another device, so you should make sure you are passing the right interrupt number when you load the driver.

Note: if I'm guessing right, then any repeated attempt to install the driver is bound to fail, because the I/O port region is still claimed. So, make sure you test the above things right after having freshly booted the system.

Hope this helps

Rob

--
Robert Kaiser                     email: rkaiser AT sysgo DOT com
SYSGO AG                          http://www.elinos.com
Klein-Winternheim / Germany       http://www.sysgo.com
Reply to
Robert Kaiser

Thank you for your hints, Rob.

This is what I checked so far:

No, it´s not loaded.

There´s no entry for any i2c device (only for timer(0), keyboard(1), cascade(2) eth0(5), ide0(14)).

There´s the message that i2c-elektor.o didn´t find such a device, which may be caused by invalid IO or IRQ parameters.

There´s no such message but it seems to be said in the above quoted one.

I´m not using the interrupt with the elektor card. It´s physically disabled. Might that be the reason for the driver´s strange behaviour? But if so: How come the 2.4.3´s driver is working properly with the same hardware?

A first glance at the elektor´s source code shows that there are quite a number of changes compared to the source that came with the 2.4.3 kernel.

So I guess I need to have a closer look at the source :-( .

Thank you again!

Mathias...

Reply to
Mathias Gummert

OK.

OK.

That would indicate the driver's install function has returned with error (ENODEV). This can have a number of reasons, though (see below).

failed"

Yes, but if the driver has indeed attempted to claim an interrupt that was already in use by another driver, then it should output exactly this message. Depending on your system's configuration, the message may appear in a file (typically /var/log/messages) or on the console, but it would definitely appear somewhere, if a failed attempt to claim an interrupt is the reason of the problem.

Not really. The question is, wether the the software driver thinks it needs to allocate the interrupt.

Good question :-)

I would have thought that it's the standard driver that comes with the (2.4.18), but I don't know the details.

Well, if you are sure that the above mentioned message really does not appear, then the only remeaining reason is that routine i2c_pcf_add_bus() in i2c-algo-pcf.c has failed for some reason.

Good luck

Rob

--
Robert Kaiser                     email: rkaiser AT sysgo DOT com
SYSGO AG                          http://www.elinos.com
Klein-Winternheim / Germany       http://www.sysgo.com
Reply to
Robert Kaiser

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.