summaryrefslogtreecommitdiff
path: root/sound/soc/tegra/tegra_i2s.h
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2011-11-23 13:33:25 -0700
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-11-23 21:34:48 +0000
commitd4a2eca781bfd7323bfd98dbc7fd63c7d613fef2 (patch)
tree1f12eb90f30566ad0068eb060efa4baf5078ed68 /sound/soc/tegra/tegra_i2s.h
parent16c88583dca05034f284ad5c52f007a47673cf35 (diff)
downloadlinux-d4a2eca781bfd7323bfd98dbc7fd63c7d613fef2.tar.gz
linux-d4a2eca781bfd7323bfd98dbc7fd63c7d613fef2.tar.xz
ASoC: Tegra I2S: Remove dependency on pdev->id
When devices are instantiated from device-tree, pdev->id is set to -1. Rework the driver so it doesn't depend on the ID. Tegra I2S instantiated from board files are configured with pdev name "tegra-i2s" and ID 0 or 1. The driver core then names the device "tegra-i2s.0" or "tegra-i2s.1". This is not changing. When a device is instantiated from device-tree, it will have pdev->name="" and pdev->id=-1. For this reason, the pdev->id value is not something we can rely on. This patch doesn't actually change any names though: When a device is instantiated from device-tree, the overall device name will be "${unit_address}.${node_name}". This causes issues such as clk_get() failures due to lack of a device-name match. To solve that, AUXDATA was invented, to force a specific device name, thus allowing dev_name() to return the same as the non-device-tree case. Tegra currently uses AUXDATA for the I2S controllers. Eventually, AUXDATA will go away, most likely replaced by phandle-based references within the device tree. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/tegra/tegra_i2s.h')
-rw-r--r--sound/soc/tegra/tegra_i2s.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/soc/tegra/tegra_i2s.h b/sound/soc/tegra/tegra_i2s.h
index 2b38a096f46c..15ce1e2e8bde 100644
--- a/sound/soc/tegra/tegra_i2s.h
+++ b/sound/soc/tegra/tegra_i2s.h
@@ -153,6 +153,7 @@
#define TEGRA_I2S_FIFO_SCR_FIFO1_ATN_LVL_TWELVE_SLOTS (TEGRA_I2S_FIFO_ATN_LVL_TWELVE_SLOTS << TEGRA_I2S_FIFO_SCR_FIFO1_ATN_LVL_SHIFT)
struct tegra_i2s {
+ struct snd_soc_dai_driver dai;
struct clk *clk_i2s;
int clk_refs;
struct tegra_pcm_dma_params capture_dma_data;