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

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

diff --git a/queue-4.19/i2c-qcom-geni-suspend-and-resume-the-bus-during-system_sleep_pm-ops.patch b/queue-4.19/i2c-qcom-geni-suspend-and-resume-the-bus-during-system_sleep_pm-ops.patch
new file mode 100644 (file)
index 0000000..64811d3
--- /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
+@@ -651,6 +651,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);
+@@ -660,8 +662,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 a54bb7ba6b9543ff1f60aae59c0ce298970a21c6..96ecf8307e3f6bf0d19c9b0cb62a7da4a52a6e23 100644 (file)
@@ -56,3 +56,4 @@ acpi-probe-ecdt-before-loading-aml-tables-regardless-of-module-level-code-flag.p
 acpi-ec-look-for-ecdt-ec-after-calling-acpi_load_tables.patch
 sched-fair-optimize-select_idle_cpu.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