Re: [PATCH 01/15] drivers: phy: add generic PHY framework

2013-08-20 Thread Felipe Balbi
Hi, On Mon, Aug 19, 2013 at 10:58:09AM +0530, Kishon Vijay Abraham I wrote: So maybe let's stop solving an already solved problem and just state that you need to explicitly assign device ID to use this framework? Felipe, Can we have it the way I had in my v10 patch series till we find

Re: [PATCH 01/15] drivers: phy: add generic PHY framework

2013-08-18 Thread Kishon Vijay Abraham I
Felipe, ping.. On Wednesday 14 August 2013 08:35 PM, Kishon Vijay Abraham I wrote: Hi, On Wednesday 14 August 2013 04:34 AM, Tomasz Figa wrote: On Wednesday 14 of August 2013 00:19:28 Sylwester Nawrocki wrote: W dniu 2013-08-13 14:05, Kishon Vijay Abraham I pisze: On Tuesday 13 August

Re: [PATCH 01/15] drivers: phy: add generic PHY framework

2013-08-14 Thread Kishon Vijay Abraham I
Hi, On Wednesday 14 August 2013 04:34 AM, Tomasz Figa wrote: On Wednesday 14 of August 2013 00:19:28 Sylwester Nawrocki wrote: W dniu 2013-08-13 14:05, Kishon Vijay Abraham I pisze: On Tuesday 13 August 2013 05:07 PM, Tomasz Figa wrote: On Tuesday 13 of August 2013 16:14:44 Kishon Vijay

Re: [PATCH 01/15] drivers: phy: add generic PHY framework

2013-08-13 Thread Kishon Vijay Abraham I
Hi, On Wednesday 31 July 2013 11:45 AM, Felipe Balbi wrote: Hi, On Wed, Jul 31, 2013 at 11:14:32AM +0530, Kishon Vijay Abraham I wrote: IMHO we need a lookup method for PHYs, just like for clocks, regulators, PWMs or even i2c busses because there are complex cases when passing just a name

Re: [PATCH 01/15] drivers: phy: add generic PHY framework

2013-08-13 Thread Tomasz Figa
On Tuesday 13 of August 2013 16:14:44 Kishon Vijay Abraham I wrote: Hi, On Wednesday 31 July 2013 11:45 AM, Felipe Balbi wrote: Hi, On Wed, Jul 31, 2013 at 11:14:32AM +0530, Kishon Vijay Abraham I wrote: IMHO we need a lookup method for PHYs, just like for clocks, regulators, PWMs

Re: [PATCH 01/15] drivers: phy: add generic PHY framework

2013-08-13 Thread Kishon Vijay Abraham I
On Tuesday 13 August 2013 05:07 PM, Tomasz Figa wrote: On Tuesday 13 of August 2013 16:14:44 Kishon Vijay Abraham I wrote: Hi, On Wednesday 31 July 2013 11:45 AM, Felipe Balbi wrote: Hi, On Wed, Jul 31, 2013 at 11:14:32AM +0530, Kishon Vijay Abraham I wrote: IMHO we need a lookup method

Re: [PATCH 01/15] drivers: phy: add generic PHY framework

2013-08-13 Thread Sylwester Nawrocki
W dniu 2013-08-13 14:05, Kishon Vijay Abraham I pisze: On Tuesday 13 August 2013 05:07 PM, Tomasz Figa wrote: On Tuesday 13 of August 2013 16:14:44 Kishon Vijay Abraham I wrote: On Wednesday 31 July 2013 11:45 AM, Felipe Balbi wrote: On Wed, Jul 31, 2013 at 11:14:32AM +0530, Kishon Vijay

Re: [PATCH 01/15] drivers: phy: add generic PHY framework

2013-08-13 Thread Tomasz Figa
On Wednesday 14 of August 2013 00:19:28 Sylwester Nawrocki wrote: W dniu 2013-08-13 14:05, Kishon Vijay Abraham I pisze: On Tuesday 13 August 2013 05:07 PM, Tomasz Figa wrote: On Tuesday 13 of August 2013 16:14:44 Kishon Vijay Abraham I wrote: On Wednesday 31 July 2013 11:45 AM, Felipe

Re: [PATCH 01/15] drivers: phy: add generic PHY framework

