diff options
author | Preetham Chandru <pchandru@nvidia.com> | 2012-03-26 20:38:55 +0530 |
---|---|---|
committer | Rohan Somvanshi <rsomvanshi@nvidia.com> | 2012-03-30 08:08:39 -0700 |
commit | a55e86c26f4096aa7897455bf9e3146ab52f7036 (patch) | |
tree | ee3e7de77005207f2ce452fc5fe7b3857c54db9e | |
parent | 112483d7c23a7c0c679e0dc8225201bb059c6c7c (diff) |
ASoC: Tegra wm8903 machine: Remove regulator error message
Few boards which uses wm8903 has independent regulators
for spk and mic while others do not have it.
For the boards which do not have independent regulators
we should avoid getting their regulators otherwise we
would get the following error messages:
"tegra-snd-wm8903 tegra-snd-wm8903.0: No speaker regulator found"
"tegra-snd-wm8903 tegra-snd-wm8903.0: No digital mic regulator found"
Bug 956562
Signed-off-by: Preetham Chandru <pchandru@nvidia.com>
Change-Id: Ide1ce141b5d45d56e834dc82a7cf5a7adc6c3e80
Reviewed-on: http://git-master/r/91548
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
-rw-r--r-- | sound/soc/tegra/tegra_wm8903.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/sound/soc/tegra/tegra_wm8903.c b/sound/soc/tegra/tegra_wm8903.c index 24f69e40f7d2..5ccf73223d6d 100644 --- a/sound/soc/tegra/tegra_wm8903.c +++ b/sound/soc/tegra/tegra_wm8903.c @@ -803,16 +803,21 @@ static __devinit int tegra_wm8903_driver_probe(struct platform_device *pdev) if (ret) goto err_free_machine; - machine->spk_reg = regulator_get(&pdev->dev, "vdd_spk_amp"); - if (IS_ERR(machine->spk_reg)) { - dev_info(&pdev->dev, "No speaker regulator found\n"); - machine->spk_reg = 0; + if (machine_is_cardhu() || machine_is_ventana()) { + machine->spk_reg = regulator_get(&pdev->dev, "vdd_spk_amp"); + if (IS_ERR(machine->spk_reg)) { + dev_info(&pdev->dev, "No speaker regulator found\n"); + machine->spk_reg = 0; + } } - machine->dmic_reg = regulator_get(&pdev->dev, "vdd_dmic"); - if (IS_ERR(machine->dmic_reg)) { - dev_info(&pdev->dev, "No digital mic regulator found\n"); - machine->dmic_reg = 0; + if (machine_is_ventana()) { + machine->dmic_reg = regulator_get(&pdev->dev, "vdd_dmic"); + if (IS_ERR(machine->dmic_reg)) { + dev_info(&pdev->dev, "No digital mic" + " regulator found\n"); + machine->dmic_reg = 0; + } } if (machine_is_cardhu()) { |