usbpd:Fix the usbpd interrupt storm issue
authora17671 <a17671@motorola.com>
Thu, 29 Nov 2018 02:16:57 +0000 (10:16 +0800)
committerCosmin Tanislav <demonsingur@gmail.com>
Mon, 22 Apr 2024 17:23:51 +0000 (20:23 +0300)
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 <a17671@motorola.com>
Reviewed-on: https://gerrit.mot.com/1275108
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key

drivers/ccic/s2mu106-usbpd.c

index 470e04ce6c7ad4a8c5afc83c68db4450c892f460..1fa48de7d266ce1c9d2544462279b6e5ddea1f63 100644 (file)
@@ -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;
 }