mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 12:25:00 -04:00
Merge "i2c: i2c-msm-geni: Reinitialize the variables after every transfer"
This commit is contained in:
commit
c72e5d0be5
2 changed files with 7 additions and 1 deletions
|
|
@ -284,6 +284,7 @@ static const char *const gpi_cb_event_str[MSM_GPI_QUP_MAX_EVENT] = {
|
|||
[MSM_GPI_QUP_NOTIFY] = "NOTIFY",
|
||||
[MSM_GPI_QUP_ERROR] = "GLOBAL ERROR",
|
||||
[MSM_GPI_QUP_CH_ERROR] = "CHAN ERROR",
|
||||
[MSM_GPI_QUP_FW_ERROR] = "UNHANDLED ERROR",
|
||||
[MSM_GPI_QUP_PENDING_EVENT] = "PENDING EVENT",
|
||||
[MSM_GPI_QUP_EOT_DESC_MISMATCH] = "EOT/DESC MISMATCH",
|
||||
[MSM_GPI_QUP_SW_ERROR] = "SW ERROR",
|
||||
|
|
@ -2250,6 +2251,10 @@ int gpi_terminate_all(struct dma_chan *chan)
|
|||
if (ret) {
|
||||
GPII_ERR(gpii, gpii_chan->chid,
|
||||
"Error resetting channel ret:%d\n", ret);
|
||||
if (!gpii->reg_table_dump) {
|
||||
gpi_dump_debug_reg(gpii);
|
||||
gpii->reg_table_dump = true;
|
||||
}
|
||||
goto terminate_exit;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -401,6 +401,7 @@ static void gi2c_ev_cb(struct dma_chan *ch, struct msm_gpi_cb const *cb_str,
|
|||
case MSM_GPI_QUP_MAX_EVENT:
|
||||
/* fall through to stall impacted channel */
|
||||
case MSM_GPI_QUP_CH_ERROR:
|
||||
case MSM_GPI_QUP_FW_ERROR:
|
||||
case MSM_GPI_QUP_PENDING_EVENT:
|
||||
case MSM_GPI_QUP_EOT_DESC_MISMATCH:
|
||||
break;
|
||||
|
|
@ -795,6 +796,7 @@ static int geni_i2c_gsi_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[],
|
|||
struct msm_gpi_tre *tx_t = NULL;
|
||||
struct device *rx_dev = gi2c->wrapper_dev;
|
||||
struct device *tx_dev = gi2c->wrapper_dev;
|
||||
reinit_completion(&gi2c->xfer);
|
||||
|
||||
gi2c->cur = &msgs[i];
|
||||
|
||||
|
|
@ -967,7 +969,6 @@ static int geni_i2c_xfer(struct i2c_adapter *adap,
|
|||
int i, ret = 0, timeout = 0;
|
||||
|
||||
gi2c->err = 0;
|
||||
reinit_completion(&gi2c->xfer);
|
||||
|
||||
/* Client to respect system suspend */
|
||||
if (!pm_runtime_enabled(gi2c->dev)) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue