From: Greg Kroah-Hartman Date: Tue, 8 Jun 2021 17:40:56 +0000 (+0200) Subject: 5.4-stable patches X-Git-Tag: v4.4.272~9 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=76758a7dd8f4e9edf02a827f3ccb3774f7b031d1;p=thirdparty%2Fkernel%2Fstable-queue.git 5.4-stable patches added patches: i2c-qcom-geni-suspend-and-resume-the-bus-during-system_sleep_pm-ops.patch --- 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 index 00000000000..e5fdc0fe0fb --- /dev/null +++ b/queue-5.4/i2c-qcom-geni-suspend-and-resume-the-bus-during-system_sleep_pm-ops.patch @@ -0,0 +1,50 @@ +From 57648e860485de39c800a89f849fdd03c2d31d15 Mon Sep 17 00:00:00 2001 +From: Roja Rani Yarubandi +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 + +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 +Reviewed-by: Stephen Boyd +Signed-off-by: Wolfram Sang +Signed-off-by: Greg Kroah-Hartman +--- + 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) + }; diff --git a/queue-5.4/series b/queue-5.4/series index c09620c7643..120342e69eb 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -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