From: Greg Kroah-Hartman Date: Mon, 12 Aug 2024 15:12:27 +0000 (+0200) Subject: 6.1-stable patches X-Git-Tag: v6.1.105~30 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a2e0146a5c564ac50b635d69117801baab855e6a;p=thirdparty%2Fkernel%2Fstable-queue.git 6.1-stable patches added patches: i2c-qcom-geni-fix-missing-clk_disable_unprepare-and-geni_se_resources_off.patch --- diff --git a/queue-6.1/i2c-qcom-geni-fix-missing-clk_disable_unprepare-and-geni_se_resources_off.patch b/queue-6.1/i2c-qcom-geni-fix-missing-clk_disable_unprepare-and-geni_se_resources_off.patch new file mode 100644 index 00000000000..75004084e3d --- /dev/null +++ b/queue-6.1/i2c-qcom-geni-fix-missing-clk_disable_unprepare-and-geni_se_resources_off.patch @@ -0,0 +1,53 @@ +From 043465b66506e8c647cdd38a2db1f2ee0f369a1b Mon Sep 17 00:00:00 2001 +From: Yang Yingliang +Date: Thu, 30 Nov 2023 09:43:24 +0800 +Subject: i2c: qcom-geni: fix missing clk_disable_unprepare() and geni_se_resources_off() + +From: Yang Yingliang + +commit 043465b66506e8c647cdd38a2db1f2ee0f369a1b upstream. + +Add missing clk_disable_unprepare() and geni_se_resources_off() in the error +path in geni_i2c_probe(). + +Fixes: 14d02fbadb5d ("i2c: qcom-geni: add desc struct to prepare support for I2C Master Hub variant") +Signed-off-by: Yang Yingliang +Reviewed-by: Andi Shyti +Signed-off-by: Wolfram Sang +Signed-off-by: Greg Kroah-Hartman +--- + drivers/i2c/busses/i2c-qcom-geni.c | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +--- a/drivers/i2c/busses/i2c-qcom-geni.c ++++ b/drivers/i2c/busses/i2c-qcom-geni.c +@@ -859,6 +859,7 @@ static int geni_i2c_probe(struct platfor + ret = geni_se_resources_on(&gi2c->se); + if (ret) { + dev_err(dev, "Error turning on resources %d\n", ret); ++ clk_disable_unprepare(gi2c->core_clk); + return ret; + } + proto = geni_se_read_proto(&gi2c->se); +@@ -878,8 +879,11 @@ static int geni_i2c_probe(struct platfor + /* FIFO is disabled, so we can only use GPI DMA */ + gi2c->gpi_mode = true; + ret = setup_gpi_dma(gi2c); +- if (ret) ++ if (ret) { ++ geni_se_resources_off(&gi2c->se); ++ clk_disable_unprepare(gi2c->core_clk); + return dev_err_probe(dev, ret, "Failed to setup GPI DMA mode\n"); ++ } + + dev_dbg(dev, "Using GPI DMA mode for I2C\n"); + } else { +@@ -892,6 +896,8 @@ static int geni_i2c_probe(struct platfor + + if (!tx_depth) { + dev_err(dev, "Invalid TX FIFO depth\n"); ++ geni_se_resources_off(&gi2c->se); ++ clk_disable_unprepare(gi2c->core_clk); + return -EINVAL; + } + diff --git a/queue-6.1/series b/queue-6.1/series index 5511adb3a26..36788169a17 100644 --- a/queue-6.1/series +++ b/queue-6.1/series @@ -146,3 +146,4 @@ drm-amd-display-defer-handling-mst-up-request-in-resume.patch netfilter-nf_tables-bail-out-if-stateful-expression-provides-no-.clone.patch netfilter-nf_tables-allow-clone-callbacks-to-sleep.patch netfilter-nf_tables-prefer-nft_chain_validate.patch +i2c-qcom-geni-fix-missing-clk_disable_unprepare-and-geni_se_resources_off.patch