Re: [PATCH] OMAP: I2C driver for TI OMAP boards #2



David,

On Thursday 03 August 2006 2:19 am, Jean Delvare wrote:
The i2c core provides a mechanism to bypass the probing when you know
for sure what device is at a given address. For an embedded system, that
should work.

Unfortunately the mechanisms I'm aware of require either error-prone
kernel command line parameters, or (not error prone, but inelegant)
board-specific logic in the drivers, before driver registration, to
do equivalent stuff.

I said it was possible, not that it was nice and elegant ;) I know it's
ugly at the moment - which is exactly why people have been asking for
an i2c-core conversion.

It may help to see how the SPI core solves that problem. Unlike I2C,
SPI actually _can't_ probe (except in rare specialized cases), and when
I did the SPI stuff I was thinking about models that could apply easily
to help I2C avoid probing. (Though not, at this point, code.)

I2C can't really probe either. We abuse a transaction type we known most
chips will reply to but otherwise ignore to achieve chip presence
detection. It did damage in the past (killing Thinkpad laptops) and
could do again in the future. So, having board-specific lists of chips
to avoid probing would help.

That model of a table of board-specific declarations (with things like
"I2C chip type X at address A, using interrupt I and platform_data P")
should work for I2C too.

What we have in the works is "I2C chip type X at address A". No
interrupt nor platform data at this point. But once the conversion to
the device driver model is done, I guess it'll come naturally if needed.

--
Jean Delvare
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: No interrupts coming to device driver.
    ... : coming to driver. ... I believe I configured chip (carrier freq. ... divisor) and enabled interrupt mode the same way it windows driver does. ... If it is on the ISA bus, then you can look at the IRQ line that you ...
    (freebsd-hackers)
  • No interrupts coming to device driver.
    ... I trying to create small lirc compatible CIR driver for ... coming to driver. ... I believe I configured chip (carrier freq. ... divisor) and enabled interrupt mode the same way it windows driver does. ...
    (freebsd-hackers)
  • Re: [GIT PATCH] more Driver core patches for 2.6.19
    ... The design requires to have an in kernel stub driver with interrupt ... The chip specific portion of the interrupt handler. ... wakeup user space task ...
    (Linux-Kernel)
  • Re: How to Disable Ethernet
    ... How can I be sure that KITL is no longer accessing it? ... When I run my driver, I get interrupts from the 91C96 that ... a new interrupt is generated. ... >> 91C96 ethernet chip other than my driver. ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Re: HARDWARE: Open-Source-Friendly Graphics Cards -- Viable?]
    ... Some of them do dominate a market. ... implementing a specific grafics standard. ... grafic chips just need a driver - but they ... spent tons of research on the chip development as well, ...
    (Linux-Kernel)