From: "Michał Mirosław" <mirq-linux@rere.qmqm.pl>
To: alsa-devel@alsa-project.org, devicetree@vger.kernel.org
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>,
Arnd Bergmann <arnd@arndb.de>, Chas Williams <3chas3@gmail.com>,
Codrin Ciubotariu <codrin.ciubotariu@microchip.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jaroslav Kysela <perex@perex.cz>,
Liam Girdwood <lgirdwood@gmail.com>,
Ludovic Desroches <ludovic.desroches@microchip.com>,
Mark Brown <broonie@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Nicolas Ferre <nicolas.ferre@microchip.com>,
Rob Herring <robh-dt@kernel.org>, Takashi Iwai <tiwai@suse.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH v2 5/6] misc: atmel-ssc: get LRCLK pin selection from DT
Date: Sat, 24 Aug 2019 22:26:56 +0200 [thread overview]
Message-ID: <5f1fd1b8f646c5ced1d838c381b6973e5abccd53.1566677788.git.mirq-linux@rere.qmqm.pl> (raw)
In-Reply-To: <cover.1566677788.git.mirq-linux@rere.qmqm.pl>
Store LRCLK pin selection for use by ASoC DAI driver.
Signed-off-by: Michał Mirosław <mirq-linux@rere.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
next prev parent reply other threads:[~2019-08-24 20:27 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-24 20:26 [PATCH v2 0/6] ] ASoC: atmel: extend SSC support Michał Mirosław
2019-08-24 20:26 ` [PATCH v2 1/6] ASoC: atmel: enable SOC_SSC_PDC and SOC_SSC_DMA in Kconfig Michał Mirosław
2019-08-26 13:45 ` Codrin.Ciubotariu
2019-08-26 14:23 ` Alexandre Belloni
2019-08-24 20:26 ` [PATCH v2 2/6] ASoC: atmel_ssc_dai: rework DAI format configuration Michał Mirosław
2019-08-26 14:04 ` Codrin.Ciubotariu
2019-08-24 20:26 ` [PATCH v2 3/6] ASoC: atmel_ssc_dai: implement left-justified data mode Michał Mirosław
2019-08-26 14:10 ` Codrin.Ciubotariu
2019-08-24 20:26 ` [PATCH v2 4/6] dt-bindings: misc: atmel-ssc: LRCLK from TF/RF pin option Michał Mirosław
2019-08-27 22:37 ` Rob Herring
2019-08-28 13:02 ` Michał Mirosław
2019-08-28 18:34 ` Rob Herring
2019-08-24 20:26 ` Michał Mirosław [this message]
2019-08-26 14:38 ` [PATCH v2 5/6] misc: atmel-ssc: get LRCLK pin selection from DT Codrin.Ciubotariu
2019-08-24 20:26 ` [PATCH v2 6/6] ASoC: atmel_ssc_dai: Enable shared FSYNC source in frame-slave mode Michał Mirosław
2019-08-26 15:05 ` Codrin.Ciubotariu
2019-09-08 13:39 ` mirq-linux
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5f1fd1b8f646c5ced1d838c381b6973e5abccd53.1566677788.git.mirq-linux@rere.qmqm.pl \
--to=mirq-linux@rere.qmqm.pl \
--cc=3chas3@gmail.com \
--cc=alexandre.belloni@bootlin.com \
--cc=alsa-devel@alsa-project.org \
--cc=arnd@arndb.de \
--cc=broonie@kernel.org \
--cc=codrin.ciubotariu@microchip.com \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ludovic.desroches@microchip.com \
--cc=mark.rutland@arm.com \
--cc=nicolas.ferre@microchip.com \
--cc=perex@perex.cz \
--cc=robh-dt@kernel.org \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).