How to handle named resources with DT?

Felipe Balbi balbi at ti.com
Fri Aug 12 04:41:07 EDT 2011


Hi,

On Fri, Aug 12, 2011 at 01:02:18PM +1000, David Gibson wrote:
> > That seems to be pretty straightforward to implement, and as soon as
> > it is useful even for a couple of drivers, it worth adding it.
> > 
> > It is anyway better than having to add a custom property to get the
> > information we will miss otherwise.
> > 
> > Moreover, since some drivers are relying on that call, it will avoid
> > having to add extra code for nothing if CONFIG_OF is set.
> > 
> > It will allow the driver to use a pretty standard API in anycase vs
> > using platform_get_resource + some extra optional calls to of_
> > functions + some code to get the information for non-DT build.
> 
> You don't need to add stuff to the DT to use the byname interface.
> Really.  All you need is a way for the driver (well match table entry,
> really) to provide a list of names to attach to the reg entries in
> order.

the whole point of using *byname() is for the driver to not care about
the order of the resources. So if driver has to provided an ordered list
of names, what's the benefit ? Sounds really stupid to provide an
ordered list of names to an ordered list of resources, just to use
*byname() instead of just assuming the list of resources is already
ordered.

-- 
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20110812/e7931997/attachment.sig>


More information about the linux-arm-kernel mailing list