[PATCH] of: i2c: improve last resort compatible entry selection
Grant Likely
grant.likely at secretlab.ca
Thu Jul 31 00:42:02 EST 2008
On Mon, Jul 28, 2008 at 09:47:21AM +0200, Segher Boessenkool wrote:
>>> A reasonable "compatible" value would be something like
>>> "serial-eeprom-24c32".
>>> You can go a little bit more generic than that, if you write up in
>>> your binding how the driver should figure out the device size and
>>> the protocol used.
>>
>> Matching on "serial-eeprom-24c32" requires me to convince the at24
>> authors to add that string as an alias binding for their driver.
>
> No, it requires the IIC subsystem to get fixed and not use OF
> "compatible" values as module alias names.
Indeed; the device tree is just a data structure with a well defined
usage model. It is the kernel's job to adapt that data into a form that
it can use.
>> How
>> about "serial-eeprom,24c32" or "generic,24x32"?
>
> Neither "serial-eeprom" nor "generic" is the name of a vendor, so
> no. The comma has a well-defined meaning. Why would a comma be
> easier than a dash for your device matching code, anyway?
Just to add my voice; I 100% agree. If it is not documented, and it
doesn't fit with established conventions, then it shouldn't be used in
the compatible field.
g.
More information about the devicetree-discuss
mailing list