I2C Elektor Driver

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
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...

Re: I2C Elektor Driver
     snipped-for-privacy@gummert.de (Mathias Gummert) writes:
Quoted text here. Click to load it

* 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 <base_address>"
  on the console or in /var/log/messages?

* Do you perhaps see a message like "i2c-elektor.o: Request irq<number> 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
We've slightly trimmed the long signature. Click to see the full one.
Re: I2C Elektor Driver
bitbucket@invalid-domain-see-sig.nil (Robert Kaiser) wrote in message

Thank you for your hints, Rob.

This is what I checked so far:
 
Quoted text here. Click to load it

No, it┤s not loaded.

Quoted text here. Click to load it

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

Quoted text here. Click to load it

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

Quoted text here. Click to load it

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

Quoted text here. Click to load it

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...

Re: I2C Elektor Driver
     snipped-for-privacy@gummert.de (Mathias Gummert) writes:
Quoted text here. Click to load it

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).

Quoted text here. Click to load it
failed"
Quoted text here. Click to load it


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.

Quoted text here. Click to load it

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

Quoted text here. Click to load it

Good question :-)

Quoted text here. Click to load it

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

Quoted text here. Click to load it

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
We've slightly trimmed the long signature. Click to see the full one.

Site Timeline