Re: [PATCH 1/2] extcon-intel-cht-wc: Make charger detection co-existed with OTG host mode

From: Yauhen Kharuzhy
Date: Thu Feb 14 2019 - 02:09:50 EST


On Thu, Feb 14, 2019 at 12:15:00AM +0100, Hans de Goede wrote:
> Hi,
>
> On 10-02-19 21:36, Yauhen Kharuzhy wrote:
> > Whiskey Cove Cherry Trail PMIC requires disabling OTG host mode before
> > of charger detection procedure. Do this by manipulationg of CHGRCTRL1
> > register.
> >
> > Source: APCI DSDT code of Lenovo Yoga Book YB1-X91L and open-sourced
> > Intel's drivers.
>
> Hmm, of the ACPI code is updating the otg-mode, then there should be
> no reason for us to do this, can you provide an acpidump of your
> device please?

sure: https://github.com/jekhor/yogabook-linux/blob/master/yoga/acpi/yoga.acpidump.log

Yes, there is ACPI routine for switching this but it is not called at
IRQ handling because it is handled by extcon driver. See my notes here:
https://github.com/jekhor/yogabook-linux/blob/master/yoga/acpi/investigate.txt#L364


--
Yauhen Kharuzhy