2013-07-31 Thread Felipe Balbi
Hi, On Wed, Jul 31, 2013 at 11:14:32AM +0530, Kishon Vijay Abraham I wrote: IMHO we need a lookup method for PHYs, just like for clocks, regulators, PWMs or even i2c busses because there are complex cases when passing just a name using platform data will not work. I would second what

Re: [PATCH 01/15] drivers: phy: add generic PHY framework

2013-07-30 Thread Felipe Balbi
On Sun, Jul 21, 2013 at 08:46:53AM -0700, Greg KH wrote: On Sun, Jul 21, 2013 at 01:12:07PM +0200, Tomasz Figa wrote: On Sunday 21 of July 2013 16:37:33 Kishon Vijay Abraham I wrote: Hi, On Sunday 21 July 2013 04:01 PM, Tomasz Figa wrote: Hi, On Saturday 20 of July 2013

Re: [PATCH 01/15] drivers: phy: add generic PHY framework

2013-07-30 Thread Kishon Vijay Abraham I
Hi, On Tuesday 30 July 2013 12:41 PM, Felipe Balbi wrote: On Sun, Jul 21, 2013 at 08:46:53AM -0700, Greg KH wrote: On Sun, Jul 21, 2013 at 01:12:07PM +0200, Tomasz Figa wrote: On Sunday 21 of July 2013 16:37:33 Kishon Vijay Abraham I wrote: Hi, On Sunday 21 July 2013 04:01 PM, Tomasz Figa

Re: [PATCH 01/15] drivers: phy: add generic PHY framework

2013-07-25 Thread Arnd Bergmann
On Thursday 25 July 2013, Kishon Vijay Abraham I wrote: On Thursday 25 July 2013 12:02 AM, Arnd Bergmann wrote: On Tuesday 23 July 2013, Tomasz Figa wrote: On Tuesday 23 of July 2013 17:14:20 Alan Stern wrote: On Tue, 23 Jul 2013, Tomasz Figa wrote: Where would you want to have those

Re: [PATCH 01/15] drivers: phy: add generic PHY framework

2013-07-25 Thread Sylwester Nawrocki
On 07/24/2013 08:32 PM, Arnd Bergmann wrote: On Tuesday 23 July 2013, Tomasz Figa wrote: On Tuesday 23 of July 2013 17:14:20 Alan Stern wrote: On Tue, 23 Jul 2013, Tomasz Figa wrote: Where would you want to have those phy_address arrays stored? There are no board files when booting with DT.

Re: [PATCH 01/15] drivers: phy: add generic PHY framework

2013-07-25 Thread Mark Brown
On Wed, Jul 24, 2013 at 08:32:03PM +0200, Arnd Bergmann wrote: Sorry for jumping in to the middle of the discussion, but why does a *new* framework even bother defining an interface for board files? Can't we just drop any interfaces for platform data passing in the phy framework and put the

Re: [PATCH 01/15] drivers: phy: add generic PHY framework

2013-07-25 Thread Laurent Pinchart
Hi Arnd, On Wednesday 24 July 2013 20:32:03 Arnd Bergmann wrote: On Tuesday 23 July 2013, Tomasz Figa wrote: On Tuesday 23 of July 2013 17:14:20 Alan Stern wrote: On Tue, 23 Jul 2013, Tomasz Figa wrote: Where would you want to have those phy_address arrays stored? There are no board

Re: [PATCH 01/15] drivers: phy: add generic PHY framework

2013-07-25 Thread Arnd Bergmann
On Thursday 25 July 2013, Laurent Pinchart wrote: On Wednesday 24 July 2013 20:32:03 Arnd Bergmann wrote: On Tuesday 23 July 2013, Tomasz Figa wrote: On Tuesday 23 of July 2013 17:14:20 Alan Stern wrote: On Tue, 23 Jul 2013, Tomasz Figa wrote: Where would you want to have those

Re: [PATCH 01/15] drivers: phy: add generic PHY framework

2013-07-25 Thread Laurent Pinchart
Hi Arnd, On Thursday 25 July 2013 13:00:49 Arnd Bergmann wrote: On Thursday 25 July 2013, Laurent Pinchart wrote: On Wednesday 24 July 2013 20:32:03 Arnd Bergmann wrote: On Tuesday 23 July 2013, Tomasz Figa wrote: On Tuesday 23 of July 2013 17:14:20 Alan Stern wrote: On Tue, 23 Jul

Re: [PATCH 01/15] drivers: phy: add generic PHY framework

