MLK-15032-3 usb: chipidea: core: remove the extcon change for imx_4.1.y
authorLi Jun <jun.li@nxp.com>
Fri, 9 Jun 2017 10:38:06 +0000 (18:38 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 20:28:11 +0000 (15:28 -0500)
commit 916e43e1d6fb ("MLK-13570-3 usb: chipidea: core: change extcon
usage for imx_4.1.y") is directly cherry-picked from 4.1.y, but which
is not valid anymore on 4.y kernel, so revert most part and only keep
the irq check after resume.

Reviewed-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
drivers/usb/chipidea/core.c

index e7e38ca..229f77f 100644 (file)
@@ -574,22 +574,11 @@ static int ci_cable_notifier(struct notifier_block *nb, unsigned long event,
 {
        struct ci_hdrc_cable *cbl = container_of(nb, struct ci_hdrc_cable, nb);
        struct ci_hdrc *ci = cbl->ci;
-       struct extcon_dev *dev = ptr;
-       int ret;
-
-       /* Only support ID extcon now */
 
-       ret = extcon_get_cable_state_(dev, EXTCON_USB_HOST);
-       if (ret && !cbl->connected) {
-               cbl->connected = true;
-               cbl->changed = true;
-               ci_irq(ci->irq, ci);
-       } else if (!ret && cbl->connected) {
-               cbl->connected = false;
-               cbl->changed = true;
-               ci_irq(ci->irq, ci);
-       }
+       cbl->connected = event;
+       cbl->changed = true;
 
+       ci_irq(ci->irq, ci);
        return NOTIFY_DONE;
 }