summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm8998.c
diff options
context:
space:
mode:
authorCharles Keepax <ckeepax@opensource.cirrus.com>2017-09-04 17:41:49 +0200
committerMark Brown <broonie@kernel.org>2017-09-19 16:57:59 +0200
commit0a229b15d99e0a9761f9672f4ff7efeb18ce0ea1 (patch)
tree081b95808e20da9f428f107382c15cc1681c64cc /sound/soc/codecs/wm8998.c
parentASoC: arizona: Add new common Arizona init function (diff)
downloadlinux-0a229b15d99e0a9761f9672f4ff7efeb18ce0ea1.tar.xz
linux-0a229b15d99e0a9761f9672f4ff7efeb18ce0ea1.zip
ASoC: arizona: Add handling for audio related device tree entries
Currently all the audio related device tree entries are handled by the MFD code, for most parts of the Arizona driver we group the device tree handling with the component that uses it and should do so here as well. Add handling in the ASoC code for the audio device tree entries, a later patch removes the MFD side handling but there is no harm in it being duplicated temporarily. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/wm8998.c')
-rw-r--r--sound/soc/codecs/wm8998.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sound/soc/codecs/wm8998.c b/sound/soc/codecs/wm8998.c
index 27a8e1e75f28..c59caaa75ba0 100644
--- a/sound/soc/codecs/wm8998.c
+++ b/sound/soc/codecs/wm8998.c
@@ -1398,6 +1398,14 @@ static int wm8998_probe(struct platform_device *pdev)
return -ENOMEM;
platform_set_drvdata(pdev, wm8998);
+ if (IS_ENABLED(CONFIG_OF)) {
+ if (!dev_get_platdata(arizona->dev)) {
+ ret = arizona_of_get_audio_pdata(arizona);
+ if (ret < 0)
+ return ret;
+ }
+ }
+
wm8998->core.arizona = arizona;
wm8998->core.num_inputs = 3; /* IN1L, IN1R, IN2 */