2013-07-25 Thread Mark Brown
On Thu, Jul 25, 2013 at 01:00:49PM +0200, Arnd Bergmann wrote: I'm not saying that we can't support legacy board files with the common PHY framework, but I'd expect things to be much easier if we focus on those platforms that are actively being worked on for now, to bring an end to the

Re: [PATCH 01/15] drivers: phy: add generic PHY framework

2013-07-24 Thread Arnd Bergmann
On Tuesday 23 July 2013, Tomasz Figa wrote: On Tuesday 23 of July 2013 17:14:20 Alan Stern wrote: On Tue, 23 Jul 2013, Tomasz Figa wrote: Where would you want to have those phy_address arrays stored? There are no board files when booting with DT. Not even saying that you don't need to

Re: [PATCH 01/15] drivers: phy: add generic PHY framework

2013-07-23 Thread Tomasz Figa
Hi Alan, On Monday 22 of July 2013 10:44:39 Alan Stern wrote: On Mon, 22 Jul 2013, Kishon Vijay Abraham I wrote: The PHY and the controller it is attached to are both physical devices. The connection between them is hardwired by the system manufacturer and cannot be

Re: [PATCH 01/15] drivers: phy: add generic PHY framework

2013-07-23 Thread Tomasz Figa
[Fixed address of devicetree mailing list and added more people on CC.] For reference, full thread can be found under following link: http://thread.gmane.org/gmane.linux.ports.arm.kernel/252813 Best regards, Tomasz On Tuesday 23 of July 2013 09:29:32 Tomasz Figa wrote: Hi Alan, On Monday 22

Re: [PATCH 01/15] drivers: phy: add generic PHY framework

2013-07-23 Thread Alan Stern
On Tue, 23 Jul 2013, Tomasz Figa wrote: On Tuesday 23 of July 2013 09:29:32 Tomasz Figa wrote: Hi Alan, Thanks for helping to clarify the issues here. Okay. Are PHYs _always_ platform devices? They can be i2c, spi or any other device types as well. In those other cases, presumably

Re: [PATCH 01/15] drivers: phy: add generic PHY framework

2013-07-23 Thread Tomasz Figa
On Tuesday 23 of July 2013 10:37:05 Alan Stern wrote: On Tue, 23 Jul 2013, Tomasz Figa wrote: On Tuesday 23 of July 2013 09:29:32 Tomasz Figa wrote: Hi Alan, Thanks for helping to clarify the issues here. Okay. Are PHYs _always_ platform devices? They can be i2c, spi or any

Re: [PATCH 01/15] drivers: phy: add generic PHY framework

2013-07-23 Thread Kishon Vijay Abraham I
Hi, On Tuesday 23 July 2013 08:07 PM, Alan Stern wrote: On Tue, 23 Jul 2013, Tomasz Figa wrote: On Tuesday 23 of July 2013 09:29:32 Tomasz Figa wrote: Hi Alan, Thanks for helping to clarify the issues here. Okay. Are PHYs _always_ platform devices? They can be i2c, spi or any other

Re: [PATCH 01/15] drivers: phy: add generic PHY framework

2013-07-23 Thread Greg KH
On Tue, Jul 23, 2013 at 08:48:24PM +0530, Kishon Vijay Abraham I wrote: Hi, On Tuesday 23 July 2013 08:07 PM, Alan Stern wrote: On Tue, 23 Jul 2013, Tomasz Figa wrote: On Tuesday 23 of July 2013 09:29:32 Tomasz Figa wrote: Hi Alan, Thanks for helping to clarify the issues here.

Re: [PATCH 01/15] drivers: phy: add generic PHY framework

2013-07-23 Thread Kishon Vijay Abraham I
Hi Greg, On Tuesday 23 July 2013 09:48 PM, Greg KH wrote: On Tue, Jul 23, 2013 at 08:48:24PM +0530, Kishon Vijay Abraham I wrote: Hi, On Tuesday 23 July 2013 08:07 PM, Alan Stern wrote: On Tue, 23 Jul 2013, Tomasz Figa wrote: On Tuesday 23 of July 2013 09:29:32 Tomasz Figa wrote: Hi Alan,

Re: [PATCH 01/15] drivers: phy: add generic PHY framework

