Associating devices with multiple parents

Grant Likely grant.likely at secretlab.ca
Fri Aug 17 08:20:47 EST 2012


On Aug 16, 2012 3:46 PM, "Mitch Bradley" <wmb at firmworks.com> wrote:
>
> Here is the situation:  We (OLPC) have an audio codec that is strongly
> associated with an audio controller, but it also has some registers that
> you get at with I2C.
>
> In some sense, the codec has two parents, the audio controller
> (connected via I2S) and the I2C controller.
>
> Is there an established Linux convention for expressing that dual-parent
> relationship for I2C?  The phandle schemes for cross-tree gpio, clk, and
> interrupt relationships obviously bear some resemblance to the problem,
> but I haven't seen anything for I2C.

Yes. Place the codec under the i2c controller and use a tope level audio
complex node with phandles to both the codec and i2s nodes.

Generally we've been choosing patent hood based on the path used to control
the device, as opposed to the data path. Another example is ETH phy devices
on an MDIO bus and the ETH MAC has a phandle to the phy(s).

g.

>
> (We actually have two devices with the same problem - the other is an
> LCD panel controller than wants to be a child of the display device, but
> also has some I2C registers accessed by an IC2 controller that's not
> part of the display controller.)
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/devicetree-discuss/attachments/20120816/01c74fb4/attachment.html>


More information about the devicetree-discuss mailing list