mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
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: Baolin Wang <[email protected]> Signed-off-by: Chanwoo Choi <[email protected]>
This commit is contained in:
parent
db6228612c
commit
5298b83658
1 changed files with 8 additions and 0 deletions
|
|
@ -96,6 +96,7 @@ static const unsigned int axp288_extcon_cables[] = {
|
|||
EXTCON_CHG_USB_SDP,
|
||||
EXTCON_CHG_USB_CDP,
|
||||
EXTCON_CHG_USB_DCP,
|
||||
EXTCON_USB,
|
||||
EXTCON_NONE,
|
||||
};
|
||||
|
||||
|
|
@ -206,8 +207,15 @@ no_vbus:
|
|||
: EXTCON_GPIO_MUX_SEL_PMIC);
|
||||
|
||||
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) {
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue