mirror of
https://abf.rosa.ru/djam/kernel-5.15.git
synced 2025-02-23 18:42:55 +00:00
42 lines
1.6 KiB
Diff
42 lines
1.6 KiB
Diff
From d24c723ffe777c57037fd67a1c56956851b34ae0 Mon Sep 17 00:00:00 2001
|
|
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
|
|
Date: Tue, 8 Mar 2022 13:26:01 -0600
|
|
Subject: [PATCH 404/424] ASoC: Intel: sof_es8336: make gpio optional
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
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: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
|
|
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
|
|
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
|
|
Link: https://lore.kernel.org/r/20220308192610.392950-12-pierre-louis.bossart@linux.intel.com
|
|
Signed-off-by: Mark Brown <broonie@kernel.org>
|
|
---
|
|
sound/soc/intel/boards/sof_es8336.c | 7 +++----
|
|
1 file changed, 3 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/sound/soc/intel/boards/sof_es8336.c b/sound/soc/intel/boards/sof_es8336.c
|
|
index e6d599f0c..eb792bd91 100644
|
|
--- a/sound/soc/intel/boards/sof_es8336.c
|
|
+++ b/sound/soc/intel/boards/sof_es8336.c
|
|
@@ -523,11 +523,10 @@ static int sof_es8336_probe(struct platform_device *pdev)
|
|
if (ret)
|
|
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)) {
|
|
- ret = PTR_ERR(priv->gpio_pa);
|
|
- dev_err(codec_dev, "%s, could not get pa-enable: %d\n",
|
|
- __func__, ret);
|
|
+ ret = dev_err_probe(dev, PTR_ERR(priv->gpio_pa),
|
|
+ "could not get pa-enable GPIO\n");
|
|
goto err;
|
|
}
|
|
|
|
--
|
|
2.35.2
|
|
|