How to handle named resources with DT?

David Brown davidb at codeaurora.org
Thu Aug 11 05:57:54 EST 2011


On Wed, Aug 10, 2011 at 01:22:16PM -0600, Grant Likely wrote:

> Please, stick with the established convention and explicitly order
> 'reg' and 'interrupts' properties.  If there is a specific use case
> where this doesn't work, then bring it up, but I haven't seen any yet.
>  The current users of _byname that I've looked seem to only use it for
> convenience, not because a register range may be optional.  ie. they
> all fail out if a reg resource isn't present.

The msm_serial driver uses the presence of one of it's _byname reg
regions to distinguish between two different types of the controller.
Fortunately, it is the last register range that has this.

It's probably best to make the DT code depend on compatible (or some
attribute) to determine if this functionality is available, or in this
case, even make it a separate memory region.  I'm not sure what the
cleanest way is to implement this, and still have the driver work with
non-DT systems.

Patches coming soon...

David

-- 
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.


More information about the devicetree-discuss mailing list