summaryrefslogtreecommitdiffstats
path: root/drivers/misc/atmel-ssc.c
diff options
context:
space:
mode:
authorBo Shen <voice.shen@atmel.com>2014-02-10 07:09:45 +0100
committerMark Brown <broonie@linaro.org>2014-02-12 18:21:22 +0100
commit048d4ff81f1cf26b3f3627a9a69d35aff7898bb3 (patch)
tree694e6f6a08952f43c704693523984a3d8414d3eb /drivers/misc/atmel-ssc.c
parentLinus 3.14-rc1 (diff)
downloadlinux-048d4ff81f1cf26b3f3627a9a69d35aff7898bb3.tar.xz
linux-048d4ff81f1cf26b3f3627a9a69d35aff7898bb3.zip
ASoC: atmel_ssc_dai: make option to choose clock
When SSC works in slave mode, according to the hardware design, the clock can get from TK pin, also can get from RK pin. So, add one parameter to choose where the clock from. Signed-off-by: Bo Shen <voice.shen@atmel.com> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/misc/atmel-ssc.c')
-rw-r--r--drivers/misc/atmel-ssc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/misc/atmel-ssc.c b/drivers/misc/atmel-ssc.c
index 5be808406edc..22de13727641 100644
--- a/drivers/misc/atmel-ssc.c
+++ b/drivers/misc/atmel-ssc.c
@@ -150,6 +150,12 @@ static int ssc_probe(struct platform_device *pdev)
return -ENODEV;
ssc->pdata = (struct atmel_ssc_platform_data *)plat_dat;
+ if (pdev->dev.of_node) {
+ struct device_node *np = pdev->dev.of_node;
+ ssc->clk_from_rk_pin =
+ of_property_read_bool(np, "atmel,clk-from-rk-pin");
+ }
+
regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
ssc->regs = devm_ioremap_resource(&pdev->dev, regs);
if (IS_ERR(ssc->regs))