linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 1/1] ASoC: soc-jack: Get rid of legacy GPIO support
@ 2024-03-25 14:33 Andy Shevchenko
  2024-03-25 17:08 ` Andy Shevchenko
  2024-03-26 19:40 ` Mark Brown
  0 siblings, 2 replies; 6+ messages in thread
From: Andy Shevchenko @ 2024-03-25 14:33 UTC (permalink / raw)
  To: Andy Shevchenko, Mark Brown, Kuninori Morimoto, linux-sound,
	linux-kernel
  Cc: Liam Girdwood, Jaroslav Kysela, Takashi Iwai

No more users.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
v2: updated dependent driver as well (Mark)
 include/sound/soc-jack.h              |  2 --
 sound/soc/generic/simple-card-utils.c |  2 --
 sound/soc/soc-jack.c                  | 23 ++++-------------------
 3 files changed, 4 insertions(+), 23 deletions(-)

diff --git a/include/sound/soc-jack.h b/include/sound/soc-jack.h
index a0abb1ee5110..3a81d4b8ca8a 100644
--- a/include/sound/soc-jack.h
+++ b/include/sound/soc-jack.h
@@ -44,7 +44,6 @@ struct snd_soc_jack_zone {
 /**
  * struct snd_soc_jack_gpio - Describes a gpio pin for jack detection
  *
- * @gpio:         legacy gpio number
  * @idx:          gpio descriptor index within the function of the GPIO
  *                consumer device
  * @gpiod_dev:    GPIO consumer device
@@ -59,7 +58,6 @@ struct snd_soc_jack_zone {
  *		       ADC).
  */
 struct snd_soc_jack_gpio {
-	unsigned int gpio;
 	unsigned int idx;
 	struct device *gpiod_dev;
 	const char *name;
diff --git a/sound/soc/generic/simple-card-utils.c b/sound/soc/generic/simple-card-utils.c
index 81077d16d22f..b4876b4f259d 100644
--- a/sound/soc/generic/simple-card-utils.c
+++ b/sound/soc/generic/simple-card-utils.c
@@ -752,8 +752,6 @@ int simple_util_init_jack(struct snd_soc_card *card,
 	if (!prefix)
 		prefix = "";
 
-	sjack->gpio.gpio = -ENOENT;
-
 	if (is_hp) {
 		snprintf(prop, sizeof(prop), "%shp-det", prefix);
 		pin_name	= pin ? pin : "Headphones";
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 @@ int snd_soc_jack_add_gpios(struct snd_soc_jack *jack, int count,
 					      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 @@ int snd_soc_jack_add_gpios(struct snd_soc_jack *jack, int count,
 	devres_add(jack->card->dev, tbl);
 	return 0;
 
-err:
-	gpio_free(gpios[i].gpio);
 undo:
 	jack_free_gpios(jack, i, gpios);
 	devres_free(tbl);
-- 
2.43.0.rc1.1.gbec44491f096


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH v2 1/1] ASoC: soc-jack: Get rid of legacy GPIO support
  2024-03-25 14:33 [PATCH v2 1/1] ASoC: soc-jack: Get rid of legacy GPIO support Andy Shevchenko
@ 2024-03-25 17:08 ` Andy Shevchenko
  2024-03-26 17:00   ` Andy Shevchenko
  2024-03-26 19:40 ` Mark Brown
  1 sibling, 1 reply; 6+ messages in thread
From: Andy Shevchenko @ 2024-03-25 17:08 UTC (permalink / raw)
  To: Mark Brown, Kuninori Morimoto, linux-sound, linux-kernel
  Cc: Liam Girdwood, Jaroslav Kysela, Takashi Iwai

On Mon, Mar 25, 2024 at 04:33:50PM +0200, Andy Shevchenko wrote:
> No more users.

FSL code needs to be cleaned up (there is a leftover that makes this fail).
:-(

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2 1/1] ASoC: soc-jack: Get rid of legacy GPIO support
  2024-03-25 17:08 ` Andy Shevchenko
@ 2024-03-26 17:00   ` Andy Shevchenko
  2024-03-26 17:02     ` Mark Brown
  0 siblings, 1 reply; 6+ messages in thread
From: Andy Shevchenko @ 2024-03-26 17:00 UTC (permalink / raw)
  To: Mark Brown, Kuninori Morimoto, linux-sound, linux-kernel
  Cc: Liam Girdwood, Jaroslav Kysela, Takashi Iwai

On Mon, Mar 25, 2024 at 07:08:10PM +0200, Andy Shevchenko wrote:
> On Mon, Mar 25, 2024 at 04:33:50PM +0200, Andy Shevchenko wrote:
> > No more users.
> 
> FSL code needs to be cleaned up (there is a leftover that makes this fail).
> :-(

Okay, since the fix-patch had been applied, this one now is clean to go.
Do I need to resend or any other work needs to be done?

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2 1/1] ASoC: soc-jack: Get rid of legacy GPIO support
  2024-03-26 17:00   ` Andy Shevchenko
@ 2024-03-26 17:02     ` Mark Brown
  2024-03-26 17:07       ` Andy Shevchenko
  0 siblings, 1 reply; 6+ messages in thread
From: Mark Brown @ 2024-03-26 17:02 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Kuninori Morimoto, linux-sound, linux-kernel, Liam Girdwood,
	Jaroslav Kysela, Takashi Iwai

[-- Attachment #1: Type: text/plain, Size: 324 bytes --]

On Tue, Mar 26, 2024 at 07:00:39PM +0200, Andy Shevchenko wrote:

> Okay, since the fix-patch had been applied, this one now is clean to go.
> Do I need to resend or any other work needs to be done?

Please resend.  If I've told you a patch failed to build it's gone from
my queue, I don't keep track of anything like that.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2 1/1] ASoC: soc-jack: Get rid of legacy GPIO support
  2024-03-26 17:02     ` Mark Brown
@ 2024-03-26 17:07       ` Andy Shevchenko
  0 siblings, 0 replies; 6+ messages in thread
From: Andy Shevchenko @ 2024-03-26 17:07 UTC (permalink / raw)
  To: Mark Brown
  Cc: Kuninori Morimoto, linux-sound, linux-kernel, Liam Girdwood,
	Jaroslav Kysela, Takashi Iwai

On Tue, Mar 26, 2024 at 05:02:39PM +0000, Mark Brown wrote:
> On Tue, Mar 26, 2024 at 07:00:39PM +0200, Andy Shevchenko wrote:
> 
> > Okay, since the fix-patch had been applied, this one now is clean to go.
> > Do I need to resend or any other work needs to be done?
> 
> Please resend.  If I've told you a patch failed to build it's gone from
> my queue, I don't keep track of anything like that.

Noted, will resend soon.

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2 1/1] ASoC: soc-jack: Get rid of legacy GPIO support
  2024-03-25 14:33 [PATCH v2 1/1] ASoC: soc-jack: Get rid of legacy GPIO support Andy Shevchenko
  2024-03-25 17:08 ` Andy Shevchenko
@ 2024-03-26 19:40 ` Mark Brown
  1 sibling, 0 replies; 6+ messages in thread
From: Mark Brown @ 2024-03-26 19:40 UTC (permalink / raw)
  To: Kuninori Morimoto, linux-sound, linux-kernel, Andy Shevchenko
  Cc: Liam Girdwood, Jaroslav Kysela, Takashi Iwai

On Mon, 25 Mar 2024 16:33:50 +0200, Andy Shevchenko wrote:
> No more users.
> 
> 

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: soc-jack: Get rid of legacy GPIO support
      commit: 7b95ee0db7e0a7f99077f1b926323c7bf0d2e8f8

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-03-26 19:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-25 14:33 [PATCH v2 1/1] ASoC: soc-jack: Get rid of legacy GPIO support Andy Shevchenko
2024-03-25 17:08 ` Andy Shevchenko
2024-03-26 17:00   ` Andy Shevchenko
2024-03-26 17:02     ` Mark Brown
2024-03-26 17:07       ` Andy Shevchenko
2024-03-26 19:40 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).