Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions kernel/patches/0504-wakeup-qcom-ipcc-remove-IRQF-NO-SUSPEND.patch
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
From: ROCKNIX <noreply@rocknix.org>
Subject: [PATCH] mailbox: qcom-ipcc: allow SM8750 IRQ suspension
Subject: [PATCH] mailbox: qcom-ipcc: allow SM8750 and SM8550 IRQ suspension

SM8750 suspend-to-RAM requires the IPCC summary interrupt to be suspended.
Keep IRQF_NO_SUSPEND on every other SoC so the SM8750 workaround does not
change established suspend behavior on the shared driver.
SM8750 and SM8550 suspend-to-RAM require the IPCC summary interrupt to be
suspended. On SM8550 the ADSP charger firmware pushes an unsolicited
BATTMGR_NOTIFICATION about half a second after suspend entry; with
IRQF_NO_SUSPEND the mailbox irq is never masked, so that notification pulls
the SoC straight back out.

Keep IRQF_NO_SUSPEND on every other SoC so the workaround does not change
established suspend behavior on the shared driver.

diff --git a/drivers/mailbox/qcom-ipcc.c b/drivers/mailbox/qcom-ipcc.c
--- a/drivers/mailbox/qcom-ipcc.c
Expand All @@ -24,11 +29,12 @@ diff --git a/drivers/mailbox/qcom-ipcc.c b/drivers/mailbox/qcom-ipcc.c
int ret;

ipcc = devm_kzalloc(&pdev->dev, sizeof(*ipcc), GFP_KERNEL);
@@ -318,9 +319,11 @@ static int qcom_ipcc_probe(struct platform_device *pdev)
@@ -318,9 +319,12 @@ static int qcom_ipcc_probe(struct platform_device *pdev)
if (ret)
goto err_mbox;

+ if (!of_device_is_compatible(pdev->dev.of_node, "qcom,sm8750-ipcc"))
+ if (!of_device_is_compatible(pdev->dev.of_node, "qcom,sm8750-ipcc") &&
+ !of_device_is_compatible(pdev->dev.of_node, "qcom,sm8550-ipcc"))
+ irqflags |= IRQF_NO_SUSPEND;
+
ret = devm_request_irq(&pdev->dev, ipcc->irq, qcom_ipcc_irq_fn,
Expand Down