mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 23:24:22 -04:00
spi: Keep spi can transfer message when system in suspend
Since qcom baseline upgrade import the change which will return -EACCESS when system in suspend to transfer spi message, and this will conflict with single tap feature. For keep performance and logic consistent with before, remove the new logic introduced by Qcom after discussion with Qcom(SR: 05267011) Change-Id: I6cbf9ca51b62dd9ca9519c762147f83cf3f47831 Signed-off-by: wengjun1 <wengjun1@motorola.com> Reviewed-on: https://gerrit.mot.com/1979369 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Huosheng Liao <liaohs@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
e628b2580e
commit
166bebd6e6
1 changed files with 10 additions and 1 deletions
|
|
@ -1006,13 +1006,14 @@ static int spi_geni_prepare_message(struct spi_master *spi,
|
|||
|
||||
if (mas->shared_ee) {
|
||||
if (mas->setup) {
|
||||
#if 0
|
||||
/* Client to respect system suspend */
|
||||
if (!pm_runtime_enabled(mas->dev)) {
|
||||
GENI_SE_ERR(mas->ipc, false, NULL,
|
||||
"%s: System suspended\n", __func__);
|
||||
return -EACCES;
|
||||
}
|
||||
|
||||
#endif
|
||||
ret = pm_runtime_get_sync(mas->dev);
|
||||
if (ret < 0) {
|
||||
dev_err(mas->dev,
|
||||
|
|
@ -1020,8 +1021,10 @@ static int spi_geni_prepare_message(struct spi_master *spi,
|
|||
__func__, ret);
|
||||
WARN_ON_ONCE(1);
|
||||
pm_runtime_put_noidle(mas->dev);
|
||||
#if 0
|
||||
/* Set device in suspended since resume failed */
|
||||
pm_runtime_set_suspended(mas->dev);
|
||||
#endif
|
||||
goto exit_prepare_message;
|
||||
}
|
||||
ret = 0;
|
||||
|
|
@ -1342,12 +1345,14 @@ static int spi_geni_prepare_transfer_hardware(struct spi_master *spi)
|
|||
if (mas->is_le_vm)
|
||||
return 0;
|
||||
|
||||
#if 0
|
||||
/* Client to respect system suspend */
|
||||
if (!pm_runtime_enabled(mas->dev)) {
|
||||
GENI_SE_ERR(mas->ipc, false, NULL,
|
||||
"%s: System suspended\n", __func__);
|
||||
return -EACCES;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (mas->gsi_mode && !mas->shared_ee) {
|
||||
struct se_geni_rsc *rsc;
|
||||
|
|
@ -1380,8 +1385,10 @@ static int spi_geni_prepare_transfer_hardware(struct spi_master *spi)
|
|||
__func__, ret);
|
||||
WARN_ON_ONCE(1);
|
||||
pm_runtime_put_noidle(mas->dev);
|
||||
#if 0
|
||||
/* Set device in suspended since resume failed */
|
||||
pm_runtime_set_suspended(mas->dev);
|
||||
#endif
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
@ -1667,6 +1674,7 @@ static int spi_geni_transfer_one(struct spi_master *spi,
|
|||
GENI_SE_DBG(mas->ipc, false, mas->dev,
|
||||
"current xfer_timeout:%lu ms.\n", xfer_timeout);
|
||||
|
||||
#if 0
|
||||
/* Double check PM status, client might have not taken wakelock and
|
||||
* continue to queue more transfers. Post auto-suspend, system suspend
|
||||
* can keep driver to forced suspend, hence it's client's responsibility
|
||||
|
|
@ -1677,6 +1685,7 @@ static int spi_geni_transfer_one(struct spi_master *spi,
|
|||
"%s: device is PM suspended\n", __func__);
|
||||
return -EACCES;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (mas->cur_xfer_mode != GSI_DMA) {
|
||||
reinit_completion(&mas->xfer_done);
|
||||
|
|
|
|||
Loading…
Reference in a new issue