2013-07-23 Thread Greg KH
On Tue, Jul 23, 2013 at 09:58:34PM +0530, Kishon Vijay Abraham I wrote: Hi Greg, On Tuesday 23 July 2013 09:48 PM, Greg KH wrote: On Tue, Jul 23, 2013 at 08:48:24PM +0530, Kishon Vijay Abraham I wrote: Hi, On Tuesday 23 July 2013 08:07 PM, Alan Stern wrote: On Tue, 23 Jul 2013,

Re: [PATCH 01/15] drivers: phy: add generic PHY framework

2013-07-23 Thread Tomasz Figa
On Tuesday 23 of July 2013 09:18:46 Greg KH wrote: On Tue, Jul 23, 2013 at 08:48:24PM +0530, Kishon Vijay Abraham I wrote: Hi, On Tuesday 23 July 2013 08:07 PM, Alan Stern wrote: On Tue, 23 Jul 2013, Tomasz Figa wrote: On Tuesday 23 of July 2013 09:29:32 Tomasz Figa wrote: Hi

Re: [PATCH 01/15] drivers: phy: add generic PHY framework

2013-07-23 Thread Greg KH
On Tue, Jul 23, 2013 at 06:50:29PM +0200, Tomasz Figa wrote: Ick, no. Why can't you just pass the pointer to the phy itself? If you had a priv pointer to search from, then you could have just passed the original phy pointer in the first place, right? IMHO it would be better if you

Re: [PATCH 01/15] drivers: phy: add generic PHY framework

2013-07-23 Thread Mark Brown
On Tue, Jul 23, 2013 at 10:37:05AM -0400, Alan Stern wrote: On Tue, 23 Jul 2013, Tomasz Figa wrote: Okay. Are PHYs _always_ platform devices? They can be i2c, spi or any other device types as well. In those other cases, presumably there is no platform data associated with the PHY

Re: [PATCH 01/15] drivers: phy: add generic PHY framework

2013-07-23 Thread Mark Brown
On Tue, Jul 23, 2013 at 10:37:11AM -0700, Greg KH wrote: On Tue, Jul 23, 2013 at 06:50:29PM +0200, Tomasz Figa wrote: I fully agree that a simple, single string will not scale even in some, not so uncommon cases, but there is already a lot of existing lookup solutions over the kernel and

Re: [PATCH 01/15] drivers: phy: add generic PHY framework

2013-07-23 Thread Tomasz Figa
On Tuesday 23 of July 2013 10:37:11 Greg KH wrote: On Tue, Jul 23, 2013 at 06:50:29PM +0200, Tomasz Figa wrote: Ick, no. Why can't you just pass the pointer to the phy itself? If you had a priv pointer to search from, then you could have just passed the original phy pointer in

Re: [PATCH 01/15] drivers: phy: add generic PHY framework

2013-07-23 Thread Greg KH
On Tue, Jul 23, 2013 at 06:44:56PM +0100, Mark Brown wrote: On Tue, Jul 23, 2013 at 10:37:11AM -0700, Greg KH wrote: On Tue, Jul 23, 2013 at 06:50:29PM +0200, Tomasz Figa wrote: I fully agree that a simple, single string will not scale even in some, not so uncommon cases, but there

Re: [PATCH 01/15] drivers: phy: add generic PHY framework

2013-07-23 Thread Greg KH
On Tue, Jul 23, 2013 at 07:48:11PM +0200, Tomasz Figa wrote: On Tuesday 23 of July 2013 10:37:11 Greg KH wrote: On Tue, Jul 23, 2013 at 06:50:29PM +0200, Tomasz Figa wrote: Ick, no. Why can't you just pass the pointer to the phy itself? If you had a priv pointer to search from,

Re: [PATCH 01/15] drivers: phy: add generic PHY framework

2013-07-23 Thread Mark Brown
On Tue, Jul 23, 2013 at 11:01:10AM -0700, Greg KH wrote: On Tue, Jul 23, 2013 at 06:44:56PM +0100, Mark Brown wrote: What are the problems you are seeing with doing things with lookups? You don't know the id of the device you are looking up, due to multiple devices being in the system

Re: [PATCH 01/15] drivers: phy: add generic PHY framework

2013-07-23 Thread Alan Stern
On Tue, 23 Jul 2013, Tomasz Figa wrote: IMHO it would be better if you provided some code example, but let's try to check if I understood you correctly. 8 [Board file] static struct phy my_phy; static struct

Re: [PATCH 01/15] drivers: phy: add generic PHY framework

