[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140915123508.GA16653@xps8300>
Date: Mon, 15 Sep 2014 15:35:08 +0300
From: Heikki Krogerus <heikki.krogerus@...ux.intel.com>
To: Kishon Vijay Abraham I <kishon@...com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Felipe Balbi <balbi@...com>,
Vivek Gautam <gautam.vivek@...sung.com>,
linux-kernel@...r.kernel.org, linux-usb@...r.kernel.org
Subject: Re: [PATCH 2/6] phy: improved lookup method
On Fri, Sep 12, 2014 at 08:16:01PM +0530, Kishon Vijay Abraham I wrote:
> Assume you have 2 phys in your system..
> static struct phy_lookup usb_lookup = {
> .phy_name = "phy-usb.0",
> .dev_id = "usb.0",
> .con_id = "usb",
> };
>
> static struct phy_lookup sata_lookup = {
> .phy_name = "sata-usb.1",
> .dev_id = "sata.0",
> .con_id = "sata",
> };
>
> First you do modprobe phy-usb, the probe of USB PHY driver gets invoked and it
> creates the PHY. The phy-core will find a free id (now it will be 0) and then
> name the phy as phy-usb.0.
> Then with modprobe phy-sata, the phy-core will create phy-sata.1.
>
> This is an ideal case where the .phy_name in phy_lookup matches.
>
> Consider if the order is flipped and the user does modprobe phy-sata first. The
> phy_names won't match anymore (the sata phy device name would be "sata-usb.0").
True!
So we can't accept statically created lookups. Which is probable the
best thing to do in any case even if there wasn't this issue.
I think we already talked about this. I know I was going to create the
lookup for twl4030 in twl-core.c instead of the board file at one
point, but forgot about it. I need to do that now.
In any case, I'll fix this by dropping the possibility of creating the
lookups statically. I'll prepare new version of the whole set.
Thanks,
--
heikki
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists