]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 8 Jun 2021 17:40:56 +0000 (19:40 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 8 Jun 2021 17:40:56 +0000 (19:40 +0200)
added patches:
i2c-qcom-geni-suspend-and-resume-the-bus-during-system_sleep_pm-ops.patch

queue-5.4/i2c-qcom-geni-suspend-and-resume-the-bus-during-system_sleep_pm-ops.patch [new file with mode: 0644]
queue-5.4/series

diff --git a/queue-5.4/i2c-qcom-geni-suspend-and-resume-the-bus-during-system_sleep_pm-ops.patch b/queue-5.4/i2c-qcom-geni-suspend-and-resume-the-bus-during-system_sleep_pm-ops.patch
new file mode 100644 (file)
index 0000000..e5fdc0f
--- /dev/null
@@ -0,0 +1,50 @@
+From 57648e860485de39c800a89f849fdd03c2d31d15 Mon Sep 17 00:00:00 2001
+From: Roja Rani Yarubandi <rojay@codeaurora.org>
+Date: Tue, 25 May 2021 18:40:51 +0530
+Subject: i2c: qcom-geni: Suspend and resume the bus during SYSTEM_SLEEP_PM ops
+
+From: Roja Rani Yarubandi <rojay@codeaurora.org>
+
+commit 57648e860485de39c800a89f849fdd03c2d31d15 upstream.
+
+Mark bus as suspended during system suspend to block the future
+transfers. Implement geni_i2c_resume_noirq() to resume the bus.
+
+Fixes: 37692de5d523 ("i2c: i2c-qcom-geni: Add bus driver for the Qualcomm GENI I2C controller")
+Signed-off-by: Roja Rani Yarubandi <rojay@codeaurora.org>
+Reviewed-by: Stephen Boyd <swboyd@chromium.org>
+Signed-off-by: Wolfram Sang <wsa@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/i2c/busses/i2c-qcom-geni.c |   12 +++++++++++-
+ 1 file changed, 11 insertions(+), 1 deletion(-)
+
+--- a/drivers/i2c/busses/i2c-qcom-geni.c
++++ b/drivers/i2c/busses/i2c-qcom-geni.c
+@@ -685,6 +685,8 @@ static int __maybe_unused geni_i2c_suspe
+ {
+       struct geni_i2c_dev *gi2c = dev_get_drvdata(dev);
++      i2c_mark_adapter_suspended(&gi2c->adap);
++
+       if (!gi2c->suspended) {
+               geni_i2c_runtime_suspend(dev);
+               pm_runtime_disable(dev);
+@@ -694,8 +696,16 @@ static int __maybe_unused geni_i2c_suspe
+       return 0;
+ }
++static int __maybe_unused geni_i2c_resume_noirq(struct device *dev)
++{
++      struct geni_i2c_dev *gi2c = dev_get_drvdata(dev);
++
++      i2c_mark_adapter_resumed(&gi2c->adap);
++      return 0;
++}
++
+ static const struct dev_pm_ops geni_i2c_pm_ops = {
+-      SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(geni_i2c_suspend_noirq, NULL)
++      SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(geni_i2c_suspend_noirq, geni_i2c_resume_noirq)
+       SET_RUNTIME_PM_OPS(geni_i2c_runtime_suspend, geni_i2c_runtime_resume,
+                                                                       NULL)
+ };
index c09620c76433d953a64387e538c403e2de2a9625..120342e69ebcca9de82962c26204c3d903f90b45 100644 (file)
@@ -74,3 +74,4 @@ x86-kvm-disable-kvmclock-on-all-cpus-on-shutdown.patch
 x86-kvm-disable-all-pv-features-on-crash.patch
 lib-lz4-explicitly-support-in-place-decompression.patch
 xen-pciback-redo-vf-placement-in-the-virtual-topology.patch
+i2c-qcom-geni-suspend-and-resume-the-bus-during-system_sleep_pm-ops.patch