<p dir="ltr"><br>
On Aug 16, 2012 3:46 PM, "Mitch Bradley" <<a href="mailto:wmb@firmworks.com">wmb@firmworks.com</a>> wrote:<br>
><br>
> Here is the situation: We (OLPC) have an audio codec that is strongly<br>
> associated with an audio controller, but it also has some registers that<br>
> you get at with I2C.<br>
><br>
> In some sense, the codec has two parents, the audio controller<br>
> (connected via I2S) and the I2C controller.<br>
><br>
> Is there an established Linux convention for expressing that dual-parent<br>
> relationship for I2C? The phandle schemes for cross-tree gpio, clk, and<br>
> interrupt relationships obviously bear some resemblance to the problem,<br>
> but I haven't seen anything for I2C.</p>
<p dir="ltr">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.</p>
<p dir="ltr">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).</p>
<p dir="ltr">g.</p>
<p dir="ltr">><br>
> (We actually have two devices with the same problem - the other is an<br>
> LCD panel controller than wants to be a child of the display device, but<br>
> also has some I2C registers accessed by an IC2 controller that's not<br>
> part of the display controller.)<br>
><br>
</p>