[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220209210356.2848-1-jorcrous@amazon.com>
Date: Wed, 9 Feb 2022 21:03:56 +0000
From: <jorcrous@...zon.com>
To: <linux-arm-msm@...r.kernel.org>
CC: Jordan Crouse <jorcrous@...zon.com>,
Akash Asthana <akashast@...eaurora.org>,
Andy Gross <agross@...nel.org>,
Bjorn Andersson <bjorn.andersson@...aro.org>,
Mukesh Savaliya <msavaliy@...eaurora.org>,
Vinod Koul <vkoul@...nel.org>, <linux-i2c@...r.kernel.org>,
<linux-kernel@...r.kernel.org>
Subject: [PATCH] i2c: qcom-geni: Fix return value for master_xfer
From: Jordan Crouse <jorcrous@...zon.com>
The master_xfer function is supposed to return the number of messages that
were processed. Both geni_i2c_gpi_xfer and geni_i2c_fifo_xfer are
returning 0 which is being interpeted as a error in the upper layers.
Fixes: 8133682618cb ("i2c: qcom-geni: Add support for GPI DMA")
Signed-off-by: Jordan Crouse <jorcrous@...zon.com>
---
drivers/i2c/busses/i2c-qcom-geni.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/i2c/busses/i2c-qcom-geni.c b/drivers/i2c/busses/i2c-qcom-geni.c
index c5345f3421a8..e008161e1a67 100644
--- a/drivers/i2c/busses/i2c-qcom-geni.c
+++ b/drivers/i2c/busses/i2c-qcom-geni.c
@@ -619,7 +619,7 @@ static int geni_i2c_gpi_xfer(struct geni_i2c_dev *gi2c, struct i2c_msg msgs[], i
geni_i2c_gpi_unmap(gi2c, &msgs[i], tx_buf, tx_addr, rx_buf, rx_addr);
}
- return 0;
+ return num;
err:
dmaengine_terminate_sync(gi2c->rx_c);
@@ -645,10 +645,10 @@ static int geni_i2c_fifo_xfer(struct geni_i2c_dev *gi2c,
ret = geni_i2c_tx_one_msg(gi2c, &msgs[i], m_param);
if (ret)
- break;
+ return ret;
}
- return ret;
+ return num;
}
static int geni_i2c_xfer(struct i2c_adapter *adap,
--
2.32.0
Powered by blists - more mailing lists