2013-07-23 Thread Greg KH
On Tue, Jul 23, 2013 at 08:31:05PM +0100, Mark Brown wrote: You don't know the id of the device you are looking up, due to multiple devices being in the system (dynamic ids, look back earlier in this thread for details about that.) I got copied in very late so don't have most of the

Re: [PATCH 01/15] drivers: phy: add generic PHY framework

2013-07-23 Thread Tomasz Figa
On Tuesday 23 of July 2013 12:44:23 Greg KH wrote: On Tue, Jul 23, 2013 at 08:31:05PM +0100, Mark Brown wrote: You don't know the id of the device you are looking up, due to multiple devices being in the system (dynamic ids, look back earlier in this thread for details about that.)

Re: [PATCH 01/15] drivers: phy: add generic PHY framework

2013-07-23 Thread Tomasz Figa
On Tuesday 23 of July 2013 15:36:00 Alan Stern wrote: On Tue, 23 Jul 2013, Tomasz Figa wrote: IMHO it would be better if you provided some code example, but let's try to check if I understood you correctly. 8--- -

Re: [PATCH 01/15] drivers: phy: add generic PHY framework

2013-07-23 Thread Tomasz Figa
On Tuesday 23 of July 2013 11:04:14 Greg KH wrote: On Tue, Jul 23, 2013 at 07:48:11PM +0200, Tomasz Figa wrote: On Tuesday 23 of July 2013 10:37:11 Greg KH wrote: On Tue, Jul 23, 2013 at 06:50:29PM +0200, Tomasz Figa wrote: Ick, no. Why can't you just pass the pointer to the phy

Re: [PATCH 01/15] drivers: phy: add generic PHY framework

2013-07-23 Thread Greg KH
On Tue, Jul 23, 2013 at 10:07:52PM +0200, Tomasz Figa wrote: On Tuesday 23 of July 2013 12:44:23 Greg KH wrote: On Tue, Jul 23, 2013 at 08:31:05PM +0100, Mark Brown wrote: You don't know the id of the device you are looking up, due to multiple devices being in the system (dynamic ids,

Re: [PATCH 01/15] drivers: phy: add generic PHY framework

2013-07-23 Thread Alan Stern
On Tue, 23 Jul 2013, Tomasz Figa wrote: That's what I was going to suggest too. The struct phy is defined in the board file, which already knows about all the PHYs that exist in the system. (Or perhaps it is allocated dynamically, so that when many board files are present in the same

Re: [PATCH 01/15] drivers: phy: add generic PHY framework

2013-07-23 Thread Tomasz Figa
On Tuesday 23 of July 2013 16:53:55 Alan Stern wrote: On Tue, 23 Jul 2013, Tomasz Figa wrote: That's what I was going to suggest too. The struct phy is defined in the board file, which already knows about all the PHYs that exist in the system. (Or perhaps it is allocated

Re: [PATCH 01/15] drivers: phy: add generic PHY framework

2013-07-23 Thread Tomasz Figa
On Tuesday 23 of July 2013 13:50:07 Greg KH wrote: On Tue, Jul 23, 2013 at 10:07:52PM +0200, Tomasz Figa wrote: On Tuesday 23 of July 2013 12:44:23 Greg KH wrote: On Tue, Jul 23, 2013 at 08:31:05PM +0100, Mark Brown wrote: You don't know the id of the device you are looking up, due to

Re: [PATCH 01/15] drivers: phy: add generic PHY framework

2013-07-23 Thread Alan Stern
On Tue, 23 Jul 2013, Tomasz Figa wrote: If you want to keep the phy struct completely separate from the board file, there's an easy way to do it. Let's say the board file knows about N different PHYs in the system. Then you define an array of N pointers to phys: struct phy

Re: [PATCH 01/15] drivers: phy: add generic PHY framework

2013-07-23 Thread Greg KH
On Tue, Jul 23, 2013 at 11:05:48PM +0200, Tomasz Figa wrote: That's not so bad, as long as you let the phy core use whatever name it wants for the device when it registers it with sysfs. Yes, in regulator core consumer names are completely separated from this. Regulator core simply

Re: [PATCH 01/15] drivers: phy: add generic PHY framework

2013-07-23 Thread Mark Brown
On Tue, Jul 23, 2013 at 12:44:23PM -0700, Greg KH wrote: On Tue, Jul 23, 2013 at 08:31:05PM +0100, Mark Brown wrote: statement. In any case this is why the APIs doing lookups do the lookups in the context of the requesting device - devices ask for whatever name they use locally. What do

