summaryrefslogtreecommitdiff
path: root/drivers/usb/chipidea/core.c
diff options
context:
space:
mode:
authorLi Jun <jun.li@nxp.com>2017-06-09 18:38:06 +0800
committerJason Liu <jason.hui.liu@nxp.com>2019-02-12 10:25:24 +0800
commit6a46ea03bce3c0344191dab84c2f4808fb2f49bb (patch)
tree8b2aadd62c339515ece4e1603ba5394547d5eeea /drivers/usb/chipidea/core.c
parent0b6420f9cbe7dfd28321fa1dcb3d63bf1064ccc1 (diff)
MLK-15032-3 usb: chipidea: core: remove the extcon change for imx_4.1.y
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>
Diffstat (limited to 'drivers/usb/chipidea/core.c')
-rw-r--r--drivers/usb/chipidea/core.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c
index e500a07bc780..73fbcf4c7721 100644
--- a/drivers/usb/chipidea/core.c
+++ b/drivers/usb/chipidea/core.c
@@ -593,22 +593,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_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;
}