From 4f676b69134cbd6c03e9984b3b17a94309e24b11 Mon Sep 17 00:00:00 2001 From: Anil Veshala Veshala Date: Sun, 20 Mar 2022 23:35:22 -0700 Subject: [PATCH] i2c: i2c-msm-geni: add rtl based changes When IO lines not in good state we are not doing cancel and abort for non-rtl SE's, due to this we are seeing unexpected errors from QUP. To solve this added changes like rtl based flag, to proceed further sequence for non-rtl based SE's. Change-Id: I4dac0bf97ff0077bf18b806446de95eab40a2e1f Signed-off-by: Anil Veshala Veshala --- drivers/i2c/busses/i2c-msm-geni.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/drivers/i2c/busses/i2c-msm-geni.c b/drivers/i2c/busses/i2c-msm-geni.c index bc99dae5a635..7c5f298db44f 100644 --- a/drivers/i2c/busses/i2c-msm-geni.c +++ b/drivers/i2c/busses/i2c-msm-geni.c @@ -991,8 +991,11 @@ static int geni_i2c_gsi_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], if ((geni_ios & 0x3) != 0x3) { //SCL:b'1, SDA:b'0 GENI_SE_DBG(gi2c->ipcl, true, gi2c->dev, "%s: IO lines not in good state\n", __func__); - gi2c->prev_cancel_pending = true; - goto geni_i2c_gsi_cancel_pending; + /* doing pending cancel only rtl based SE's */ + if (gi2c->is_i2c_rtl_based) { + gi2c->prev_cancel_pending = true; + goto geni_i2c_gsi_cancel_pending; + } } } geni_i2c_err_prep_sg: @@ -1200,8 +1203,11 @@ static int geni_i2c_xfer(struct i2c_adapter *adap, if ((geni_ios & 0x3) != 0x3) { //SCL:b'1, SDA:b'0 GENI_SE_DBG(gi2c->ipcl, true, gi2c->dev, "%s: IO lines not in good state\n", __func__); - gi2c->prev_cancel_pending = true; - goto geni_i2c_txn_ret; + /* doing pending cancel only rtl based SE's */ + if (gi2c->is_i2c_rtl_based) { + gi2c->prev_cancel_pending = true; + goto geni_i2c_txn_ret; + } } }