aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/extcon/extcon-intel-cht-wc.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2018-03-21extcon: intel-cht-wc: Set direction and drv flags for V5 boost GPIOHans de Goede1-4/+7
Sometimes (firmware bug?) the V5 boost GPIO is not configured as output by the BIOS, leading to the 5V boost convertor being permanently on, Explicitly set the direction and drv flags rather then inheriting them from the firmware to fix this. Fixes: 585cb239f4de ("extcon: intel-cht-wc: Disable external 5v boost ...") Cc: stable@vger.kernel.org Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
2017-10-23extcon: Split out extcon header file for consumer and provider deviceChanwoo Choi1-1/+1
The extcon has two type of extcon devices as following. - 'extcon provider deivce' adds new extcon device and detect the state/properties of external connector. Also, it notifies the state/properties to the extcon consumer device. - 'extcon consumer device' gets the change state/properties from extcon provider device. Prior to that, include/linux/extcon.h contains all exported API for both provider and consumer device driver. To clarify the meaning of header file and to remove the wrong use-case on consumer device, this patch separates into extcon.h and extcon-provider.h. [Description for include/linux/{extcon.h|extcon-provider.h}] - extcon.h includes the extcon API and data structure for extcon consumer device driver. This header file contains the following APIs: : Register/unregister the notifier to catch the change of extcon device : Get the extcon device instance : Get the extcon device name : Get the state of each external connector : Get the property value of each external connector : Get the property capability of each external connector - extcon-provider.h includes the extcon API and data structure for extcon provider device driver. This header file contains the following APIs: : Include 'include/linux/extcon.h' : Allocate the memory for extcon device instance : Register/unregister extcon device : Set the state of each external connector : Set the property value of each external connector : Set the property capability of each external connector Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Acked-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk> Acked-by: Chen-Yu Tsai <wens@csie.org> Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com> Acked-by: Lee Jones <lee.jones@linaro.org> Acked-by: Felipe Balbi <felipe.balbi@linux.intel.com> Acked-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Acked-by: Kishon Vijay Abraham I <kishon@ti.com>
2017-04-06extcon: intel-cht-wc: Ignore failure to detect charger-type on host mode exitHans de Goede1-4/+11
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-06extcon: intel-cht-wc: Disable external 5v boost converter on probeHans de Goede1-0/+35
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-06extcon: intel-cht-wc: Add Intel Cherry Trail Whiskey Cove PMIC extcon driverHans de Goede1-0/+353
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>