usb: chipidea: Handle extcon events properly
authorStephen Boyd <stephen.boyd@linaro.org>
Wed, 28 Dec 2016 22:56:51 +0000 (14:56 -0800)
committerPeter Chen <peter.chen@nxp.com>
Fri, 20 Jan 2017 03:24:35 +0000 (11:24 +0800)
commita89b94b53371bbfa582787c2fa3378000ea4263d
treecf2d6069db48ae6ec933f75b21c1addc2b7881dd
parentf60f8ccd54e03c1afafb2b20ceb029a0eaf7a134
usb: chipidea: Handle extcon events properly

We're currently emulating the vbus and id interrupts in the OTGSC
read API, but we also need to make sure that if we're handling
the events with extcon that we don't enable the interrupts for
those events in the hardware. Therefore, properly emulate this
register if we're using extcon, but don't enable the interrupts.
This allows me to get my cable connect/disconnect working
properly without getting spurious interrupts on my device that
uses an extcon for these two events.

Acked-by: Peter Chen <peter.chen@nxp.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: "Ivan T. Ivanov" <iivanov.xz@gmail.com>
Fixes: 3ecb3e09b042 ("usb: chipidea: Use extcon framework for VBUS and ID detect")
Signed-off-by: Stephen Boyd <stephen.boyd@linaro.org>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
drivers/usb/chipidea/otg.c
include/linux/usb/chipidea.h