[PATCH] of: Add a reg-names property to name reg entries

Segher Boessenkool segher at kernel.crashing.org
Wed Oct 26 01:17:15 EST 2011


>> What problem does any of this solve?  The device binding for the
>> "mcasp" device will have to describe the possible "reg-names", and
>> what those mean; but the binding already has to describe its "reg"
>> property anyway.
>
> What this solve is the ability to use the  
> platform_get_resource_byname directly to retrieve the proper  
> register base address.

You do not have to put it in the device tree for that, the device
driver can implement this itself if it cares.

> The binding is just a text description that the driver will not be  
> able to use directly. It will have to get the resource using an  
> abstract index.

Your reg-names are abstract identifiers just as well.

> It thus removes a level of indirection that is error prone and  
> useless most of the time.

It *adds* a level of indirection.  I doubt it helps prevent errors
either, but who knows.


Segher



More information about the devicetree-discuss mailing list