GPIO - marking individual pins (not) available in device tree
David Gibson
david at gibson.dropbear.id.au
Fri Oct 24 15:58:24 EST 2008
On Thu, Oct 23, 2008 at 06:05:19PM -0500, Matt Sealey wrote:
>
>
> Mitch Bradley wrote:
> [snip]
>
>> You could adopt the convention that preassigned GPIOs must be
>> represented by subordinate nodes, and any GPIO that is not covered by a
>> subordinate node's "reg" property is implicitly available. That's the
>> way it works for other address spaces.
[snip]
> At the moment it's encoded as:
>
> gpios = <&controller-phandle pin-number pin-flags>
Actually, it's not. The gpios property is:
<controller-phandle gpio-descriptor ...>
The "gpio-descriptor" (like an interrupt descriptor from IEEE1275) is
a blob with number of cells equal to #gpio-cells from the controller.
The internal layout of the descriptor is specific to the gpio
controller. Typically it includes a pin number and flags/mode.
However, it could be, and sometimes is, encoded as bank-number /
pin-number / flags. Or even something more involved still, if that's
useful for the specific gpio controller in question. Or it could
simply be pin number if it's associated with a really simple gpio
controller where all pins have the same behaviour.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
More information about the devicetree-discuss
mailing list