Commit e0b64fa3 authored by Mark Brown's avatar Mark Brown

ASoC: fsl-esai: Update to modern clocking terminology

As part of moving to remove the old style defines for the bus clocks update
the fsl-esai driver to use more modern terminology for clocking.
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
Reviewed-by: default avatarFabio Estevam <festevam@gmail.com>
Link: https://lore.kernel.org/r/20210921213542.31688-4-broonie@kernel.orgSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 2757b340
...@@ -52,7 +52,7 @@ struct fsl_esai_soc_data { ...@@ -52,7 +52,7 @@ struct fsl_esai_soc_data {
* @sck_rate: clock rate of desired SCKx clock * @sck_rate: clock rate of desired SCKx clock
* @hck_dir: the direction of HCKx pads * @hck_dir: the direction of HCKx pads
* @sck_div: if using PSR/PM dividers for SCKx clock * @sck_div: if using PSR/PM dividers for SCKx clock
* @slave_mode: if fully using DAI slave mode * @consumer_mode: if fully using DAI clock consumer mode
* @synchronous: if using tx/rx synchronous mode * @synchronous: if using tx/rx synchronous mode
* @name: driver name * @name: driver name
*/ */
...@@ -78,7 +78,7 @@ struct fsl_esai { ...@@ -78,7 +78,7 @@ struct fsl_esai {
u32 sck_rate[2]; u32 sck_rate[2];
bool hck_dir[2]; bool hck_dir[2];
bool sck_div[2]; bool sck_div[2];
bool slave_mode; bool consumer_mode;
bool synchronous; bool synchronous;
char name[32]; char name[32];
}; };
...@@ -366,8 +366,8 @@ static int fsl_esai_set_bclk(struct snd_soc_dai *dai, bool tx, u32 freq) ...@@ -366,8 +366,8 @@ static int fsl_esai_set_bclk(struct snd_soc_dai *dai, bool tx, u32 freq)
u32 sub, ratio = hck_rate / freq; u32 sub, ratio = hck_rate / freq;
int ret; int ret;
/* Don't apply for fully slave mode or unchanged bclk */ /* Don't apply for fully consumer mode or unchanged bclk */
if (esai_priv->slave_mode || esai_priv->sck_rate[tx] == freq) if (esai_priv->consumer_mode || esai_priv->sck_rate[tx] == freq)
return 0; return 0;
if (ratio * freq > hck_rate) if (ratio * freq > hck_rate)
...@@ -476,20 +476,20 @@ static int fsl_esai_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt) ...@@ -476,20 +476,20 @@ static int fsl_esai_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)
return -EINVAL; return -EINVAL;
} }
esai_priv->slave_mode = false; esai_priv->consumer_mode = false;
/* DAI clock master masks */ /* DAI clock provider masks */
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { switch (fmt & SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK) {
case SND_SOC_DAIFMT_CBM_CFM: case SND_SOC_DAIFMT_CBP_CFP:
esai_priv->slave_mode = true; esai_priv->consumer_mode = true;
break; break;
case SND_SOC_DAIFMT_CBS_CFM: case SND_SOC_DAIFMT_CBC_CFP:
xccr |= ESAI_xCCR_xCKD; xccr |= ESAI_xCCR_xCKD;
break; break;
case SND_SOC_DAIFMT_CBM_CFS: case SND_SOC_DAIFMT_CBP_CFC:
xccr |= ESAI_xCCR_xFSD; xccr |= ESAI_xCCR_xFSD;
break; break;
case SND_SOC_DAIFMT_CBS_CFS: case SND_SOC_DAIFMT_CBC_CFC:
xccr |= ESAI_xCCR_xFSD | ESAI_xCCR_xCKD; xccr |= ESAI_xCCR_xFSD | ESAI_xCCR_xCKD;
break; break;
default: default:
...@@ -1016,8 +1016,8 @@ static int fsl_esai_probe(struct platform_device *pdev) ...@@ -1016,8 +1016,8 @@ static int fsl_esai_probe(struct platform_device *pdev)
/* Set a default slot number */ /* Set a default slot number */
esai_priv->slots = 2; esai_priv->slots = 2;
/* Set a default master/slave state */ /* Set a default clock provider state */
esai_priv->slave_mode = true; esai_priv->consumer_mode = true;
/* Determine the FIFO depth */ /* Determine the FIFO depth */
iprop = of_get_property(np, "fsl,fifo-depth", NULL); iprop = of_get_property(np, "fsl,fifo-depth", NULL);
......
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