Merge "asoc: audio-ext-clk: Add support for multiple lpass clock nodes"
This commit is contained in:
commit
e7abe2550c
1 changed files with 30 additions and 3 deletions
|
@ -27,7 +27,10 @@ enum {
|
|||
AUDIO_EXT_CLK_PMI,
|
||||
AUDIO_EXT_CLK_LNBB2,
|
||||
AUDIO_EXT_CLK_LPASS,
|
||||
AUDIO_EXT_CLK_MAX,
|
||||
AUDIO_EXT_CLK_LPASS2,
|
||||
AUDIO_EXT_CLK_LPASS3,
|
||||
AUDIO_EXT_CLK_LPASS_MAX,
|
||||
AUDIO_EXT_CLK_MAX = AUDIO_EXT_CLK_LPASS_MAX,
|
||||
};
|
||||
|
||||
struct pinctrl_info {
|
||||
|
@ -61,7 +64,8 @@ static int audio_ext_clk_prepare(struct clk_hw *hw)
|
|||
struct pinctrl_info *pnctrl_info = &clk_priv->audio_clk.pnctrl_info;
|
||||
int ret;
|
||||
|
||||
if (clk_priv->clk_src == AUDIO_EXT_CLK_LPASS) {
|
||||
if ((clk_priv->clk_src >= AUDIO_EXT_CLK_LPASS) &&
|
||||
(clk_priv->clk_src < AUDIO_EXT_CLK_LPASS_MAX)) {
|
||||
clk_priv->clk_cfg.enable = 1;
|
||||
ret = afe_set_lpass_clk_cfg(IDX_RSVD_3, &clk_priv->clk_cfg);
|
||||
if (ret < 0) {
|
||||
|
@ -102,7 +106,8 @@ static void audio_ext_clk_unprepare(struct clk_hw *hw)
|
|||
}
|
||||
}
|
||||
|
||||
if (clk_priv->clk_src == AUDIO_EXT_CLK_LPASS) {
|
||||
if ((clk_priv->clk_src >= AUDIO_EXT_CLK_LPASS) &&
|
||||
(clk_priv->clk_src < AUDIO_EXT_CLK_LPASS_MAX)) {
|
||||
clk_priv->clk_cfg.enable = 0;
|
||||
ret = afe_set_lpass_clk_cfg(IDX_RSVD_3, &clk_priv->clk_cfg);
|
||||
if (ret < 0)
|
||||
|
@ -184,6 +189,28 @@ static struct audio_ext_clk audio_clk_array[] = {
|
|||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
.pnctrl_info = {NULL},
|
||||
.fact = {
|
||||
.mult = 1,
|
||||
.div = 1,
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "audio_lpass_mclk2",
|
||||
.ops = &audio_ext_clk_ops,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
.pnctrl_info = {NULL},
|
||||
.fact = {
|
||||
.mult = 1,
|
||||
.div = 1,
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "audio_lpass_mclk3",
|
||||
.ops = &audio_ext_clk_ops,
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static int audio_get_pinctrl(struct platform_device *pdev)
|
||||
|
|
Loading…
Reference in a new issue