lkml.org 
[lkml]   [2019]   [Aug]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectRe: [PATCH v2 5/6] misc: atmel-ssc: get LRCLK pin selection from DT
Date
On 24.08.2019 23:26, Michał Mirosław wrote:
> Store LRCLK pin selection for use by ASoC DAI driver.
>
> Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>

Reviewed-by: Codrin Ciubotariu <codrin.ciubotariu@microchip.com>

Thanks and best regards,
Codrin

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

\
 
 \ /
  Last update: 2019-08-26 16:39    [W:0.153 / U:0.696 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site