diff options
-rw-r--r-- | drivers/usb/otg/ab5500-usb.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/usb/otg/ab5500-usb.c b/drivers/usb/otg/ab5500-usb.c index fcee8a1a144..8164ccb4195 100644 --- a/drivers/usb/otg/ab5500-usb.c +++ b/drivers/usb/otg/ab5500-usb.c @@ -20,6 +20,7 @@ #include <mach/usb.h> #include <linux/kernel_stat.h> #include <mach/gpio.h> +#include <mach/reboot_reasons.h> /* AB5500 USB macros */ @@ -523,7 +524,17 @@ static int ab5500_usb_boot_detect(struct ab5500_usb *ab) case USB_LINK_HOST_CHG_NM: case USB_LINK_HOST_CHG_HS: case USB_LINK_HOST_CHG_HS_CHIRP: - + /* + * If Power on key was not pressed then enter charge only + * mode and dont enumerate + */ + if ((!(ab5500_get_turn_on_status() & + (P_ON_KEY1_EVENT | P_ON_KEY2_EVENT))) && + (prcmu_get_reset_code() != + SW_RESET_CHGONLY_EXIT)) { + dev_dbg(ab->dev, "USB entered charge only mode"); + return 0; + } ab5500_usb_peri_phy_en(ab); /* enable usb chip Select */ |