Re: [PATCH 2/6] phy: improved lookup method

2014-09-28 Thread Kishon Vijay Abraham I
On Thursday 25 September 2014 12:30 PM, Heikki Krogerus 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", >>>

Re: [PATCH 2/6] phy: improved lookup method

2014-09-25 Thread Heikki Krogerus
> >>> 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_looku

Re: [PATCH 2/6] phy: improved lookup method

2014-09-24 Thread Kishon Vijay Abraham I
Hi, On Tuesday 23 September 2014 05:13 PM, Heikki Krogerus wrote: > On Tue, Sep 23, 2014 at 04:33:09PM +0530, Kishon Vijay Abraham I wrote: >> Hi, >> >> On Tuesday 23 September 2014 04:23 PM, Heikki Krogerus wrote: >>> On Mon, Sep 22, 2014 at 05:07:55PM +0530, Kishon Vijay Abraham I wrote: On

Re: [PATCH 2/6] phy: improved lookup method

2014-09-23 Thread Heikki Krogerus
On Tue, Sep 23, 2014 at 04:33:09PM +0530, Kishon Vijay Abraham I wrote: > Hi, > > On Tuesday 23 September 2014 04:23 PM, Heikki Krogerus wrote: > > 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 M

Re: [PATCH 2/6] phy: improved lookup method

2014-09-23 Thread Kishon Vijay Abraham I
Hi, On Tuesday 23 September 2014 04:23 PM, Heikki Krogerus wrote: > 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, 20

Re: [PATCH 2/6] phy: improved lookup method

2014-09-23 Thread Heikki Krogerus
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

Re: [PATCH 2/6] phy: improved lookup method

2014-09-22 Thread Kishon Vijay Abraham I
Hi, 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 = { >

Re: [PATCH 2/6] phy: improved lookup method

2014-09-18 Thread Heikki Krogerus
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"

Re: [PATCH 2/6] phy: improved lookup method

2014-09-15 Thread Heikki Krogerus
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 s

Re: [PATCH 2/6] phy: improved lookup method

2014-09-12 Thread Kishon Vijay Abraham I
Hi, On Friday 12 September 2014 07:37 PM, Heikki Krogerus wrote: > On Thu, Sep 11, 2014 at 09:03:06PM +0530, Kishon Vijay Abraham I wrote: >>> +static struct phy *phy_find(struct device *dev, const char *con_id) >>> +{ >>> + const char *dev_id = dev ? dev_name(dev) : NULL; >>> + int match, bes

Re: [PATCH 2/6] phy: improved lookup method

2014-09-12 Thread Heikki Krogerus
On Thu, Sep 11, 2014 at 09:03:06PM +0530, Kishon Vijay Abraham I wrote: > > +static struct phy *phy_find(struct device *dev, const char *con_id) > > +{ > > + const char *dev_id = dev ? dev_name(dev) : NULL; > > + int match, best_found = 0, best_possible = 0; > > + struct phy *phy = ERR_PTR(-E

Re: [PATCH 2/6] phy: improved lookup method

2014-09-11 Thread Kishon Vijay Abraham I
Hi, On Thursday 21 August 2014 05:03 PM, Heikki Krogerus wrote: > Removes the need for the phys to be aware of their users > even when not using DT. The method is copied from clkdev.c. > > Signed-off-by: Heikki Krogerus > Tested-by: Vivek Gautam > --- > . . . . > > diff --git a/drivers/phy/

[PATCH 2/6] phy: improved lookup method

2014-08-21 Thread Heikki Krogerus
Removes the need for the phys to be aware of their users even when not using DT. The method is copied from clkdev.c. Signed-off-by: Heikki Krogerus Tested-by: Vivek Gautam --- Documentation/phy.txt | 66 --- drivers/phy/phy-core.c | 135 ++