Re: [PATCH] MII bus API for PHY devices

From: Andy Fleming
Date: Thu Nov 18 2004 - 15:17:26 EST



On Nov 18, 2004, at 13:34, Jason McMullan wrote:
3) How should we bind ethernet drivers to PHY drivers?

A PHY 'platform_data' struct like:

struct phy_device_data {
struct {
const char *name;
int id;
} ethernet_platform_device_parent;
int phy_id;
}

So you would have each PHY know the controller to which it's attached? I would have thought the other way around... Hm. I will definitely have to read up on my driver model stuff


Oh, and a 4th side-issue:
Should each PHY have its own file?

Actually, each PHY should have it's own device directory, like every
other device. Eventually, PHYs should have /dev/phy* entries, where
user-space can read/write PHY registers.

I think you misunderstood. Are you talking about sysfs? I was talking about actual source files. i.e. should there be dm9161.c, m88e1101.c, cis8201.c, etc.

Also, do we need user-space to read/write PHY registers. ethtool has this capability, I believe, and the interfaces there are settled.

Andy Fleming

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/