Re: [RFC/PATCH 1/5] usb: otg: add notifier support

2010-01-26 Thread Felipe Balbi
Hi, On Tue, Jan 26, 2010 at 08:09:34PM +0100, Balbi Felipe (Nokia-D/Helsinki) wrote: well, if you have access to twl5031 docs you'd understand what I'm talking about, the charger detection involves at least 3 blocks on twl5031 plus musb to enable/disable pullups. The sequence is pretty much as b

Re: [RFC/PATCH 1/5] usb: otg: add notifier support

2010-01-26 Thread Felipe Balbi
On Tue, Jan 26, 2010 at 04:07:22PM +0100, ext David Brownell wrote: On Tuesday 26 January 2010, Felipe Balbi wrote: >> +enum usb_xceiv_events { > >Let's keep charger events separate from anything else, >like "enter host mode" or "enter peripheral mode" (or >even "disconnect").  The audiences for

Re: [RFC/PATCH 1/5] usb: otg: add notifier support

2010-01-26 Thread Felipe Balbi
On Tue, Jan 26, 2010 at 04:21:28PM +0100, ext David Brownell wrote: On Tuesday 26 January 2010, Felipe Balbi wrote: > >Thing is, supplying current is a bit more involved.  If the >board can't supply 300 mA, the USB configuration selection >mechanism has to know that, so it never selects peripher

Re: [RFC/PATCH 1/5] usb: otg: add notifier support

2010-01-26 Thread Mark Brown
On Tue, Jan 26, 2010 at 07:44:46AM -0800, David Brownell wrote: > On Tuesday 26 January 2010, Mark Brown wrote: > > In the sort of design I'm talking about there is generally a system > > power rail which is generated from the various power sources available > > to the system, which might include

Re: [RFC/PATCH 1/5] usb: otg: add notifier support

2010-01-26 Thread David Brownell
On Tuesday 26 January 2010, Mark Brown wrote: > > > Yes please - it's not just chargers either, this can also be used by > > > PMICs which do power path management that includes USB. > > > Color me confused ... what do you mean by "power path"? > > In the sort of design I'm talking about there is

Re: [RFC/PATCH 1/5] usb: otg: add notifier support

2010-01-26 Thread David Brownell
On Tuesday 26 January 2010, Felipe Balbi wrote: > just remember of another problem which I couldn't solve yet: > > if you boot the board with the usb cable already attached, then we miss > the first notification because when the notifier is called, usb > controller driver isn't probed yet. That

Re: [RFC/PATCH 1/5] usb: otg: add notifier support

2010-01-26 Thread David Brownell
On Tuesday 26 January 2010, Felipe Balbi wrote: > > > >Thing is, supplying current is a bit more involved.  If the > >board can't supply 300 mA, the USB configuration selection > >mechanism has to know that, so it never selects peripheral > >configurations which require that much current. > > but

Re: [RFC/PATCH 1/5] usb: otg: add notifier support

2010-01-26 Thread David Brownell
On Tuesday 26 January 2010, Felipe Balbi wrote: > but when suspended, we have to cut power ASAP. If not enumerated we can > still draw power for a few miliseconds due to dead battery provision. When suspended, it's OK to draw a small amount of power. On the order of one milliamp, based on the con

Re: [RFC/PATCH 1/5] usb: otg: add notifier support

2010-01-26 Thread David Brownell
On Tuesday 26 January 2010, Felipe Balbi wrote: > >> +enum usb_xceiv_events { > > > >Let's keep charger events separate from anything else, > >like "enter host mode" or "enter peripheral mode" (or > >even "disconnect").  The audiences for any other types > >of event would be entirely different. >

Re: [RFC/PATCH 1/5] usb: otg: add notifier support

2010-01-26 Thread Felipe Balbi
On Tue, Jan 26, 2010 at 03:24:49PM +0100, ext Oliver Neukum wrote: Am Dienstag, 26. Januar 2010 15:14:43 schrieb Felipe Balbi: >There are load bursting issues too. All part of the USB spec; >a load that's OK for 1 millisecond might not be OK for 1 second. if you get a SetConfiguration(config),

Re: [RFC/PATCH 1/5] usb: otg: add notifier support

2010-01-26 Thread Oliver Neukum
Am Dienstag, 26. Januar 2010 15:14:43 schrieb Felipe Balbi: > >There are load bursting issues too. All part of the USB spec; > >a load that's OK for 1 millisecond might not be OK for 1 second. > > if you get a SetConfiguration(config), then you can use that load for as > long as needed, the limi

Re: [RFC/PATCH 1/5] usb: otg: add notifier support

2010-01-26 Thread Felipe Balbi
Hi again, On Tue, Jan 26, 2010 at 03:10:16PM +0100, Balbi Felipe (Nokia-D/Helsinki) wrote: On Tue, Jan 26, 2010 at 12:16:20PM +0100, ext David Brownell wrote: On Friday 11 December 2009, Felipe Balbi wrote: The notifier will be used to communicate usb events to other drivers like the charger c

Re: [RFC/PATCH 1/5] usb: otg: add notifier support

2010-01-26 Thread Mark Brown
On Tue, Jan 26, 2010 at 05:35:21AM -0800, David Brownell wrote: > On Tuesday 26 January 2010, Mark Brown wrote: > > Yes please - it's not just chargers either, this can also be used by > > PMICs which do power path management that includes USB. > Color me confused ... what do you mean by "power p

Re: [RFC/PATCH 1/5] usb: otg: add notifier support

2010-01-26 Thread Felipe Balbi
On Tue, Jan 26, 2010 at 02:35:21PM +0100, ext David Brownell wrote: On Tuesday 26 January 2010, Mark Brown wrote: On Tue, Jan 26, 2010 at 03:16:20AM -0800, David Brownell wrote: > I'd vote to convert all the USB-to-charger interfaces so > they use notifiers. After fixing the events ... see > c

Re: [RFC/PATCH 1/5] usb: otg: add notifier support

2010-01-26 Thread Felipe Balbi
Hi, On Tue, Jan 26, 2010 at 12:16:20PM +0100, ext David Brownell wrote: On Friday 11 December 2009, Felipe Balbi wrote: The notifier will be used to communicate usb events to other drivers like the charger chip. Good idea ... but not OTG-specific. It doesn't seem to me thanks that chargi

Re: [RFC/PATCH 1/5] usb: otg: add notifier support

2010-01-26 Thread David Brownell
On Tuesday 26 January 2010, Mark Brown wrote: > On Tue, Jan 26, 2010 at 03:16:20AM -0800, David Brownell wrote: > > > I'd vote to convert all the USB-to-charger interfaces so > > they use notifiers. After fixing the events ... see > > comments below. :) > > Yes please - it's not just chargers e

Re: [RFC/PATCH 1/5] usb: otg: add notifier support

2010-01-26 Thread Mark Brown
On Tue, Jan 26, 2010 at 03:16:20AM -0800, David Brownell wrote: > I'd vote to convert all the USB-to-charger interfaces so > they use notifiers. After fixing the events ... see > comments below. :) Yes please - it's not just chargers either, this can also be used by PMICs which do power path ma

Re: [RFC/PATCH 1/5] usb: otg: add notifier support

2010-01-26 Thread David Brownell
On Friday 11 December 2009, Felipe Balbi wrote: > The notifier will be used to communicate usb events > to other drivers like the charger chip. Good idea ... but not OTG-specific. It doesn't seem to me that charging hookups belong in that header at all. In fact, usb_gadget_vbus_draw() might bett

Re: [RFC/PATCH 1/5] usb: otg: add notifier support

2009-12-11 Thread Felipe Balbi
On Fri, Dec 11, 2009 at 12:55:38PM +0100, ext Mark Brown wrote: On Fri, Dec 11, 2009 at 01:31:22PM +0200, Felipe Balbi wrote: The notifier will be used to communicate usb events to other drivers like the charger chip. This can be used as source of information to kick usb charger detection as

Re: [RFC/PATCH 1/5] usb: otg: add notifier support

2009-12-11 Thread Mark Brown
On Fri, Dec 11, 2009 at 01:31:22PM +0200, Felipe Balbi wrote: > The notifier will be used to communicate usb events > to other drivers like the charger chip. > This can be used as source of information to kick > usb charger detection as described by the USB > Battery Charging Specification 1.1 and

[RFC/PATCH 1/5] usb: otg: add notifier support

2009-12-11 Thread Felipe Balbi
The notifier will be used to communicate usb events to other drivers like the charger chip. This can be used as source of information to kick usb charger detection as described by the USB Battery Charging Specification 1.1 and/or to pass bMaxPower field of selected usb_configuration to charger chi