[Patch V2 2/2] i2c: mv64xxx: Remove internal compatible string from Documentation

Arnd Bergmann arnd at arndb.de
Mon Jul 28 08:47:50 PDT 2014


On Monday 28 July 2014 17:25:06 Andrew Lunn wrote:
> > > Add a call something like:
> > > 
> > > /*
> > >  * Return the soc device attributes for a given soc_dev. If soc_dev is NULL,
> > >  * the first device on the soc bus is returned.
> > >  */
> > > struct soc_device_attribute *soc_attribute_get(struct soc_device * soc_dev);
> > 
> > Interesting idea, yes.
> 
> O.K, i will take a shot of implementing this sometime in the next few
> weeks. Bit busy at the moment.
>  
> > There could also be a higher-level function that does a strcmp() in addition,
> > so that a driver can do some variation of
> > 
> >       if (soc_name_is("Armada XP") && soc_revision_is("A0"))
> 
> We don't translate into 'Marketing names'. We just turn the register
> values into a stringified number. So it would have to be something
> like:
> 
>         if (soc_name_is("7826") && soc_revision_is("1"))

Hmm, I think that is inconsistent with how the strings are used
on other platforms, where you want something that uniquely identifies
the device in user-readable strings.

I haven't checked how all the others are doing it though.

	Arnd



More information about the linux-arm-kernel mailing list