From patchwork Thu Jul 23 18:39:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Gerhold X-Patchwork-Id: 11681509 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 69DA413B1 for ; Thu, 23 Jul 2020 18:41:14 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F017D2086A for ; Thu, 23 Jul 2020 18:41:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="vJMhh5yC"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gerhold.net header.i=@gerhold.net header.b="a+qAt40s" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F017D2086A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=gerhold.net Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 76C2D167C; Thu, 23 Jul 2020 20:40:25 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 76C2D167C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1595529672; bh=qIQa+mn+31BRzmSFUUteAq0orLC4NPAWivmYKYi6wKA=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=vJMhh5yCQSbd2nww9CXXaNsAOONj3Zra8cv1pr7M3dmMf/jgjnKMYGhSrqMSEUeJ1 pJMrD8qx18/5s6Xmjt67t7Rt6yGImg4Cq7rmQUkMEYpDXZ3I518r3ZUHqQ18tHQxNb xNJ3JSM195ZxmX8q+CVwwIFd+Z16YC2X9SznBzKY= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 0B001F8011F; Thu, 23 Jul 2020 20:39:36 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 76F04F8028C; Thu, 23 Jul 2020 20:39:31 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE,URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from mo4-p02-ob.smtp.rzone.de (mo4-p02-ob.smtp.rzone.de [85.215.255.82]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 51B40F8020D for ; Thu, 23 Jul 2020 20:39:24 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 51B40F8020D Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gerhold.net header.i=@gerhold.net header.b="a+qAt40s" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1595529564; s=strato-dkim-0002; d=gerhold.net; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: X-RZG-CLASS-ID:X-RZG-AUTH:From:Subject:Sender; bh=IPhq+JQHymy5t9BAg8bCj3SRGxYzGHSxJyIMhV286WU=; b=a+qAt40s3Dhzb6hDbn8XV6CVwyv6qh9I7X6OGiS/jDU2G8/w09KczaebleWclPdeIj 8P0lUyyhJRuzt9d4iidPevtGemvtxqAGZtZUjq2y0bZj2ccOkHs7oBZUrfClfNsSqzAN E65SRw0Lcem28mSX1Boo9HHf0dxCcUYenbjTLtNpaasl0XscWtEn0fQEHlXhIebNrLjT kl8DiKxAx0SiilPuL5xEEYu/+8QZf38wtkqzyh8FaQHy171H6akd+h9aM+ahlc8SpKq6 90aFI5OGNhaYsVz8gl5tWr7jI1Q7lNam6JkFwwBaPDpopIGCvIGhfWCForgCT0aXdlqG ShIg== X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVORvLd4SsytBXS7IYBkLahKxB4W6OBfnv" X-RZG-CLASS-ID: mo00 Received: from localhost.localdomain by smtp.strato.de (RZmta 46.10.5 DYNA|AUTH) with ESMTPSA id Y0939ew6NIdL5IL (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Thu, 23 Jul 2020 20:39:21 +0200 (CEST) From: Stephan Gerhold To: Mark Brown Subject: [PATCH 5/7] ASoC: qcom: common: Parse properties with "qcom," prefix Date: Thu, 23 Jul 2020 20:39:02 +0200 Message-Id: <20200723183904.321040-6-stephan@gerhold.net> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200723183904.321040-1-stephan@gerhold.net> References: <20200723183904.321040-1-stephan@gerhold.net> MIME-Version: 1.0 Cc: alsa-devel@alsa-project.org, Banajit Goswami , Stephan Gerhold , Patrick Lai , Liam Girdwood , Srinivas Kandagatla , ~postmarketos/upstreaming@lists.sr.ht, Cheng-Yi Chiang X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" The apq8016_sbc device tree binding uses a "qcom," vendor prefix for all device tree properties, while qcom_snd_parse_of() uses the same properties without a prefix. In the future it would be nice to make this consistent, however, for backwards compatibility we need to parse both names to allow apq8016_sbc to use the common qcom_snd_parse_of() function. Cc: Srinivas Kandagatla Signed-off-by: Stephan Gerhold --- sound/soc/qcom/common.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/sound/soc/qcom/common.c b/sound/soc/qcom/common.c index 54f5bc60246f..84dba0d69e6b 100644 --- a/sound/soc/qcom/common.c +++ b/sound/soc/qcom/common.c @@ -18,6 +18,9 @@ int qcom_snd_parse_of(struct snd_soc_card *card) int ret, num_links; ret = snd_soc_of_parse_card_name(card, "model"); + if (ret == 0 && !card->name) + /* Deprecated, only for compatibility with old device trees */ + ret = snd_soc_of_parse_card_name(card, "qcom,model"); if (ret) { dev_err(dev, "Error parsing card name: %d\n", ret); return ret; @@ -25,8 +28,13 @@ int qcom_snd_parse_of(struct snd_soc_card *card) /* DAPM routes */ if (of_property_read_bool(dev->of_node, "audio-routing")) { - ret = snd_soc_of_parse_audio_routing(card, - "audio-routing"); + ret = snd_soc_of_parse_audio_routing(card, "audio-routing"); + if (ret) + return ret; + } + /* Deprecated, only for compatibility with old device trees */ + if (of_property_read_bool(dev->of_node, "qcom,audio-routing")) { + ret = snd_soc_of_parse_audio_routing(card, "qcom,audio-routing"); if (ret) return ret; }