[Letux-kernel] gadget after suspend
Andreas Kemnade
andreas at kemnade.info
Fri Jan 26 22:15:13 CET 2018
Hi,
On Fri, 26 Jan 2018 09:13:06 +0100
"H. Nikolaus Schaller" <hns at goldelico.com> wrote:
> Hi,
>
> > Am 26.01.2018 um 08:06 schrieb Andreas Kemnade <andreas at kemnade.info>:
> >
> > On Thu, 25 Jan 2018 20:01:45 +0100
> > Andreas Kemnade <andreas at kemnade.info> wrote:
> >
> >> Hmm, musb talking with twl is hidden. turning on DEBUG in musb_core.c
> >> and phy-twl4030.c did not show up anything interesting.
> >>
> >> But now I found out something interesting:
> >> Setting MUSB_POWER_SOFTCONN and MUSB_DEVCTL_SESSION via devmem2 seems
> >> to enable gadget. MUSB seems to know that there is vbus.
> >>
> >> Normally these things should be reset in
> >> musb_restore_context()
> >> if they are set before suspend in the call to
> >> musb_save_context().
> >>
> > After resume, musb_restore_context() restores the values. That seem to
> > work.
> > But then there is a call to musb_start() after that which resets
> > MUSB_POWER, so it disables MUSB_POWER_SOFTCONN which disables the
> > pullup resistors -> no gadget...
> >
> > It was introduced in 6fc6f4b87cb32fcd0bf5e5bce434301958a3b624.
>
> Well, this patch does not look harmful...
> But seems to solve an am335x problem and might have forgotten omap3+twl4030.
>
> Do you think we should try to revert it?
>
Completely removing is probably no good idea. I think I can do
something better, I have already a hack-fix. I will check what is really
needed. musb_platform_enable() should at least be called. And write
a nice commit message.
Regards,
Andreas
More information about the Letux-kernel
mailing list