From patchwork Tue Jul 17 15:36:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 142157 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp3813431ljj; Tue, 17 Jul 2018 08:37:08 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfge3n5sNIUx5LpPkyhbjTS0Dx0VkryqNmWfZCXpfa3B+Kgft6Y4dufMd0Q6Z75/EJP/OnL X-Received: by 2002:a62:2f84:: with SMTP id v126-v6mr1171679pfv.115.1531841828648; Tue, 17 Jul 2018 08:37:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531841828; cv=none; d=google.com; s=arc-20160816; b=jGYNdWczkd7ila7GdrSi1Zph3chSfuNUaxaam1PiepL+GdHa43Ew/KCRJ34cys6dbP ByYAqQ66q3mPJJXuat0kpPkYSswvWPX9dHwIciryCCvFs4iJ3zxr7whbbEp+v08kFYrh AtgwK8t2x9ICOZRAz0uFIU5QdbfqZ2Or740B8NByfwc6lAGhLYMjBax+2yGbgdwbYGH2 BC6FdaV5kycGx9Ylszq1olriHpcTjvzC4XVDutlipCvqWkd1uWLmtcqVbbnJ92vG8ysN sbyFF2oAN74KD5MSWQF+6pvY4889Ya+p5WOXhG0EVRopLqcEmhWej17EXwfwy6Epx8mq xP+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=yoo5n4dhpulCSFNRPHfsRmRUHZHqOi5jkgvB0Euf0Sg=; b=nb4XH+ZamGDcuWXxyM1SIb/fsbLeRazAvlD0O1USQQAVQjsYPd4tMx6g0kf9vf8/e6 m5blmjUa8OGtKRot/6lcpUEZnNL1UKE7D7XNMk5A0kuEdZ1+r0d+7v/729Lo5e8qtbsd o2uWXymkweI4MKA9mIyCA9M4rHQbayXVUPHhbLPDpZELZxOWcQp4dIxNL4Ia8TyLXBkm +7qjVMR99mKDhtWXkI82l2zAl7UTupPyE8KgPyMXDNBmkSBOl0IbP+nWM9D5Mk5EmAnI iG6NiMRQdAeLTcEyGpeXS46JepLKRSzvfrcJ2rpbekv4W9qkEXLpEF3nyKAZd1UAY67H BdcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=mkPDfy2T; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l26-v6si1115945pfo.325.2018.07.17.08.37.08; Tue, 17 Jul 2018 08:37:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=mkPDfy2T; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731404AbeGQQKS (ORCPT + 31 others); Tue, 17 Jul 2018 12:10:18 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:36376 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731296AbeGQQKR (ORCPT ); Tue, 17 Jul 2018 12:10:17 -0400 Received: by mail-wm0-f68.google.com with SMTP id s14-v6so2007594wmc.1 for ; Tue, 17 Jul 2018 08:37:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=yoo5n4dhpulCSFNRPHfsRmRUHZHqOi5jkgvB0Euf0Sg=; b=mkPDfy2TrU9TpaAJ+aww5QTfB8F/rkYM23QejFTw1hkEqPzKDy2lg+uMve0YbQLe70 2k50Kd7GEPbHwdcf7Um8zihA/PArsgs7C8ivn6fY3QS5OTYSiaxZW+HuzJVD4lfupreS pajhG0hujS2nM4tQnKDLMljis0W75cLDttcGM0QEtnkqG149/7W2/3PKkYPW0tUlO7ja 39VjtWuylPqVB+Zu8nq9aGSXWU3wDAxG3dXj5Bcv1miGzWOPuGApSu8QiLUPq6H4xmlp 1M3TypZxs3buLDg9pThLuXO+vDfTWO5Mmcj0yQBotrdyLjCR1fb9AwSsdO3Zu6CqRlcc 93+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=yoo5n4dhpulCSFNRPHfsRmRUHZHqOi5jkgvB0Euf0Sg=; b=CpaxKjYyujwaqZMisYqlmncJ/u0N+gSEm9hdaYv1HMON8iCUx8iZ87lFDwyE9TL+u5 vJEVjP1DGZBHziOLZkx3Kkg5NKektLkBddyL3gAS/gegPyZ7h7Jcz8DHqRcdufud28mY /hsnx6dVtERJQeWurpLVitEVttYVZ/yesgh3ikirG14cx/b3NkUIYarsRrSChBHAjvqP hJqDyNuJ/L9AS+e5q7ArtPT9w2J2lA2v3T+W8W71RnRgojx+UUBMimLCyMW6Lh5Zk9ta 7zKn0c4IGu2J4wD+26GI3i5N3qT9a6KTZjeoQM2uYWVjfn8SnDvtj8ufHvpkTmKdKBXq IuNQ== X-Gm-Message-State: AOUpUlEhfqGM18cN8ZCaSTxQgyAcAwuL/ro23Bp0gyrWZjpj7YOntogl Dts63A/rPoeZFKPghFFNZwnpIA== X-Received: by 2002:a1c:3f08:: with SMTP id m8-v6mr1826562wma.88.1531841823914; Tue, 17 Jul 2018 08:37:03 -0700 (PDT) Received: from boomer.baylibre.local ([90.63.244.31]) by smtp.googlemail.com with ESMTPSA id h12-v6sm16971464wmb.3.2018.07.17.08.37.02 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 17 Jul 2018 08:37:03 -0700 (PDT) From: Jerome Brunet To: Mark Brown , Liam Girdwood , Kevin Hilman , Carlo Caione Cc: Jerome Brunet , alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-amlogic@lists.infradead.org Subject: [PATCH 13/15] ASoC: export snd_soc_of_get_slot_mask Date: Tue, 17 Jul 2018 17:36:40 +0200 Message-Id: <20180717153643.8806-17-jbrunet@baylibre.com> X-Mailer: git-send-email 2.14.4 In-Reply-To: <20180717153643.8806-1-jbrunet@baylibre.com> References: <20180717153643.8806-1-jbrunet@baylibre.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Amlogic's axg card driver can't use snd_soc_of_parse_tdm_slot() directly because it needs to handle 4 mask for each direction. Yet the parsing of each mask is the same, so export snd_soc_of_get_slot_mask() to reuse the the existing code. Signed-off-by: Jerome Brunet --- include/sound/soc.h | 3 +++ sound/soc/soc-core.c | 7 ++++--- 2 files changed, 7 insertions(+), 3 deletions(-) -- 2.14.4 diff --git a/include/sound/soc.h b/include/sound/soc.h index a4915148f739..41cec42fb456 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -1426,6 +1426,9 @@ int snd_soc_of_parse_card_name(struct snd_soc_card *card, const char *propname); int snd_soc_of_parse_audio_simple_widgets(struct snd_soc_card *card, const char *propname); +int snd_soc_of_get_slot_mask(struct device_node *np, + const char *prop_name, + unsigned int *mask); int snd_soc_of_parse_tdm_slot(struct device_node *np, unsigned int *tx_mask, unsigned int *rx_mask, diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 3be0310d5c81..1344e8e602fd 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -3366,9 +3366,9 @@ int snd_soc_of_parse_audio_simple_widgets(struct snd_soc_card *card, } EXPORT_SYMBOL_GPL(snd_soc_of_parse_audio_simple_widgets); -static int snd_soc_of_get_slot_mask(struct device_node *np, - const char *prop_name, - unsigned int *mask) +int snd_soc_of_get_slot_mask(struct device_node *np, + const char *prop_name, + unsigned int *mask) { u32 val; const __be32 *of_slot_mask = of_get_property(np, prop_name, &val); @@ -3383,6 +3383,7 @@ static int snd_soc_of_get_slot_mask(struct device_node *np, return val; } +EXPORT_SYMBOL_GPL(snd_soc_of_get_slot_mask); int snd_soc_of_parse_tdm_slot(struct device_node *np, unsigned int *tx_mask,