extcon: max77843: Add OTG power control to the MUIC driver
authorMarek Szyprowski <m.szyprowski@samsung.com>
Wed, 18 Oct 2017 09:56:21 +0000 (11:56 +0200)
committerChanwoo Choi <cw00.choi@samsung.com>
Tue, 24 Oct 2017 00:48:40 +0000 (09:48 +0900)
commit7b9651103b64c8a55eb6cec4c2240584e968354c
treef2b0b65bba4fbcf6999a27b1554e6e632d95c0ec
parentb743483bd4b1d9e0ac093fe184aefdd9f59264d4
extcon: max77843: Add OTG power control to the MUIC driver

Enabling power on VBUS micro-usb pin is required only when passive OTG
cable is connected. Initially OTG VBUS power control was planned to be
done in charger driver. However such information is not really available
from the extcon notifications, so VBUS power control has to be done
directly in MUIC driver, which has all information about the attached
accessory.

For example SmartDock is externally powered accessory, provides OTG
(USB HOST) functionality and use VBUS pin for charging a device battery,
so the VBUS charging pump should be disabled in such case.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Chanwoo Choi <cw00.choi@samsung.com>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
drivers/extcon/extcon-max77843.c
include/linux/mfd/max77843-private.h