* Stephen Warren wrote:
> From: John Bonesio <[email protected]>
> 
> This driver is parameterized in two ways:
> 
> a) Platform data, which supplies a set of GPIOs used by the driver.
>    These GPIOs can now be parsed out of device tree.
> 
> b) Machine-specific DAPM route arrays embedded into the ASoC machine
>    driver itself. The driver picks the appropriate array to use using
>    machine_is_*(). This array can now be parsed straight out of device
>    tree, allowing the machine driver to be completely machine agnostic.
> 
> swarren applied the following modifications:
> * Moved all pdata and DT parsing into one place.
> * Added DAPM route parsing from DT.
> * Added tegra_pcm device registration.
> * Documented DT binding.
> 
> Signed-off-by: John Bonesio <[email protected]>
> Signed-off-by: Grant Likely <[email protected]>
> Signed-off-by: Stephen Warren <[email protected]>
> ---
>  .../bindings/sound/tegra-audio-wm8903.txt          |   63 +++++++++
>  sound/soc/tegra/tegra_wm8903.c                     |  133 
> ++++++++++++++++----
>  2 files changed, 171 insertions(+), 25 deletions(-)
>  create mode 100644 
> Documentation/devicetree/bindings/sound/tegra-audio-wm8903.txt
[...]
> diff --git a/sound/soc/tegra/tegra_wm8903.c b/sound/soc/tegra/tegra_wm8903.c
[...]
> @@ -262,6 +266,83 @@ static int tegra_wm8903_init(struct snd_soc_pcm_runtime 
> *rtd)
>               return ret;
>       }
>  
> +     pdata = &machine->pdata;
> +     np = card->dev->of_node;
> +
> +     if (card->dev->platform_data) {
> +             *pdata = *(struct tegra_wm8903_platform_data *)
> +                                             card->dev->platform_data;
[...]

Minor nit: perhaps this should use memcpy() instead?

Thierry

Attachment: pgpG3LXN0PT5o.pgp
Description: PGP signature

Reply via email to