[Letux-kernel] towards the the root of charging problems
Andreas Kemnade
andreas at kemnade.info
Fri Jul 29 19:07:02 CEST 2016
On Fri, 29 Jul 2016 18:19:54 +0200
Andreas Kemnade <andreas at kemnade.info> wrote:
> Hi,
>
> I am digging towards the root of charging problems and share some of
> my insights.
> phy_power_on is called with phy->power_count = -1
> so it does not call the corresponding power on function in phy-twl4030
> to set OTG_EN.
>
> I do not know yet where and why that counter gets wrong.
>
digging deeper:
musb_platform_enable()/musb_platform_disable()
is not balanced in musb_core.c
There is the following interesting piece of code
/* be sure interrupts are disabled before connecting ISR */
musb_platform_disable(musb);
musb_generic_disable(musb);
in musb_init_controller() to switch from an unknown state to off state
which seems to be a good idea.
So there phy->power_count get -1. When the gadget driver gets loaded,
phy->power_count becomes 0 (not 1) so the phy is not powered.
I am developing a patch.
Regards,
Andreas
More information about the Letux-kernel
mailing list