From 7df4a66ec1a7afd6eff0d64843be711e91af7975 Mon Sep 17 00:00:00 2001 From: a17671 Date: Thu, 29 Nov 2018 10:16:57 +0800 Subject: [PATCH] usbpd:Fix the usbpd interrupt storm issue Samsung usbpd interrupt is triggered by level Instead of edge, the irq service handle shall Disable the interrupt first and later enable It after it got processed. Change-Id: I36502860acded3ce81546fa0554a169ee81805b8 Signed-off-by: a17671 Reviewed-on: https://gerrit.mot.com/1275108 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Xiangpo Zhao Submit-Approved: Jira Key --- drivers/ccic/s2mu106-usbpd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/ccic/s2mu106-usbpd.c b/drivers/ccic/s2mu106-usbpd.c index 470e04ce6c7a..1fa48de7d266 100644 --- a/drivers/ccic/s2mu106-usbpd.c +++ b/drivers/ccic/s2mu106-usbpd.c @@ -2504,6 +2504,7 @@ static irqreturn_t s2mu106_irq_thread(int irq, void *data) int ret = 0; unsigned attach_status = 0, rid_status = 0; + disable_irq_nosync(irq); dev_info(dev, "%s\n", __func__); mutex_lock(&pd_data->accept_mutex); @@ -2595,7 +2596,7 @@ hard_reset: mutex_unlock(&pdic_data->lpm_mutex); out: mutex_unlock(&pdic_data->_mutex); - + enable_irq(irq); return IRQ_HANDLED; } -- 2.20.1