lkml.org 
[lkml]   [2014]   [Sep]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/6] phy: improved lookup method
On Mon, Sep 22, 2014 at 05:07:55PM +0530, Kishon Vijay Abraham I wrote:
> On Thursday 18 September 2014 03:55 PM, Heikki Krogerus wrote:
> > On Mon, Sep 15, 2014 at 03:35:08PM +0300, Heikki Krogerus wrote:
> >> 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").
> >
> > Actually, I don't think there would be this problem if we used the
> > name of the actual device which is the parent of phy devices, right?
>
> hmm.. but if the parent is a multi-phy phy provider (like pipe3 PHY driver), we
> might end up with the same problem.

I'm not completely sure what you mean? If you are talking about
platforms with multiple instances of a single phy, I don't see how
there could ever be a scenario where we did not know the order in
which they were enumerated. Can you give an example again?


Thanks,

--
heikki


\
 
 \ /
  Last update: 2014-09-23 13:41    [W:0.098 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site