Commit graph

3 commits

Author SHA1 Message Date
Hans de Goede c42a880c31 extcon: intel-cht-wc: Ignore failure to detect charger-type on host mode exit
When we leave host-mode because the id-pin is no longer connected to
ground, the 5v boost converter is normally still on, so we will see
Vbus, but it is not from a charger (normally) so the charger-type
detection will fail.

This commit silences the cht_wc_extcon_get_charger() false-positive
errors when we're leaving host mode.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
2017-04-06 10:55:26 +09:00
Hans de Goede 585cb239f4 extcon: intel-cht-wc: Disable external 5v boost converter on probe
Disable the 5v boost converter on probe in case it was left on by
the BIOS, this fixes 2 problems:

1) This gets seen by the external battery charger as a valid Vbus
   supply and it then tries to feed Vsys from this creating a
   feedback loop which causes aprox. 300 mA extra battery drain
   (and unless we drive the external-charger-disable pin high it
   also tries to charge the battery causing even more feedback).
2) This gets seen by the pwrsrc block as a SDP USB Vbus supply

Since the external battery charger has its own 5v boost converter
which does not have these issues, we simply turn the separate
external 5v boost converter off and leave it off entirely.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
2017-04-06 10:55:25 +09:00
Hans de Goede db0f3baaa3 extcon: intel-cht-wc: Add Intel Cherry Trail Whiskey Cove PMIC extcon driver
Add a driver for charger detection / control on the Intel Cherrytrail
Whiskey Cove PMIC.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
2017-04-06 10:55:23 +09:00