Subject: Re: [i2c] [PATCH 0/4] Series to add device tree naming to i2c

From: Scott Wood <[email-masked]>
Date: Mon, 10 Dec 2007 10:42:55 -0600

On Mon, Dec 10, 2007 at 08:38:46AM +1100, Benjamin Herrenschmidt wrote:
> The more I think about it, the more I tend to agree that tagging isn't
> necessary and you are right. We should just match the name against the
> "compatible" property of the OF nodes (which mean we need to support
> multiple matches though since "compatible" is a list of strings).

It may not be strictly necessary, but I think it's a good idea not just for
safety reasons, but as an indication to the driver what additional
information it has access to.  We could put a match data pointer in the i2c
device, and have it be a valid node pointer if the match was an OF one (and
a device-specific struct for a straight platform device, etc).  This could
be useful if a device needs to have more properties than standard
address/type/interrupt for some reason.

-Scott