[alsa-devel] [PATCH 3/3] ASoC: rt5645: add device tree support

Bard Liao bardliao at realtek.com
Wed May 6 08:42:54 CEST 2015


> -----Original Message-----
> From: Liam Girdwood [mailto:liam.r.girdwood at linux.intel.com]
> Sent: Tuesday, May 05, 2015 10:46 PM
> To: Bard Liao
> Cc: broonie at kernel.org; lgirdwood at gmail.com; Oder Chiou;
> alsa-devel at alsa-project.org; lars at metafoo.de;
> zhengxing at rock-chips.com; yang.a.fang at intel.com;
> koro.chen at mediatek.com; John Lin; Flove
> Subject: Re: [alsa-devel] [PATCH 3/3] ASoC: rt5645: add device tree
> support
> 
> On Tue, 2015-05-05 at 21:42 +0800, Bard Liao wrote:
> > Modify the RT5645 driver to parse platform data from device tree.
> > Write a DT binding document to describe those properties.
> >
> > Signed-off-by: Bard Liao <bardliao at realtek.com>
> > ---
> >  Documentation/devicetree/bindings/sound/rt5645.txt | 72
> ++++++++++++++++++++++
> >  sound/soc/codecs/rt5645.c                          | 35
> +++++++++++
> >  2 files changed, 107 insertions(+)
> >  create mode 100644
> Documentation/devicetree/bindings/sound/rt5645.txt
> >
> 
> > diff --git a/sound/soc/codecs/rt5645.c b/sound/soc/codecs/rt5645.c
> > index e435680..36e22b6 100644
> > --- a/sound/soc/codecs/rt5645.c
> > +++ b/sound/soc/codecs/rt5645.c
> > @@ -3134,6 +3134,37 @@ static struct dmi_system_id
> dmi_platform_intel_braswell[] = {
> >  	{ }
> >  };
> >
> > +static int rt5645_parse_dt(struct rt5645_priv *rt5645, struct
> > +device_node *np) {
> > +	rt5645->pdata.in2_diff = of_property_read_bool(np,
> > +		"realtek,in2-differential");
> > +	of_property_read_u32(np,
> > +		"realtek,dmic1-data-pin", &rt5645->pdata.dmic1_data_pin);
> 
> We should really be using device_property_() instead of of_property_()
> APIs since we will have to support both DT and ACPI properties.

We will modify it and send a new version patch for it.

Thanks.

> 
> Liam
> 
> 
> ------Please consider the environment before printing this e-mail.


More information about the Alsa-devel mailing list