Re: [PATCH v3] USB: PHY: Palmas USB Transceiver Driver

2013-03-27 Thread Graeme Gregory
On 26/03/13 20:23, Stephen Warren wrote: > On 03/26/2013 10:57 AM, Graeme Gregory wrote: >> On 26/03/13 16:22, Stephen Warren wrote: >>> On 03/26/2013 03:27 AM, Graeme Gregory wrote: >>> ... If we are tightly coupling as above then using platform_irq is an extra inefficiency. You both hav

Re: [PATCH v3] USB: PHY: Palmas USB Transceiver Driver

2013-03-26 Thread Stephen Warren
On 03/26/2013 10:57 AM, Graeme Gregory wrote: > On 26/03/13 16:22, Stephen Warren wrote: >> On 03/26/2013 03:27 AM, Graeme Gregory wrote: >> ... >>> If we are tightly coupling as above then using platform_irq is an extra >>> inefficiency. You both have to populate this then parse it afterwards. >>>

Re: [PATCH v3] USB: PHY: Palmas USB Transceiver Driver

2013-03-26 Thread Graeme Gregory
On 26/03/13 16:22, Stephen Warren wrote: > On 03/26/2013 03:27 AM, Graeme Gregory wrote: > ... >> If we are tightly coupling as above then using platform_irq is an extra >> inefficiency. You both have to populate this then parse it afterwards. >> Why not just use the regmap helper? Ill admit this c

Re: [PATCH v3] USB: PHY: Palmas USB Transceiver Driver

2013-03-26 Thread Stephen Warren
On 03/26/2013 03:27 AM, Graeme Gregory wrote: ... > If we are tightly coupling as above then using platform_irq is an extra > inefficiency. You both have to populate this then parse it afterwards. > Why not just use the regmap helper? Ill admit this code is like this as > there was a period where p

Re: [PATCH v3] USB: PHY: Palmas USB Transceiver Driver

2013-03-26 Thread Stephen Warren
On 03/26/2013 04:28 AM, Laxman Dewangan wrote: > On Tuesday 26 March 2013 03:51 PM, Felipe Balbi wrote: >> On Tue, Mar 26, 2013 at 09:01:42AM +, Graeme Gregory wrote: ... > + return regmap_read(palmas->regmap[slave], addr, dest); > > > Please use the generic api for palmas

Re: [PATCH v3] USB: PHY: Palmas USB Transceiver Driver

2013-03-26 Thread Felipe Balbi
Hi, On Tue, Mar 26, 2013 at 03:58:41PM +0530, Laxman Dewangan wrote: > On Tuesday 26 March 2013 03:51 PM, Felipe Balbi wrote: > >* PGP Signed by an unknown key > > > >Hi, > > > >On Tue, Mar 26, 2013 at 09:01:42AM +, Graeme Gregory wrote: > >From: Graeme Gregory > > > >This is the

Re: [PATCH v3] USB: PHY: Palmas USB Transceiver Driver

2013-03-26 Thread Laxman Dewangan
On Tuesday 26 March 2013 03:21 PM, Graeme Gregory wrote: On 26/03/13 09:34, Laxman Dewangan wrote: Kishon, I think it is very much possible. You can pass the interrupt throough IRQ_RESOURCE and populate it from DT. If you provide proper interrupt parent and irq number then irq framework take ca

Re: [PATCH v3] USB: PHY: Palmas USB Transceiver Driver

2013-03-26 Thread Laxman Dewangan
On Tuesday 26 March 2013 03:51 PM, Felipe Balbi wrote: * PGP Signed by an unknown key Hi, On Tue, Mar 26, 2013 at 09:01:42AM +, Graeme Gregory wrote: From: Graeme Gregory This is the driver for the OTG transceiver built into the Palmas chip. It handles the various USB OTG events that can

Re: [PATCH v3] USB: PHY: Palmas USB Transceiver Driver

2013-03-26 Thread Felipe Balbi
Hi, On Tue, Mar 26, 2013 at 09:01:42AM +, Graeme Gregory wrote: > >>> From: Graeme Gregory > >>> > >>> This is the driver for the OTG transceiver built into the Palmas > >>> chip. It > >>> handles the various USB OTG events that can be generated by cable > >>> insertion/removal. > >>> > >>> S

Re: [PATCH v3] USB: PHY: Palmas USB Transceiver Driver

