Commit 5298b836 authored by Baolin Wang's avatar Baolin Wang Committed by Chanwoo Choi

extcon: axp288: Set EXTCON_USB when EXTCON_CHG_USB_SDP was set

According to the documentation, we should set the EXTCON_USB when
one SDP charger connector was reported.
Signed-off-by: default avatarBaolin Wang <baolin.wang@linaro.org>
Signed-off-by: default avatarChanwoo Choi <cw00.choi@samsung.com>
parent db622861
...@@ -96,6 +96,7 @@ static const unsigned int axp288_extcon_cables[] = { ...@@ -96,6 +96,7 @@ static const unsigned int axp288_extcon_cables[] = {
EXTCON_CHG_USB_SDP, EXTCON_CHG_USB_SDP,
EXTCON_CHG_USB_CDP, EXTCON_CHG_USB_CDP,
EXTCON_CHG_USB_DCP, EXTCON_CHG_USB_DCP,
EXTCON_USB,
EXTCON_NONE, EXTCON_NONE,
}; };
...@@ -206,8 +207,15 @@ static int axp288_handle_chrg_det_event(struct axp288_extcon_info *info) ...@@ -206,8 +207,15 @@ static int axp288_handle_chrg_det_event(struct axp288_extcon_info *info)
: EXTCON_GPIO_MUX_SEL_PMIC); : EXTCON_GPIO_MUX_SEL_PMIC);
extcon_set_state_sync(info->edev, info->previous_cable, false); extcon_set_state_sync(info->edev, info->previous_cable, false);
if (info->previous_cable == EXTCON_CHG_USB_SDP)
extcon_set_state_sync(info->edev, EXTCON_USB, false);
if (vbus_attach) { if (vbus_attach) {
extcon_set_state_sync(info->edev, cable, vbus_attach); extcon_set_state_sync(info->edev, cable, vbus_attach);
if (cable == EXTCON_CHG_USB_SDP)
extcon_set_state_sync(info->edev, EXTCON_USB,
vbus_attach);
info->previous_cable = cable; info->previous_cable = cable;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment