summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorBo Shen <voice.shen@atmel.com>2014-02-10 10:09:45 +0400
committerMark Brown <broonie@linaro.org>2014-02-12 21:21:22 +0400
commit048d4ff81f1cf26b3f3627a9a69d35aff7898bb3 (patch)
tree694e6f6a08952f43c704693523984a3d8414d3eb /drivers
parent38dbfb59d1175ef458d006556061adeaa8751b72 (diff)
downloadlinux-048d4ff81f1cf26b3f3627a9a69d35aff7898bb3.tar.xz
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')
-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))