2013-03-26 Thread Felipe Balbi
Hi, On Tue, Mar 26, 2013 at 11:33:44AM +0530, Kishon Vijay Abraham I wrote: > >>+static int palmas_usb_write(struct palmas *palmas, unsigned int reg, > >>+ unsigned int data) > >>+{ > >>+ unsigned int addr; > >>+ int slave; > >>+ > >>+ slave = PALMAS_BASE_TO_SLAVE(P

Re: [PATCH v3] USB: PHY: Palmas USB Transceiver Driver

2013-03-26 Thread Graeme Gregory
On 26/03/13 09:34, Laxman Dewangan wrote: > On Tuesday 26 March 2013 02:57 PM, Graeme Gregory wrote: >> On 26/03/13 09:12, Laxman Dewangan wrote: >>> On Tuesday 26 March 2013 02:31 PM, Graeme Gregory wrote: >>> >>> But still you are using the PALMAS macro here and indirectly it is >>> tied up. It i

Re: [PATCH v3] USB: PHY: Palmas USB Transceiver Driver

2013-03-26 Thread Laxman Dewangan
On Tuesday 26 March 2013 02:57 PM, Graeme Gregory wrote: On 26/03/13 09:12, Laxman Dewangan wrote: On Tuesday 26 March 2013 02:31 PM, Graeme Gregory wrote: But still you are using the PALMAS macro here and indirectly it is tied up. It is not completely independent. If need to be independent the

Re: [PATCH v3] USB: PHY: Palmas USB Transceiver Driver

2013-03-26 Thread Graeme Gregory
On 26/03/13 09:12, Laxman Dewangan wrote: > On Tuesday 26 March 2013 02:31 PM, Graeme Gregory wrote: >> On 26/03/13 06:03, Kishon Vijay Abraham I wrote: +static int palmas_usb_read(struct palmas *palmas, unsigned int reg, + unsigned int *dest) +{ + unsigned i

Re: [PATCH v3] USB: PHY: Palmas USB Transceiver Driver

2013-03-26 Thread Laxman Dewangan
On Tuesday 26 March 2013 02:31 PM, Graeme Gregory wrote: On 26/03/13 06:03, Kishon Vijay Abraham I wrote: +static int palmas_usb_read(struct palmas *palmas, unsigned int reg, + unsigned int *dest) +{ + unsigned int addr; + int slave; + + slave = PALMAS_BASE_TO_SLA

Re: [PATCH v3] USB: PHY: Palmas USB Transceiver Driver

2013-03-26 Thread Graeme Gregory
On 26/03/13 06:03, Kishon Vijay Abraham I wrote: > Hi, > > On Monday 25 March 2013 03:16 PM, Laxman Dewangan wrote: >> On Monday 25 March 2013 03:02 PM, Kishon Vijay Abraham I wrote: >>> From: Graeme Gregory >>> >>> This is the driver for the OTG transceiver built into the Palmas >>> chip. It >>>

Re: [PATCH v3] USB: PHY: Palmas USB Transceiver Driver

2013-03-25 Thread Kishon Vijay Abraham I
Hi, On Monday 25 March 2013 03:16 PM, Laxman Dewangan wrote: On Monday 25 March 2013 03:02 PM, Kishon Vijay Abraham I wrote: From: Graeme Gregory This is the driver for the OTG transceiver built into the Palmas chip. It handles the various USB OTG events that can be generated by cable inserti

Re: [PATCH v3] USB: PHY: Palmas USB Transceiver Driver

2013-03-25 Thread Laxman Dewangan
On Monday 25 March 2013 03:02 PM, Kishon Vijay Abraham I wrote: From: Graeme Gregory This is the driver for the OTG transceiver built into the Palmas chip. It handles the various USB OTG events that can be generated by cable insertion/removal. Signed-off-by: Graeme Gregory Signed-off-by: Moiz

[PATCH v3] USB: PHY: Palmas USB Transceiver Driver

2013-03-25 Thread Kishon Vijay Abraham I
From: Graeme Gregory This is the driver for the OTG transceiver built into the Palmas chip. It handles the various USB OTG events that can be generated by cable insertion/removal. Signed-off-by: Graeme Gregory Signed-off-by: Moiz Sonasath Signed-off-by: Ruchika Kharwar Signed-off-by: Kishon V