summaryrefslogtreecommitdiff
path: root/lib/mpi/mpiutil.c
diff options
context:
space:
mode:
authorAjay Agarwal <ajaya@codeaurora.org>2017-12-11 14:09:17 +0530
committerGerrit - the friendly Code Review server <code-review@localhost>2017-12-23 18:33:57 -0800
commit24ecfd64c77d6f8ffbfac6d2ba784382dd7745e7 (patch)
tree921136048534fa7459c43f5b7e8a1d33d336508e /lib/mpi/mpiutil.c
parent8ed108c9770aa1fb055f8129121e60a708067f3f (diff)
gpio: usbdetect: Avoid threaded IRQ handling if no change in ID
It is observed that the hard ID IRQ is enabled when the threaded IRQ handler for the same is still running. In that case, there are two issues. The ID LOW IRQ can come consecutively which will increase the disable count of vbus_irq. Then ID HIGH IRQ will not enable the vbus_irq and peripheral mode detection will not work anymore. The second issue is that ID HIGH IRQ is fired just before ID LOW IRQ. This will mark usb->id_state from HIGH to LOW even while threaded IRQ is running which will lead to host not getting stopped and peripheral mode not working. Fix both issues by maintaning a local copy of ID IRQ in threaded IRQ handler and comparing it with previous ID state. If same, then bail out. Change-Id: If5da1f91ece9d1751d7002e64bab0e145623a92e Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
Diffstat (limited to 'lib/mpi/mpiutil.c')
0 files changed, 0 insertions, 0 deletions