i2c: i2c-msm-geni: Do I2C configurations during resume

Do I2C frequency related configurations during resume.
Don't make the current message as NULL before the whole
transfer process is complete.

Change-Id: I8c4797fed1cfa0743c98eea3324e4b7b82d7f3cb
Signed-off-by: Vipin Deep Kaur <vkaur@codeaurora.org>
This commit is contained in:
Vipin Deep Kaur 2020-05-28 15:23:31 +05:30 • committed by Gerrit - the friendly Code Review server
commit 398ff36a86

View file

@ -262,6 +262,7 @@ static int geni_i2c_prepare(struct geni_i2c_dev *gi2c)
gi2c->tx_wm = gi2c_tx_depth - 1;
geni_se_init(gi2c->base, gi2c->tx_wm, gi2c_tx_depth);
qcom_geni_i2c_conf(gi2c, 0);
se_config_packing(gi2c->base, 8, 4, true);
GENI_SE_DBG(gi2c->ipcl, false, gi2c->dev,
"i2c fifo/se-dma mode. fifo depth:%d\n",
@ -911,7 +912,6 @@ static int geni_i2c_xfer(struct i2c_adapter *adap,
if (gi2c->err) {
reinit_completion(&gi2c->xfer);
gi2c->cur = NULL;
geni_cancel_m_cmd(gi2c->base);
timeout = wait_for_completion_timeout(&gi2c->xfer, HZ);
if (!timeout) {