From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kuninori Morimoto Subject: [resend][PATCH v5 06/10] ASoC: soc-core: enable "dai-name" on snd_soc_of_parse_daifmt() Date: Mon, 3 Apr 2017 08:13:34 +0000 Message-ID: <87mvbxnc8n.wl%kuninori.morimoto.gx@renesas.com> References: <87vaqlnceg.wl%kuninori.morimoto.gx@renesas.com> Mime-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset="US-ASCII" Return-path: In-Reply-To: <87vaqlnceg.wl%kuninori.morimoto.gx-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org> Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Mark Brown , Rob Herring Cc: Linux-ALSA , Simon , Linux-DT List-Id: devicetree@vger.kernel.org From: Kuninori Morimoto Current snd_soc_of_parse_daifmt() detects [prefix]format, but "format" was unclear in some case. This patch enables [prefix]dai-format, too. Signed-off-by: Kuninori Morimoto --- v4 -> v5 - don't exchange simle-xxx-card side sound/soc/soc-core.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index d267a01..f8608b7 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -3946,11 +3946,16 @@ unsigned int snd_soc_of_parse_daifmt(struct device_node *np, prefix = ""; /* - * check "[prefix]format = xxx" + * check "[prefix]dai-format = xxx" + * or "[prefix]format = xxx" * SND_SOC_DAIFMT_FORMAT_MASK area */ - snprintf(prop, sizeof(prop), "%sformat", prefix); + snprintf(prop, sizeof(prop), "%sdai-format", prefix); ret = of_property_read_string(np, prop, &str); + if (ret < 0) { + snprintf(prop, sizeof(prop), "%sformat", prefix); + ret = of_property_read_string(np, prop, &str); + } if (ret == 0) { for (i = 0; i < ARRAY_SIZE(of_fmt_table); i++) { if (strcmp(str, of_fmt_table[i].name) == 0) { -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html