Store LRCLK pin selection for use by ASoC DAI driver. Signed-off-by: Michał Mirosław <mirq-linux@xxxxxxxxxxxx> --- 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