[i2c] [PATCH 3/5] powerpc: Document device nodes for I2C devices.
David Brownell
david-b at pacbell.net
Fri May 18 05:05:46 CEST 2007
> >> + Recommended properties :
> >> +
> >> + - compatible : The name of the Linux device driver that
> >> + handles this device. If unspecified, the name of the
> >> + node will be used.
> >
> > NO WAY
>
> Sorry, that was left in there from a while ago and I missed it. It
> should be defined the same way as any other compatible property
So long as one outcome is that it's possible to say "use the rtc-ds1307
driver, passing chip type of ds1339".
You need to remember that I2C, unlike PCI or USB, doesn't have any
internal device typing framework. So any type system layered on top
of it will inherently capture OS-specific information.
> (and the
> i2c code in Linux should be fixed to allow drivers to specify multiple
> match names).
I'd have to disagree with that notion on the basis that it's
not even half-formed!
I suggest first making sure that the OF node can fully populate
the current i2c_board_info struct. Later, if there's interest,
it can generalize to support other platforms.
> >> + - interrupts : <a b> where a is the interrupt number and b is a
> >
> > I2C doesn't do interrupts,
>
> ...but some I2C devices do.
And accordingly, an OF device tree needs to be able to say which
interrupt is triggered by the device. An RTC with an alarm (like
a ds1339 or rv5c387) is a perfectly reasonable thing to have on a
powerpc board, and expect the OS to take full advantage of.
- Dave
More information about the i2c
mailing list