All of lore.kernel.org
 help / color / mirror / Atom feed
From: linux@treblig.org
To: lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com
Cc: linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Dr. David Alan Gilbert" <linux@treblig.org>
Subject: [PATCH] ASoC: max98095: Remove unused max98095_jack_detect
Date: Wed,  5 Feb 2025 01:44:58 +0000	[thread overview]
Message-ID: <20250205014458.486207-1-linux@treblig.org> (raw)

From: "Dr. David Alan Gilbert" <linux@treblig.org>

max98095_jack_detect() was added in 2012 as part of
commit 9dd90c5db040 ("ASoC: max98095: add jack detection")
but hasn't been used.

Remove it.

Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
---
 sound/soc/codecs/max98095.c | 29 -----------------------------
 sound/soc/codecs/max98095.h |  3 ---
 2 files changed, 32 deletions(-)

diff --git a/sound/soc/codecs/max98095.c b/sound/soc/codecs/max98095.c
index cfb63fe69267..1d3464308ec4 100644
--- a/sound/soc/codecs/max98095.c
+++ b/sound/soc/codecs/max98095.c
@@ -1884,35 +1884,6 @@ static int max98095_jack_detect_disable(struct snd_soc_component *component)
 	return ret;
 }
 
-int max98095_jack_detect(struct snd_soc_component *component,
-	struct snd_soc_jack *hp_jack, struct snd_soc_jack *mic_jack)
-{
-	struct max98095_priv *max98095 = snd_soc_component_get_drvdata(component);
-	struct i2c_client *client = to_i2c_client(component->dev);
-	int ret = 0;
-
-	max98095->headphone_jack = hp_jack;
-	max98095->mic_jack = mic_jack;
-
-	/* only progress if we have at least 1 jack pointer */
-	if (!hp_jack && !mic_jack)
-		return -EINVAL;
-
-	max98095_jack_detect_enable(component);
-
-	/* enable interrupts for headphone jack detection */
-	ret = snd_soc_component_update_bits(component, M98095_013_JACK_INT_EN,
-		M98095_IDDONE, M98095_IDDONE);
-	if (ret < 0) {
-		dev_err(component->dev, "Failed to cfg jack irqs %d\n", ret);
-		return ret;
-	}
-
-	max98095_report_jack(client->irq, component);
-	return 0;
-}
-EXPORT_SYMBOL_GPL(max98095_jack_detect);
-
 #ifdef CONFIG_PM
 static int max98095_suspend(struct snd_soc_component *component)
 {
diff --git a/sound/soc/codecs/max98095.h b/sound/soc/codecs/max98095.h
index 2af7e77021a2..782e351debe9 100644
--- a/sound/soc/codecs/max98095.h
+++ b/sound/soc/codecs/max98095.h
@@ -312,7 +312,4 @@
 /* Default Delay used in Slew Rate Calculation for Jack detection */
 #define M98095_DEFAULT_SLEW_DELAY		0x18
 
-extern int max98095_jack_detect(struct snd_soc_component *component,
-	struct snd_soc_jack *hp_jack, struct snd_soc_jack *mic_jack);
-
 #endif
-- 
2.48.1


             reply	other threads:[~2025-02-05  1:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-05  1:44 linux [this message]
2025-02-05 12:21 ` [PATCH] ASoC: max98095: Remove unused max98095_jack_detect Mark Brown
2025-02-05 12:38   ` Dr. David Alan Gilbert
2025-02-05 23:58     ` Dr. David Alan Gilbert
2025-02-06  0:15       ` Mark Brown
2025-02-06  0:18         ` Dr. David Alan Gilbert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250205014458.486207-1-linux@treblig.org \
    --to=linux@treblig.org \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.