Commit 5a6cfba5 authored by Pierre-Louis Bossart's avatar Pierre-Louis Bossart Committed by Mark Brown

ASoC: Intel: sof_es8336: make gpio optional

Do not fail if the GPIO used for speakers is not present, at least the
headphone, headset and internal mics should work.
Signed-off-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: default avatarBard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: default avatarPéter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20220308192610.392950-12-pierre-louis.bossart@linux.intel.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent b3d6a072
...@@ -523,11 +523,10 @@ static int sof_es8336_probe(struct platform_device *pdev) ...@@ -523,11 +523,10 @@ static int sof_es8336_probe(struct platform_device *pdev)
if (ret) if (ret)
dev_warn(codec_dev, "unable to add GPIO mapping table\n"); dev_warn(codec_dev, "unable to add GPIO mapping table\n");
priv->gpio_pa = gpiod_get(codec_dev, "pa-enable", GPIOD_OUT_LOW); priv->gpio_pa = gpiod_get_optional(codec_dev, "pa-enable", GPIOD_OUT_LOW);
if (IS_ERR(priv->gpio_pa)) { if (IS_ERR(priv->gpio_pa)) {
ret = PTR_ERR(priv->gpio_pa); ret = dev_err_probe(dev, PTR_ERR(priv->gpio_pa),
dev_err(codec_dev, "%s, could not get pa-enable: %d\n", "could not get pa-enable GPIO\n");
__func__, ret);
goto err; goto err;
} }
......
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