Re: [Letux-kernel] [PATCH v2] musb: omap2430: do not assume balanced enable()/disable()

2016-08-11 Thread Tony Lindgren
* Andreas Kemnade [160808 22:36]: > Calls to musb_platform_enable() occur at only 1 place. > musb_platform_disable() is called at 4 places. > > about balancing: > There is musb_start() and musb_stop(). They are called from > musb_gadget_start/stop() > These call

Re: [Letux-kernel] [PATCH v2] musb: omap2430: do not assume balanced enable()/disable()

2016-08-11 Thread Tony Lindgren
* Andreas Kemnade [160808 22:36]: > Calls to musb_platform_enable() occur at only 1 place. > musb_platform_disable() is called at 4 places. > > about balancing: > There is musb_start() and musb_stop(). They are called from > musb_gadget_start/stop() > These call musb_platform_enable() and

Re: [Letux-kernel] [PATCH v2] musb: omap2430: do not assume balanced enable()/disable()

2016-08-08 Thread Andreas Kemnade
On Fri, 5 Aug 2016 23:21:35 -0700 Tony Lindgren wrote: > * Andreas Kemnade [160805 08:35]: > > I repeat the subject line of the patch: > > [PATCH v2] musb: omap2430: do not assume balanced enable()/disable() > > It is *not* fix charging. > > > > So you

Re: [Letux-kernel] [PATCH v2] musb: omap2430: do not assume balanced enable()/disable()

2016-08-08 Thread Andreas Kemnade
On Fri, 5 Aug 2016 23:21:35 -0700 Tony Lindgren wrote: > * Andreas Kemnade [160805 08:35]: > > I repeat the subject line of the patch: > > [PATCH v2] musb: omap2430: do not assume balanced enable()/disable() > > It is *not* fix charging. > > > > So you mean that the phy should magically know

Re: [Letux-kernel] [PATCH v2] musb: omap2430: do not assume balanced enable()/disable()

2016-08-06 Thread Tony Lindgren
* Andreas Kemnade [160805 08:35]: > I repeat the subject line of the patch: > [PATCH v2] musb: omap2430: do not assume balanced enable()/disable() > It is *not* fix charging. > > So you mean that the phy should magically know at which refcounter > it should power on and off

Re: [Letux-kernel] [PATCH v2] musb: omap2430: do not assume balanced enable()/disable()

2016-08-06 Thread Tony Lindgren
* Andreas Kemnade [160805 08:35]: > I repeat the subject line of the patch: > [PATCH v2] musb: omap2430: do not assume balanced enable()/disable() > It is *not* fix charging. > > So you mean that the phy should magically know at which refcounter > it should power on and off if power on/off is

Re: [Letux-kernel] [PATCH v2] musb: omap2430: do not assume balanced enable()/disable()

2016-08-05 Thread Andreas Kemnade
On Fri, 5 Aug 2016 06:55:01 -0700 Tony Lindgren wrote: > * Andreas Kemnade [160804 09:44]: > > Nothing happens here, so the previous state of the phy remains. > > It would be disabled by the generic phy layer in > > drivers/phy/phy-core.c > > > > > gadget

Re: [Letux-kernel] [PATCH v2] musb: omap2430: do not assume balanced enable()/disable()

2016-08-05 Thread Andreas Kemnade
On Fri, 5 Aug 2016 06:55:01 -0700 Tony Lindgren wrote: > * Andreas Kemnade [160804 09:44]: > > Nothing happens here, so the previous state of the phy remains. > > It would be disabled by the generic phy layer in > > drivers/phy/phy-core.c > > > > > gadget driver is loaded. > > > musb_start() is

Re: [Letux-kernel] [PATCH v2] musb: omap2430: do not assume balanced enable()/disable()

2016-08-05 Thread Tony Lindgren
* Andreas Kemnade [160804 09:44]: > Nothing happens here, so the previous state of the phy remains. > It would be disabled by the generic phy layer in drivers/phy/phy-core.c > > > gadget driver is loaded. > > musb_start() is called > > omap2430_musb_enable() is called >

Re: [Letux-kernel] [PATCH v2] musb: omap2430: do not assume balanced enable()/disable()

2016-08-05 Thread Tony Lindgren
* Andreas Kemnade [160804 09:44]: > Nothing happens here, so the previous state of the phy remains. > It would be disabled by the generic phy layer in drivers/phy/phy-core.c > > > gadget driver is loaded. > > musb_start() is called > > omap2430_musb_enable() is called > > calls

Re: [Letux-kernel] [PATCH v2] musb: omap2430: do not assume balanced enable()/disable()

2016-08-04 Thread Andreas Kemnade
On Thu, 4 Aug 2016 16:49:30 +0200 "H. Nikolaus Schaller" wrote: > > Rationale: > > > > The charger driver calls pm_runtime_get_sync(bci->transceiver->dev); > > which should indirectly call twl4030_usb_set_mode to set the > > POWER_CTRL_OTG_ENAB bit. This enables the

Re: [Letux-kernel] [PATCH v2] musb: omap2430: do not assume balanced enable()/disable()

2016-08-04 Thread Andreas Kemnade
On Thu, 4 Aug 2016 16:49:30 +0200 "H. Nikolaus Schaller" wrote: > > Rationale: > > > > The charger driver calls pm_runtime_get_sync(bci->transceiver->dev); > > which should indirectly call twl4030_usb_set_mode to set the > > POWER_CTRL_OTG_ENAB bit. This enables the prescaler hardware > > for

