Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 904e8b0b authored by Mark Brown's avatar Mark Brown
Browse files

Merge branch 'topic/of-name' of...

Merge branch 'topic/of-name' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-rcar
parents 7b47ab47 5e3cdaa2
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1604,6 +1604,10 @@ int snd_soc_of_parse_audio_simple_widgets(struct snd_soc_card *card,
int snd_soc_of_parse_tdm_slot(struct device_node *np,
			      unsigned int *slots,
			      unsigned int *slot_width);
void snd_soc_of_parse_audio_prefix(struct snd_soc_card *card,
				   struct snd_soc_codec_conf *codec_conf,
				   struct device_node *of_node,
				   const char *propname);
int snd_soc_of_parse_audio_routing(struct snd_soc_card *card,
				   const char *propname);
unsigned int snd_soc_of_parse_daifmt(struct device_node *np,
+20 −0
Original line number Diff line number Diff line
@@ -3303,6 +3303,26 @@ int snd_soc_of_parse_tdm_slot(struct device_node *np,
}
EXPORT_SYMBOL_GPL(snd_soc_of_parse_tdm_slot);

void snd_soc_of_parse_audio_prefix(struct snd_soc_card *card,
				   struct snd_soc_codec_conf *codec_conf,
				   struct device_node *of_node,
				   const char *propname)
{
	struct device_node *np = card->dev->of_node;
	const char *str;
	int ret;

	ret = of_property_read_string(np, propname, &str);
	if (ret < 0) {
		/* no prefix is not error */
		return;
	}

	codec_conf->of_node	= of_node;
	codec_conf->name_prefix	= str;
}
EXPORT_SYMBOL_GPL(snd_soc_of_parse_audio_prefix);

int snd_soc_of_parse_audio_routing(struct snd_soc_card *card,
				   const char *propname)
{