Re: [PATCH 01/15] drivers: phy: add generic PHY framework

2013-07-22 Thread Kishon Vijay Abraham I
Hi, On Monday 22 July 2013 12:52 AM, Alan Stern wrote: On Sun, 21 Jul 2013, Sylwester Nawrocki wrote: What's wrong with the platform_data structure, why can't that be used for this? At the point the platform data of some driver is initialized, e.g. in board setup code the PHY pointer is

Re: [PATCH 01/15] drivers: phy: add generic PHY framework

2013-07-22 Thread Greg KH
On Mon, Jul 22, 2013 at 12:55:18PM +0530, Kishon Vijay Abraham I wrote: The issue (or one of the issues) in this discussion is that Greg does not like the idea of using names or IDs to associate PHYs with controllers, because they are too prone to duplications or other

Re: [PATCH 01/15] drivers: phy: add generic PHY framework

2013-07-22 Thread Alan Stern
On Mon, 22 Jul 2013, Kishon Vijay Abraham I wrote: The PHY and the controller it is attached to are both physical devices. The connection between them is hardwired by the system manufacturer and cannot be changed by software. PHYs are generally described by

Re: [PATCH 01/15] drivers: phy: add generic PHY framework

2013-07-22 Thread Kishon Vijay Abraham I
Hi, On Monday 22 July 2013 08:34 PM, Greg KH wrote: On Mon, Jul 22, 2013 at 12:55:18PM +0530, Kishon Vijay Abraham I wrote: The issue (or one of the issues) in this discussion is that Greg does not like the idea of using names or IDs to associate PHYs with controllers, because

Re: [PATCH 01/15] drivers: phy: add generic PHY framework

2013-07-21 Thread Sascha Hauer
On Sat, Jul 20, 2013 at 07:59:10PM -0700, Greg KH wrote: On Sat, Jul 20, 2013 at 10:32:26PM -0400, Alan Stern wrote: On Sat, 20 Jul 2013, Greg KH wrote: That should be passed using platform data. Ick, don't pass strings around, pass pointers. If you have platform data you

Re: [PATCH 01/15] drivers: phy: add generic PHY framework

2013-07-21 Thread Tomasz Figa
Hi, On Saturday 20 of July 2013 19:59:10 Greg KH wrote: On Sat, Jul 20, 2013 at 10:32:26PM -0400, Alan Stern wrote: On Sat, 20 Jul 2013, Greg KH wrote: That should be passed using platform data. Ick, don't pass strings around, pass pointers. If you have platform data you

Re: [PATCH 01/15] drivers: phy: add generic PHY framework

2013-07-21 Thread Kishon Vijay Abraham I
Hi, On Sunday 21 July 2013 04:01 PM, Tomasz Figa wrote: Hi, On Saturday 20 of July 2013 19:59:10 Greg KH wrote: On Sat, Jul 20, 2013 at 10:32:26PM -0400, Alan Stern wrote: On Sat, 20 Jul 2013, Greg KH wrote: That should be passed using platform data. Ick, don't pass strings around, pass

Re: [PATCH 01/15] drivers: phy: add generic PHY framework

2013-07-21 Thread Tomasz Figa
On Sunday 21 of July 2013 16:37:33 Kishon Vijay Abraham I wrote: Hi, On Sunday 21 July 2013 04:01 PM, Tomasz Figa wrote: Hi, On Saturday 20 of July 2013 19:59:10 Greg KH wrote: On Sat, Jul 20, 2013 at 10:32:26PM -0400, Alan Stern wrote: On Sat, 20 Jul 2013, Greg KH wrote: That

Re: [PATCH 01/15] drivers: phy: add generic PHY framework

2013-07-21 Thread Greg KH
On Sun, Jul 21, 2013 at 01:12:07PM +0200, Tomasz Figa wrote: On Sunday 21 of July 2013 16:37:33 Kishon Vijay Abraham I wrote: Hi, On Sunday 21 July 2013 04:01 PM, Tomasz Figa wrote: Hi, On Saturday 20 of July 2013 19:59:10 Greg KH wrote: On Sat, Jul 20, 2013 at 10:32:26PM

Re: [PATCH 01/15] drivers: phy: add generic PHY framework

