From patchwork Sat Aug 24 20:26:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= X-Patchwork-Id: 11113125 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 4266F14DB for ; Sat, 24 Aug 2019 20:31:37 +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 B3AF722CE3 for ; Sat, 24 Aug 2019 20:31:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="mk6Y7N9P"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=rere.qmqm.pl header.i=@rere.qmqm.pl header.b="i9L0Zee5" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B3AF722CE3 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=rere.qmqm.pl 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 D5D98167A; Sat, 24 Aug 2019 22:30:44 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz D5D98167A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1566678695; bh=N1i3q8pYO7WidR3zys9QYk4/YjGmYuG9U4tI+GPPHtY=; h=Date:In-Reply-To:References:From:To:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=mk6Y7N9PqPpKDDbVnEnl96kMk8OA4k0XHscqPUpA1c3kJIWXrdcI2TVggmpYQdwmw 3eR3R1nRlhs0UTzzQhoPlX2lLJFrpMDP+XrVs03USSGT6b8uypjBk5vPDVu2j8wkzm +twTWiVRnSMrWQfHvEjOZQK+aER/TELCXpVlcLqU= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id BEA0CF80635; Sat, 24 Aug 2019 22:27:18 +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 3E087F80391; Sat, 24 Aug 2019 22:27:07 +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,SPF_HELO_PASS,SPF_PASS,URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from rere.qmqm.pl (rere.qmqm.pl [91.227.64.183]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id DCF82F8014A for ; Sat, 24 Aug 2019 22:26:57 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz DCF82F8014A Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=rere.qmqm.pl header.i=@rere.qmqm.pl header.b="i9L0Zee5" Received: from remote.user (localhost [127.0.0.1]) by rere.qmqm.pl (Postfix) with ESMTPSA id 46G8sF1j5szcY; Sat, 24 Aug 2019 22:25:21 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=rere.qmqm.pl; s=1; t=1566678321; bh=GwOHzkGm8clrvcWeJl2STu4OSTCx3WLNVMtfiTxNuU0=; h=Date:In-Reply-To:References:From:Subject:To:Cc:From; b=i9L0Zee55MalxIEpKvOUzzET/ECH4QJvMh9/INDvMqLDNQCRyHC0e79/AGq6lF3xM oe9LpME1uZtJ51Ks/ywYRTemHFZiLnNeTgoDOojYvKMM9OjxnD+D+jZ7a+yp9yOQXS cDegMH5mHN0ZYq/FIYb1gJ76n2vQ5wz2HbdO29mXq9h4cKijGWtF6GsjsOPj9t/smm JS0MeW9j42p44Yz57L2ML+8QtJNDqbXwkanUX6jN/EnO/3NpA5PZXM1wJAIlDJ3eyd sz5vtClDHhE2cA1BqGW33Nf2H5QXzeoZ92s6630CzPDmXZKbVuu0HCcxvPgpBkEWU8 k8KUMWSdVO9jw== X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.101.2 at mail Date: Sat, 24 Aug 2019 22:26:56 +0200 Message-Id: <5f1fd1b8f646c5ced1d838c381b6973e5abccd53.1566677788.git.mirq-linux@rere.qmqm.pl> In-Reply-To: References: From: =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= MIME-Version: 1.0 To: alsa-devel@alsa-project.org, devicetree@vger.kernel.org Cc: Mark Rutland , Alexandre Belloni , Arnd Bergmann , Greg Kroah-Hartman , Nicolas Ferre , Takashi Iwai , Liam Girdwood , Ludovic Desroches , Mark Brown , Chas Williams <3chas3@gmail.com>, Rob Herring , Codrin Ciubotariu , linux-kernel@vger.kernel.org Subject: [alsa-devel] [PATCH v2 5/6] misc: atmel-ssc: get LRCLK pin selection from DT 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" Store LRCLK pin selection for use by ASoC DAI driver. Signed-off-by: Michał Mirosław Reviewed-by: Codrin Ciubotariu --- v2: split from ASoC implementation --- drivers/misc/atmel-ssc.c | 9 +++++++++ include/linux/atmel-ssc.h | 2 ++ 2 files changed, 11 insertions(+) diff --git a/drivers/misc/atmel-ssc.c b/drivers/misc/atmel-ssc.c index ab4144ea1f11..1322e29bc37a 100644 --- a/drivers/misc/atmel-ssc.c +++ b/drivers/misc/atmel-ssc.c @@ -210,6 +210,15 @@ static int ssc_probe(struct platform_device *pdev) struct device_node *np = pdev->dev.of_node; ssc->clk_from_rk_pin = of_property_read_bool(np, "atmel,clk-from-rk-pin"); + ssc->lrclk_from_tf_pin = + of_property_read_bool(np, "atmel,lrclk-from-tf-pin"); + ssc->lrclk_from_rf_pin = + of_property_read_bool(np, "atmel,lrclk-from-rf-pin"); + + if (ssc->lrclk_from_tf_pin && ssc->lrclk_from_rf_pin) { + dev_err(&pdev->dev, "both LRCLK from RK/TK options found in DT node"); + return -EINVAL; + } } regs = platform_get_resource(pdev, IORESOURCE_MEM, 0); diff --git a/include/linux/atmel-ssc.h b/include/linux/atmel-ssc.h index 6091d2abc1eb..fbe1c2ffaa81 100644 --- a/include/linux/atmel-ssc.h +++ b/include/linux/atmel-ssc.h @@ -21,6 +21,8 @@ struct ssc_device { int user; int irq; bool clk_from_rk_pin; + bool lrclk_from_tf_pin; + bool lrclk_from_rf_pin; bool sound_dai; };