summaryrefslogtreecommitdiff
path: root/sound/soc
diff options
context:
space:
mode:
authorMylène Josserand <mylene.josserand@bootlin.com>2019-03-18 11:39:38 +0100
committerMark Brown <broonie@kernel.org>2019-03-18 11:18:47 +0000
commit2944d29d7c89573f9aa47083d105ff0243d5a125 (patch)
treea1b9b19278b042cd4d6174cfc8379853fbfe469f /sound/soc
parentc4bce31c4982ddb866b6b6d0f7ca1cf039a3aded (diff)
ASoC: simple-amplifier: Make gpio property optional
Some amplifier may not have a GPIO to control the power, but instead simply rely on the regulator to power up and down the amplifier. In order to support those setups, let's make the GPIO optional. Signed-off-by: Mylène Josserand <mylene.josserand@bootlin.com> Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/codecs/simple-amplifier.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/soc/codecs/simple-amplifier.c b/sound/soc/codecs/simple-amplifier.c
index c07e8a80b4b7..351aa55c384e 100644
--- a/sound/soc/codecs/simple-amplifier.c
+++ b/sound/soc/codecs/simple-amplifier.c
@@ -89,7 +89,8 @@ static int simple_amp_probe(struct platform_device *pdev)
return -ENOMEM;
platform_set_drvdata(pdev, priv);
- priv->gpiod_enable = devm_gpiod_get(dev, "enable", GPIOD_OUT_LOW);
+ priv->gpiod_enable = devm_gpiod_get_optional(dev, "enable",
+ GPIOD_OUT_LOW);
if (IS_ERR(priv->gpiod_enable)) {
err = PTR_ERR(priv->gpiod_enable);
if (err != -EPROBE_DEFER)