2013-07-21 Thread Greg KH
On Sun, Jul 21, 2013 at 12:22:48PM +0200, Sascha Hauer wrote: On Sat, Jul 20, 2013 at 07:59:10PM -0700, Greg KH wrote: On Sat, Jul 20, 2013 at 10:32:26PM -0400, Alan Stern wrote: On Sat, 20 Jul 2013, Greg KH wrote: That should be passed using platform data. Ick, don't

Re: [PATCH 01/15] drivers: phy: add generic PHY framework

2013-07-21 Thread Sylwester Nawrocki
On 07/21/2013 05:48 PM, Greg KH wrote: On Sun, Jul 21, 2013 at 12:22:48PM +0200, Sascha Hauer wrote: On Sat, Jul 20, 2013 at 07:59:10PM -0700, Greg KH wrote: On Sat, Jul 20, 2013 at 10:32:26PM -0400, Alan Stern wrote: On Sat, 20 Jul 2013, Greg KH wrote: That should be passed using platform

Re: [PATCH 01/15] drivers: phy: add generic PHY framework

2013-07-21 Thread Alan Stern
On Sun, 21 Jul 2013, Sylwester Nawrocki wrote: What's wrong with the platform_data structure, why can't that be used for this? At the point the platform data of some driver is initialized, e.g. in board setup code the PHY pointer is not known, since the PHY supplier driver has not

Re: [PATCH 01/15] drivers: phy: add generic PHY framework

2013-07-20 Thread Greg KH
On Sat, Jul 20, 2013 at 08:49:32AM +0530, Kishon Vijay Abraham I wrote: Hi, On Saturday 20 July 2013 05:20 AM, Greg KH wrote: On Fri, Jul 19, 2013 at 12:06:01PM +0530, Kishon Vijay Abraham I wrote: Hi, On Friday 19 July 2013 11:59 AM, Greg KH wrote: On Fri, Jul 19, 2013 at 11:25:44AM

Re: [PATCH 01/15] drivers: phy: add generic PHY framework

2013-07-20 Thread Alan Stern
On Sat, 20 Jul 2013, Greg KH wrote: That should be passed using platform data. Ick, don't pass strings around, pass pointers. If you have platform data you can get to, then put the pointer there, don't use a name. I don't think I understood you here :-s We wont have phy pointer

Re: [PATCH 01/15] drivers: phy: add generic PHY framework

2013-07-20 Thread Greg KH
On Sat, Jul 20, 2013 at 10:32:26PM -0400, Alan Stern wrote: On Sat, 20 Jul 2013, Greg KH wrote: That should be passed using platform data. Ick, don't pass strings around, pass pointers. If you have platform data you can get to, then put the pointer there, don't use a name.

Re: [PATCH 01/15] drivers: phy: add generic PHY framework

2013-07-19 Thread Greg KH
On Fri, Jul 19, 2013 at 11:25:44AM +0530, Kishon Vijay Abraham I wrote: Hi, On Friday 19 July 2013 11:13 AM, Greg KH wrote: On Fri, Jul 19, 2013 at 11:07:10AM +0530, Kishon Vijay Abraham I wrote: + ret = dev_set_name(phy-dev, %s.%d, dev_name(dev), id); Your naming is odd, no phy

Re: [PATCH 01/15] drivers: phy: add generic PHY framework

