Commit 9c42dd7b authored by Mark Brown's avatar Mark Brown

ASoC: adau1372: Update to modern clocking terminology

As part of moving to remove the old style defines for the bus clocks update
the adau1372 driver to use more modern terminology for clocking.
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20210916151806.20756-1-broonie@kernel.orgSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 88e5cddd
...@@ -30,7 +30,7 @@ struct adau1372 { ...@@ -30,7 +30,7 @@ struct adau1372 {
void (*switch_mode)(struct device *dev); void (*switch_mode)(struct device *dev);
bool use_pll; bool use_pll;
bool enabled; bool enabled;
bool master; bool clock_provider;
struct snd_pcm_hw_constraint_list rate_constraints; struct snd_pcm_hw_constraint_list rate_constraints;
unsigned int slot_width; unsigned int slot_width;
...@@ -578,13 +578,13 @@ static int adau1372_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt) ...@@ -578,13 +578,13 @@ static int adau1372_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)
unsigned int sai0 = 0, sai1 = 0; unsigned int sai0 = 0, sai1 = 0;
bool invert_lrclk = false; bool invert_lrclk = false;
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:
adau1372->master = true; adau1372->clock_provider = true;
sai1 |= ADAU1372_SAI1_MS; sai1 |= ADAU1372_SAI1_MS;
break; break;
case SND_SOC_DAIFMT_CBS_CFS: case SND_SOC_DAIFMT_CBC_CFC:
adau1372->master = false; adau1372->clock_provider = false;
break; break;
default: default:
return -EINVAL; return -EINVAL;
...@@ -714,7 +714,7 @@ static int adau1372_set_tdm_slot(struct snd_soc_dai *dai, unsigned int tx_mask, ...@@ -714,7 +714,7 @@ static int adau1372_set_tdm_slot(struct snd_soc_dai *dai, unsigned int tx_mask,
break; break;
case 4: case 4:
sai0 = ADAU1372_SAI0_SAI_TDM4; sai0 = ADAU1372_SAI0_SAI_TDM4;
if (adau1372->master) if (adau1372->clock_provider)
adau1372->rate_constraints.mask = ADAU1372_RATE_MASK_TDM4_MASTER; adau1372->rate_constraints.mask = ADAU1372_RATE_MASK_TDM4_MASTER;
else else
adau1372->rate_constraints.mask = ADAU1372_RATE_MASK_TDM4; adau1372->rate_constraints.mask = ADAU1372_RATE_MASK_TDM4;
......
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