linux/sound/soc/tegra
Stephen Warren d4a2eca781 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>
2011-11-23 21:34:48 +00:00
..
Kconfig ASoC: Tegra: Implement SPDIF CPU DAI 2011-07-05 12:20:56 -07:00
Makefile ASoC: Tegra: Implement SPDIF CPU DAI 2011-07-05 12:20:56 -07:00
tegra_asoc_utils.c sound: Add module.h to the previously silent sound users 2011-10-31 19:31:21 -04:00
tegra_asoc_utils.h ASoC: Tegra: Don't return mclk_changed from utils_set_rate 2011-04-20 13:49:55 +01:00
tegra_das.c ASoC: Tegra DAS: Add device tree binding 2011-11-23 11:05:08 +00:00
tegra_das.h ASoC: tegra: Add tegra-das driver 2011-01-10 22:20:20 +00:00
tegra_i2s.c ASoC: Tegra I2S: Remove dependency on pdev->id 2011-11-23 21:34:48 +00:00
tegra_i2s.h ASoC: Tegra I2S: Remove dependency on pdev->id 2011-11-23 21:34:48 +00:00
tegra_pcm.c ASoC: Tegra PCM: Use module_platform_driver 2011-11-23 10:24:10 +00:00
tegra_pcm.h ASoC: tegra: Add tegra-pcm driver 2011-01-10 22:20:29 +00:00
tegra_spdif.c ASoC: Constify snd_soc_dai_ops structs 2011-11-23 10:40:46 +00:00
tegra_spdif.h ASoC: Tegra: Implement SPDIF CPU DAI 2011-07-05 12:20:56 -07:00
tegra_wm8903.c ASoC: Tegra+WM8903 machine: Use devm_ APIs and module_platform_driver 2011-11-23 11:09:13 +00:00
trimslice.c ASoC: Tegra TrimSlice machine: Use devm_ APIs and module_platform_driver 2011-11-23 11:10:52 +00:00