2013-07-19 Thread Kishon Vijay Abraham I
Hi, On Friday 19 July 2013 11:59 AM, Greg KH wrote: On Fri, Jul 19, 2013 at 11:25:44AM +0530, Kishon Vijay Abraham I wrote: Hi, On Friday 19 July 2013 11:13 AM, Greg KH wrote: On Fri, Jul 19, 2013 at 11:07:10AM +0530, Kishon Vijay Abraham I wrote: + ret = dev_set_name(phy-dev, %s.%d,

Re: [PATCH 01/15] drivers: phy: add generic PHY framework

2013-07-19 Thread Stephen Warren
On 07/19/2013 12:36 AM, Kishon Vijay Abraham I wrote: Hi, On Friday 19 July 2013 11:59 AM, Greg KH wrote: On Fri, Jul 19, 2013 at 11:25:44AM +0530, Kishon Vijay Abraham I wrote: Hi, On Friday 19 July 2013 11:13 AM, Greg KH wrote: On Fri, Jul 19, 2013 at 11:07:10AM +0530, Kishon Vijay

Re: [PATCH 01/15] drivers: phy: add generic PHY framework

2013-07-19 Thread Kishon Vijay Abraham I
Hi, On Friday 19 July 2013 09:24 PM, Stephen Warren wrote: On 07/19/2013 12:36 AM, Kishon Vijay Abraham I wrote: Hi, On Friday 19 July 2013 11:59 AM, Greg KH wrote: On Fri, Jul 19, 2013 at 11:25:44AM +0530, Kishon Vijay Abraham I wrote: Hi, On Friday 19 July 2013 11:13 AM, Greg KH wrote:

Re: [PATCH 01/15] drivers: phy: add generic PHY framework

2013-07-19 Thread Kishon Vijay Abraham I
Hi, On Saturday 20 July 2013 05:20 AM, Greg KH wrote: On Fri, Jul 19, 2013 at 12:06:01PM +0530, Kishon Vijay Abraham I wrote: Hi, On Friday 19 July 2013 11:59 AM, Greg KH wrote: On Fri, Jul 19, 2013 at 11:25:44AM +0530, Kishon Vijay Abraham I wrote: Hi, On Friday 19 July 2013 11:13 AM,

[PATCH 01/15] drivers: phy: add generic PHY framework

2013-07-18 Thread Kishon Vijay Abraham I
The PHY framework provides a set of APIs for the PHY drivers to create/destroy a PHY and APIs for the PHY users to obtain a reference to the PHY with or without using phandle. For dt-boot, the PHY drivers should also register *PHY provider* with the framework. PHY drivers should create the PHY by

Re: [PATCH 01/15] drivers: phy: add generic PHY framework

2013-07-18 Thread Greg KH
On Thu, Jul 18, 2013 at 12:16:10PM +0530, Kishon Vijay Abraham I wrote: +struct phy_provider *__of_phy_provider_register(struct device *dev, + struct module *owner, struct phy * (*of_xlate)(struct device *dev, + struct of_phandle_args *args)); +struct phy_provider

Re: [PATCH 01/15] drivers: phy: add generic PHY framework

2013-07-18 Thread Kishon Vijay Abraham I
Hi, On Thursday 18 July 2013 12:50 PM, Greg KH wrote: On Thu, Jul 18, 2013 at 12:16:10PM +0530, Kishon Vijay Abraham I wrote: +struct phy_provider *__of_phy_provider_register(struct device *dev, +struct module *owner, struct phy * (*of_xlate)(struct device *dev, +struct

Re: [PATCH 01/15] drivers: phy: add generic PHY framework

2013-07-18 Thread Greg KH
On Thu, Jul 18, 2013 at 02:29:52PM +0530, Kishon Vijay Abraham I wrote: Hi, On Thursday 18 July 2013 12:50 PM, Greg KH wrote: On Thu, Jul 18, 2013 at 12:16:10PM +0530, Kishon Vijay Abraham I wrote: +struct phy_provider *__of_phy_provider_register(struct device *dev, + struct module

Re: [PATCH 01/15] drivers: phy: add generic PHY framework

2013-07-18 Thread Kishon Vijay Abraham I
Hi, On Thursday 18 July 2013 09:19 PM, Greg KH wrote: On Thu, Jul 18, 2013 at 02:29:52PM +0530, Kishon Vijay Abraham I wrote: Hi, On Thursday 18 July 2013 12:50 PM, Greg KH wrote: On Thu, Jul 18, 2013 at 12:16:10PM +0530, Kishon Vijay Abraham I wrote: +struct phy_provider

Re: [PATCH 01/15] drivers: phy: add generic PHY framework

2013-07-18 Thread Greg KH
On Fri, Jul 19, 2013 at 11:07:10AM +0530, Kishon Vijay Abraham I wrote: +ret = dev_set_name(phy-dev, %s.%d, dev_name(dev), id); Your naming is odd, no phy anywhere in it? You rely on the sender to never send a duplicate name.id pair? Why not create your own ids based on the

Re: [PATCH 01/15] drivers: phy: add generic PHY framework

2013-07-18 Thread Kishon Vijay Abraham I
Hi, On Friday 19 July 2013 11:13 AM, Greg KH wrote: On Fri, Jul 19, 2013 at 11:07:10AM +0530, Kishon Vijay Abraham I wrote: +ret = dev_set_name(phy-dev, %s.%d, dev_name(dev), id); Your naming is odd, no phy anywhere in it? You rely on the sender to never send a duplicate name.id