[PATCH] powerpc: Add of_register_i2c_devices()

Segher Boessenkool segher at kernel.crashing.org
Tue Jul 3 09:10:47 EST 2007


>> AFAIK, i2c is not specified by OF standard. So, we are free to chose 
>> any
>> "compatible" fields for our dts. Which we then would need to match 
>> against
>> drivers. So, why not make this a 1-to-1 match? I.e.,
>> [OF]			[I2C]
>> compatible	<->	driver_name
>> model		<->	type
>
> If we do this, then the compatible field should probably be preceded 
> with
> "linux,", which would get stripped by of_register_i2c_devices().  This
> would only be an interim measure until we can figure out some sort of
> name registry via power.org.  Once that happens, non-"linux," 
> compatible
> fields could be looked up in an OF-to-linux table, or there could be a
> way for i2c devices to specify OF matches in addition to driver name.

Why even think of doing this?  Just put the bloody name of
the device in the "compatible" property and match on that.
What is so hard about this?

If the answer is "the Linux I2C stuff is badly structured",
well, you know what to do :-)


Segher




More information about the Linuxppc-dev mailing list