diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2024-03-26 18:09:48 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2024-03-26 18:13:45 +0100 |
commit | 7b95ee0db7e0a7f99077f1b926323c7bf0d2e8f8 (patch) | |
tree | 2bfd3223471356d62d3adc5c5dd72bcf0ee49740 /sound/soc/soc-jack.c | |
parent | ASoC: codecs: Add RK3308 internal audio codec driver (diff) | |
download | linux-7b95ee0db7e0a7f99077f1b926323c7bf0d2e8f8.tar.xz linux-7b95ee0db7e0a7f99077f1b926323c7bf0d2e8f8.zip |
ASoC: soc-jack: Get rid of legacy GPIO support
No more users.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://msgid.link/r/20240326171134.1414462-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/soc-jack.c')
-rw-r--r-- | sound/soc/soc-jack.c | 23 |
1 files changed, 4 insertions, 19 deletions
diff --git a/sound/soc/soc-jack.c b/sound/soc/soc-jack.c index b2cc13b9c77b..63971396b708 100644 --- a/sound/soc/soc-jack.c +++ b/sound/soc/soc-jack.c @@ -8,7 +8,6 @@ #include <sound/jack.h> #include <sound/soc.h> -#include <linux/gpio.h> #include <linux/gpio/consumer.h> #include <linux/interrupt.h> #include <linux/workqueue.h> @@ -345,21 +344,9 @@ int snd_soc_jack_add_gpios(struct snd_soc_jack *jack, int count, goto undo; } } else { - /* legacy GPIO number */ - if (!gpio_is_valid(gpios[i].gpio)) { - dev_err(jack->card->dev, - "ASoC: Invalid gpio %d\n", - gpios[i].gpio); - ret = -EINVAL; - goto undo; - } - - ret = gpio_request_one(gpios[i].gpio, GPIOF_IN, - gpios[i].name); - if (ret) - goto undo; - - gpios[i].desc = gpio_to_desc(gpios[i].gpio); + dev_err(jack->card->dev, "ASoC: Invalid gpio at index %d\n", i); + ret = -EINVAL; + goto undo; } got_gpio: INIT_DELAYED_WORK(&gpios[i].work, gpio_work); @@ -373,7 +360,7 @@ got_gpio: gpios[i].name, &gpios[i]); if (ret < 0) - goto err; + goto undo; if (gpios[i].wake) { ret = irq_set_irq_wake(gpiod_to_irq(gpios[i].desc), 1); @@ -401,8 +388,6 @@ got_gpio: devres_add(jack->card->dev, tbl); return 0; -err: - gpio_free(gpios[i].gpio); undo: jack_free_gpios(jack, i, gpios); devres_free(tbl); |