lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <5f1fd1b8f646c5ced1d838c381b6973e5abccd53.1566677788.git.mirq-linux@rere.qmqm.pl>
Date:   Sat, 24 Aug 2019 22:26:56 +0200
From:   Michał Mirosław <mirq-linux@...e.qmqm.pl>
To:     alsa-devel@...a-project.org, devicetree@...r.kernel.org
Cc:     Alexandre Belloni <alexandre.belloni@...tlin.com>,
        Arnd Bergmann <arnd@...db.de>,
        Chas Williams <3chas3@...il.com>,
        Codrin Ciubotariu <codrin.ciubotariu@...rochip.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Jaroslav Kysela <perex@...ex.cz>,
        Liam Girdwood <lgirdwood@...il.com>,
        Ludovic Desroches <ludovic.desroches@...rochip.com>,
        Mark Brown <broonie@...nel.org>,
        Mark Rutland <mark.rutland@....com>,
        Nicolas Ferre <nicolas.ferre@...rochip.com>,
        Rob Herring <robh-dt@...nel.org>,
        Takashi Iwai <tiwai@...e.com>, linux-kernel@...r.kernel.org
Subject: [PATCH v2 5/6] misc: atmel-ssc: get LRCLK pin selection from DT

Store LRCLK pin selection for use by ASoC DAI driver.

Signed-off-by: Michał Mirosław <mirq-linux@...e.qmqm.pl>

---
  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;
 };
 
-- 
2.20.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