mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 21:54:34 -04:00
spi: spi-msm-geni: Unset GSI mode flag if TVM usage is active
This change overrides the GSI mode flag, as generally for any TVM usecase we enable la-vm flag. So that should be sufficient to manage the TVM enabled SE instance. This way any requirement of the GSI mode should not be conflicting or impacting TVM or non GSI usecases. Change-Id: I8c8ab8edb3866139ac07d1af55ddf294807b027b Signed-off-by: Mukesh Kumar Savaliya <msavaliy@codeaurora.org>
This commit is contained in:
parent
c728c09e3a
commit
8c5382949d
1 changed files with 14 additions and 9 deletions
|
|
@ -1350,9 +1350,14 @@ static int spi_geni_prepare_transfer_hardware(struct spi_master *spi)
|
|||
struct se_geni_rsc *rsc;
|
||||
int ret = 0;
|
||||
|
||||
rsc = &mas->spi_rsc;
|
||||
ret = pinctrl_select_state(rsc->geni_pinctrl,
|
||||
rsc->geni_gpio_active);
|
||||
if (!mas->is_la_vm) {
|
||||
/* Do this only for non TVM LA usecase */
|
||||
/* May not be needed here, but maintain parity */
|
||||
rsc = &mas->spi_rsc;
|
||||
ret = pinctrl_select_state(rsc->geni_pinctrl,
|
||||
rsc->geni_gpio_active);
|
||||
}
|
||||
|
||||
if (ret)
|
||||
GENI_SE_ERR(mas->ipc, false, NULL,
|
||||
"%s: Error %d pinctrl_select_state\n", __func__, ret);
|
||||
|
|
@ -1400,17 +1405,17 @@ static int spi_geni_unprepare_transfer_hardware(struct spi_master *spi)
|
|||
if (mas->shared_ee || mas->is_le_vm)
|
||||
return 0;
|
||||
|
||||
if (mas->is_la_vm)
|
||||
/* Client on LA VM to controls resources, hence return */
|
||||
return 0;
|
||||
|
||||
if (mas->gsi_mode) {
|
||||
struct se_geni_rsc *rsc;
|
||||
int ret = 0;
|
||||
|
||||
rsc = &mas->spi_rsc;
|
||||
ret = pinctrl_select_state(rsc->geni_pinctrl,
|
||||
if (!mas->is_la_vm) {
|
||||
/* Do this only for non TVM LA usecase */
|
||||
rsc = &mas->spi_rsc;
|
||||
ret = pinctrl_select_state(rsc->geni_pinctrl,
|
||||
rsc->geni_gpio_sleep);
|
||||
}
|
||||
|
||||
if (ret)
|
||||
GENI_SE_ERR(mas->ipc, false, NULL,
|
||||
"%s: Error %d pinctrl_select_state\n", __func__, ret);
|
||||
|
|
|
|||
Loading…
Reference in a new issue