Re: [Letux-kernel] [PATCH v2] musb: omap2430: do not assume balanced enable()/disable()

2016-08-04 Thread Andreas Kemnade
On Thu, 4 Aug 2016 18:31:29 +0200 Andreas Kemnade wrote: > Hi, > > On Thu, 4 Aug 2016 07:29:19 -0700 > Tony Lindgren wrote: > > > Hi, > > > > * H. Nikolaus Schaller [160803 10:07]: > > > All this prevents detection of cable

Re: [Letux-kernel] [PATCH v2] musb: omap2430: do not assume balanced enable()/disable()

2016-08-04 Thread Andreas Kemnade
On Thu, 4 Aug 2016 18:31:29 +0200 Andreas Kemnade wrote: > Hi, > > On Thu, 4 Aug 2016 07:29:19 -0700 > Tony Lindgren wrote: > > > Hi, > > > > * H. Nikolaus Schaller [160803 10:07]: > > > All this prevents detection of cable plugin-events and VBUS > > > measurement and setting OTG_EN before

Re: [Letux-kernel] [PATCH v2] musb: omap2430: do not assume balanced enable()/disable()

2016-08-04 Thread Andreas Kemnade
Hi, On Thu, 4 Aug 2016 07:29:19 -0700 Tony Lindgren wrote: > Hi, > > * H. Nikolaus Schaller [160803 10:07]: > > All this prevents detection of cable plugin-events and VBUS > > measurement and setting OTG_EN before charging is attempted. > > So I gave

Re: [Letux-kernel] [PATCH v2] musb: omap2430: do not assume balanced enable()/disable()

2016-08-04 Thread Andreas Kemnade
Hi, On Thu, 4 Aug 2016 07:29:19 -0700 Tony Lindgren wrote: > Hi, > > * H. Nikolaus Schaller [160803 10:07]: > > All this prevents detection of cable plugin-events and VBUS > > measurement and setting OTG_EN before charging is attempted. > > So I gave this patch a try but it now blocks all

Re: [Letux-kernel] [PATCH v2] musb: omap2430: do not assume balanced enable()/disable()

2016-08-04 Thread Tony Lindgren
* H. Nikolaus Schaller [160804 07:50]: > > Am 04.08.2016 um 16:29 schrieb Tony Lindgren : > > > > So I gave this patch a try but it now blocks all deeper SoC idle > > states as the PHY stays active. I think the real fix is to make > > sure the charger

Re: [Letux-kernel] [PATCH v2] musb: omap2430: do not assume balanced enable()/disable()

2016-08-04 Thread Tony Lindgren
* H. Nikolaus Schaller [160804 07:50]: > > Am 04.08.2016 um 16:29 schrieb Tony Lindgren : > > > > So I gave this patch a try but it now blocks all deeper SoC idle > > states as the PHY stays active. I think the real fix is to make > > sure the charger behaves independent of the USB PHY state. >

Re: [Letux-kernel] [PATCH v2] musb: omap2430: do not assume balanced enable()/disable()

2016-08-04 Thread H. Nikolaus Schaller
Hi Tony, > Am 04.08.2016 um 16:29 schrieb Tony Lindgren : > > Hi, > > * H. Nikolaus Schaller [160803 10:07]: >> All this prevents detection of cable plugin-events and VBUS measurement >> and setting OTG_EN before charging is attempted. > > So I gave this

Re: [Letux-kernel] [PATCH v2] musb: omap2430: do not assume balanced enable()/disable()

2016-08-04 Thread H. Nikolaus Schaller
Hi Tony, > Am 04.08.2016 um 16:29 schrieb Tony Lindgren : > > Hi, > > * H. Nikolaus Schaller [160803 10:07]: >> All this prevents detection of cable plugin-events and VBUS measurement >> and setting OTG_EN before charging is attempted. > > So I gave this patch a try but it now blocks all

Re: [Letux-kernel] [PATCH v2] musb: omap2430: do not assume balanced enable()/disable()

2016-08-04 Thread Tony Lindgren
Hi, * H. Nikolaus Schaller [160803 10:07]: > All this prevents detection of cable plugin-events and VBUS measurement > and setting OTG_EN before charging is attempted. So I gave this patch a try but it now blocks all deeper SoC idle states as the PHY stays active. I think

Re: [Letux-kernel] [PATCH v2] musb: omap2430: do not assume balanced enable()/disable()

2016-08-04 Thread Tony Lindgren
Hi, * H. Nikolaus Schaller [160803 10:07]: > All this prevents detection of cable plugin-events and VBUS measurement > and setting OTG_EN before charging is attempted. So I gave this patch a try but it now blocks all deeper SoC idle states as the PHY stays active. I think the real fix is to

Re: [Letux-kernel] [PATCH v2] musb: omap2430: do not assume balanced enable()/disable()

2016-08-03 Thread H. Nikolaus Schaller
> Am 03.08.2016 um 17:38 schrieb Andreas Kemnade : > > The code assumes that omap2430_musb_enable() and > omap2430_musb_disable() are called in a balanced way. > That fact is broken by the fact that musb_init_controller() calls > musb_platform_disable() to switch from

Re: [Letux-kernel] [PATCH v2] musb: omap2430: do not assume balanced enable()/disable()

2016-08-03 Thread H. Nikolaus Schaller
> Am 03.08.2016 um 17:38 schrieb Andreas Kemnade : > > The code assumes that omap2430_musb_enable() and > omap2430_musb_disable() are called in a balanced way. > That fact is broken by the fact that musb_init_controller() calls > musb_platform_disable() to switch from unknown state to off state