Unverified Commit d1192184 authored by Mark Brown's avatar Mark Brown
Browse files

ASoC: ep93xx: Prepare for DT transition

Merge series from Alexander Sverdlin <alexander.sverdlin@gmail.com>:

This is a preparatory series for EP93xx transition to DT. This patchset is
a pre-requisite and has been tested with the full DT patchset [1].

[1]. git://git.maquefel.me/linux.git branch ep93xx/6.2-rc4-v0

Alexander Sverdlin (3):
  ASoC: ep93xx: i2s: move enable call to startup callback
  ASoC: cs4271: flat regcache, trivial simplifications
  ASoC: ep93xx: i2s: Make it individually selectable

 sound/soc/cirrus/Kconfig      |  6 +++++-
 sound/soc/cirrus/ep93xx-i2s.c | 12 +++++++++++-
 sound/soc/codecs/cs4271-i2c.c |  1 -
 sound/soc/codecs/cs4271-spi.c |  1 -
 sound/soc/codecs/cs4271.c     |  4 ++--
 5 files changed, 18 insertions(+), 6 deletions(-)

--
2.40.0
parents beed115c 24f934be
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -8,7 +8,11 @@ config SND_EP93XX_SOC
	  the EP93xx I2S or AC97 interfaces.

config SND_EP93XX_SOC_I2S
	tristate
	tristate "I2S controller support for the Cirrus Logic EP93xx series"
	depends on SND_EP93XX_SOC
	help
	  Say Y or M if you want to add support for codecs attached to
	  the EP93xx I2S interface.

if SND_EP93XX_SOC_I2S

+11 −1
Original line number Diff line number Diff line
@@ -208,6 +208,16 @@ static int ep93xx_i2s_dai_probe(struct snd_soc_dai *dai)
	return 0;
}

static int ep93xx_i2s_startup(struct snd_pcm_substream *substream,
			      struct snd_soc_dai *dai)
{
	struct ep93xx_i2s_info *info = snd_soc_dai_get_drvdata(dai);

	ep93xx_i2s_enable(info, substream->stream);

	return 0;
}

static void ep93xx_i2s_shutdown(struct snd_pcm_substream *substream,
				struct snd_soc_dai *dai)
{
@@ -348,7 +358,6 @@ static int ep93xx_i2s_hw_params(struct snd_pcm_substream *substream,
	if (err)
		return err;

	ep93xx_i2s_enable(info, substream->stream);
	return 0;
}

@@ -397,6 +406,7 @@ static int ep93xx_i2s_resume(struct snd_soc_component *component)
#endif

static const struct snd_soc_dai_ops ep93xx_i2s_dai_ops = {
	.startup	= ep93xx_i2s_startup,
	.shutdown	= ep93xx_i2s_shutdown,
	.hw_params	= ep93xx_i2s_hw_params,
	.set_sysclk	= ep93xx_i2s_set_sysclk,
+0 −1
Original line number Diff line number Diff line
@@ -17,7 +17,6 @@ static int cs4271_i2c_probe(struct i2c_client *client)

	config = cs4271_regmap_config;
	config.reg_bits = 8;
	config.val_bits = 8;

	return cs4271_probe(&client->dev,
			    devm_regmap_init_i2c(client, &config));
+0 −1
Original line number Diff line number Diff line
@@ -17,7 +17,6 @@ static int cs4271_spi_probe(struct spi_device *spi)

	config = cs4271_regmap_config;
	config.reg_bits = 16;
	config.val_bits = 8;
	config.read_flag_mask = 0x21;
	config.write_flag_mask = 0x20;

+2 −2
Original line number Diff line number Diff line
@@ -689,8 +689,8 @@ const struct regmap_config cs4271_regmap_config = {

	.reg_defaults = cs4271_reg_defaults,
	.num_reg_defaults = ARRAY_SIZE(cs4271_reg_defaults),
	.cache_type = REGCACHE_RBTREE,

	.cache_type = REGCACHE_FLAT,
	.val_bits = 8,
	.volatile_reg = cs4271_volatile_reg,
};
EXPORT_SYMBOL_GPL(cs4271_regmap_config);