Commit a962a809 authored by Tzung-Bi Shih's avatar Tzung-Bi Shih Committed by Mark Brown

ASoC: mediatek: mt8183: make headset codec optional

Make headset codec optional because some variant machines may not
have an audio jack.
Signed-off-by: default avatarTzung-Bi Shih <tzungbi@google.com>
Link: https://lore.kernel.org/r/20190716032417.19015-1-tzungbi@google.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent af62a3c8
...@@ -352,8 +352,6 @@ static struct snd_soc_card mt8183_mt6358_ts3a227_max98357_card = { ...@@ -352,8 +352,6 @@ static struct snd_soc_card mt8183_mt6358_ts3a227_max98357_card = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.dai_link = mt8183_mt6358_ts3a227_max98357_dai_links, .dai_link = mt8183_mt6358_ts3a227_max98357_dai_links,
.num_links = ARRAY_SIZE(mt8183_mt6358_ts3a227_max98357_dai_links), .num_links = ARRAY_SIZE(mt8183_mt6358_ts3a227_max98357_dai_links),
.aux_dev = &mt8183_mt6358_ts3a227_max98357_headset_dev,
.num_aux_devs = 1,
}; };
static int static int
...@@ -404,10 +402,9 @@ mt8183_mt6358_ts3a227_max98357_dev_probe(struct platform_device *pdev) ...@@ -404,10 +402,9 @@ mt8183_mt6358_ts3a227_max98357_dev_probe(struct platform_device *pdev)
mt8183_mt6358_ts3a227_max98357_headset_dev.codec_of_node = mt8183_mt6358_ts3a227_max98357_headset_dev.codec_of_node =
of_parse_phandle(pdev->dev.of_node, of_parse_phandle(pdev->dev.of_node,
"mediatek,headset-codec", 0); "mediatek,headset-codec", 0);
if (!mt8183_mt6358_ts3a227_max98357_headset_dev.codec_of_node) { if (mt8183_mt6358_ts3a227_max98357_headset_dev.codec_of_node) {
dev_err(&pdev->dev, card->aux_dev = &mt8183_mt6358_ts3a227_max98357_headset_dev;
"Property 'mediatek,headset-codec' missing/invalid\n"); card->num_aux_devs = 1;
return -EINVAL;
} }
default_pins = default_pins =
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment