Subject: Re: [Pasemi-linux] I2C MDIO support for pasemi_mac driver

From: Olof Johansson <[email-masked]>
Date: Fri, 7 Mar 2008 12:48:54 -0600

On Fri, Mar 07, 2008 at 12:37:38PM -0600, Olof Johansson wrote:

> The i2c bus number should be available in the phy driver when it's
> probed/registered, so you should be able to get to it there. It's awkward
> that the MDIO and i2c busses have separate namespaces, it'll make it hard
> if there's ever a system with both mdio and smbus-based phys. We could
> control that by how the mdio bus is specified in device tree on those
> systems though, and make sure the bus number for the "real" mdio bus is
> sufficiently offset to give room for the smbus-based bus numbers below.

On second thought, it might be a better idea to change from BUS:ID to
BUSTYPE:BUS:ID in phylib, to separate the namespaces.

That, plus a way to get to an i2c bus number from a device tree node,
and we should be all set. That might be tricker though.

-Olof