Commit 3b765867 authored by Olivier Moysan's avatar Olivier Moysan Committed by Mark Brown

ASoC: stm32: spdifrx: fix input pin state management

Changing input state in iec capture control is not safe,
as the pin state may be changed concurrently by ASoC
framework.
Remove pin state handling in iec capture control.

Note: This introduces a restriction on capture control,
when pin sleep state is defined in device tree. In this case
channel status can be captured only when an audio stream
capture is active.

Fixes: f68c2a68 ("ASoC: stm32: spdifrx: add power management")
Signed-off-by: default avatarOlivier Moysan <olivier.moysan@st.com>
Link: https://lore.kernel.org/r/20191204154333.7152-4-olivier.moysan@st.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 86e1956a
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/of_platform.h> #include <linux/of_platform.h>
#include <linux/pinctrl/consumer.h>
#include <linux/regmap.h> #include <linux/regmap.h>
#include <linux/reset.h> #include <linux/reset.h>
...@@ -484,8 +483,6 @@ static int stm32_spdifrx_get_ctrl_data(struct stm32_spdifrx_data *spdifrx) ...@@ -484,8 +483,6 @@ static int stm32_spdifrx_get_ctrl_data(struct stm32_spdifrx_data *spdifrx)
memset(spdifrx->cs, 0, SPDIFRX_CS_BYTES_NB); memset(spdifrx->cs, 0, SPDIFRX_CS_BYTES_NB);
memset(spdifrx->ub, 0, SPDIFRX_UB_BYTES_NB); memset(spdifrx->ub, 0, SPDIFRX_UB_BYTES_NB);
pinctrl_pm_select_default_state(&spdifrx->pdev->dev);
ret = stm32_spdifrx_dma_ctrl_start(spdifrx); ret = stm32_spdifrx_dma_ctrl_start(spdifrx);
if (ret < 0) if (ret < 0)
return ret; return ret;
...@@ -517,7 +514,6 @@ static int stm32_spdifrx_get_ctrl_data(struct stm32_spdifrx_data *spdifrx) ...@@ -517,7 +514,6 @@ static int stm32_spdifrx_get_ctrl_data(struct stm32_spdifrx_data *spdifrx)
end: end:
clk_disable_unprepare(spdifrx->kclk); clk_disable_unprepare(spdifrx->kclk);
pinctrl_pm_select_sleep_state(&spdifrx->pdev->dev);
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment