* [PATCH] ASoC: max98095: Remove unused max98095_jack_detect
@ 2025-02-05 1:44 linux
2025-02-05 12:21 ` Mark Brown
0 siblings, 1 reply; 6+ messages in thread
From: linux @ 2025-02-05 1:44 UTC (permalink / raw)
To: lgirdwood, broonie, perex, tiwai
Cc: linux-sound, linux-kernel, Dr. David Alan Gilbert
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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] ASoC: max98095: Remove unused max98095_jack_detect
2025-02-05 1:44 [PATCH] ASoC: max98095: Remove unused max98095_jack_detect linux
@ 2025-02-05 12:21 ` Mark Brown
2025-02-05 12:38 ` Dr. David Alan Gilbert
0 siblings, 1 reply; 6+ messages in thread
From: Mark Brown @ 2025-02-05 12:21 UTC (permalink / raw)
To: linux; +Cc: lgirdwood, perex, tiwai, linux-sound, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 477 bytes --]
On Wed, Feb 05, 2025 at 01:44:58AM +0000, linux@treblig.org wrote:
> 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.
> - max98095_report_jack(client->irq, component);
> - return 0;
> -}
> -EXPORT_SYMBOL_GPL(max98095_jack_detect);
No, this is exported for machine drivers which might not be in tree.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] ASoC: max98095: Remove unused max98095_jack_detect
2025-02-05 12:21 ` Mark Brown
@ 2025-02-05 12:38 ` Dr. David Alan Gilbert
2025-02-05 23:58 ` Dr. David Alan Gilbert
0 siblings, 1 reply; 6+ messages in thread
From: Dr. David Alan Gilbert @ 2025-02-05 12:38 UTC (permalink / raw)
To: Mark Brown; +Cc: lgirdwood, perex, tiwai, linux-sound, linux-kernel
* Mark Brown (broonie@kernel.org) wrote:
> On Wed, Feb 05, 2025 at 01:44:58AM +0000, linux@treblig.org wrote:
> > 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.
>
> > - max98095_report_jack(client->irq, component);
> > - return 0;
> > -}
> > -EXPORT_SYMBOL_GPL(max98095_jack_detect);
>
> No, this is exported for machine drivers which might not be in tree.
Ah OK; of course it would be nice if they were in the tree.
Thanks,
Dave
--
-----Open up your eyes, open up your mind, open up your code -------
/ Dr. David Alan Gilbert | Running GNU/Linux | Happy \
\ dave @ treblig.org | | In Hex /
\ _________________________|_____ http://www.treblig.org |_______/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] ASoC: max98095: Remove unused max98095_jack_detect
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
0 siblings, 1 reply; 6+ messages in thread
From: Dr. David Alan Gilbert @ 2025-02-05 23:58 UTC (permalink / raw)
To: Mark Brown; +Cc: lgirdwood, perex, tiwai, linux-sound, linux-kernel
* Dr. David Alan Gilbert (linux@treblig.org) wrote:
> * Mark Brown (broonie@kernel.org) wrote:
> > On Wed, Feb 05, 2025 at 01:44:58AM +0000, linux@treblig.org wrote:
> > > 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.
> >
> > > - max98095_report_jack(client->irq, component);
> > > - return 0;
> > > -}
> > > -EXPORT_SYMBOL_GPL(max98095_jack_detect);
> >
> > No, this is exported for machine drivers which might not be in tree.
>
> Ah OK; of course it would be nice if they were in the tree.
Mark:
Is that also true of mt6359_accdet_enable_jack_detect ?
I can't find any callers in tree.
Dave
> Thanks,
>
> Dave
> --
> -----Open up your eyes, open up your mind, open up your code -------
> / Dr. David Alan Gilbert | Running GNU/Linux | Happy \
> \ dave @ treblig.org | | In Hex /
> \ _________________________|_____ http://www.treblig.org |_______/
--
-----Open up your eyes, open up your mind, open up your code -------
/ Dr. David Alan Gilbert | Running GNU/Linux | Happy \
\ dave @ treblig.org | | In Hex /
\ _________________________|_____ http://www.treblig.org |_______/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] ASoC: max98095: Remove unused max98095_jack_detect
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
0 siblings, 1 reply; 6+ messages in thread
From: Mark Brown @ 2025-02-06 0:15 UTC (permalink / raw)
To: Dr. David Alan Gilbert; +Cc: lgirdwood, perex, tiwai, linux-sound, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 436 bytes --]
On Wed, Feb 05, 2025 at 11:58:01PM +0000, Dr. David Alan Gilbert wrote:
> * Dr. David Alan Gilbert (linux@treblig.org) wrote:
> > > No, this is exported for machine drivers which might not be in tree.
> > Ah OK; of course it would be nice if they were in the tree.
> Is that also true of mt6359_accdet_enable_jack_detect ?
> I can't find any callers in tree.
Yes, and any other jack detection control following the same pattern.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] ASoC: max98095: Remove unused max98095_jack_detect
2025-02-06 0:15 ` Mark Brown
@ 2025-02-06 0:18 ` Dr. David Alan Gilbert
0 siblings, 0 replies; 6+ messages in thread
From: Dr. David Alan Gilbert @ 2025-02-06 0:18 UTC (permalink / raw)
To: Mark Brown; +Cc: lgirdwood, perex, tiwai, linux-sound, linux-kernel
* Mark Brown (broonie@kernel.org) wrote:
> On Wed, Feb 05, 2025 at 11:58:01PM +0000, Dr. David Alan Gilbert wrote:
> > * Dr. David Alan Gilbert (linux@treblig.org) wrote:
>
> > > > No, this is exported for machine drivers which might not be in tree.
>
> > > Ah OK; of course it would be nice if they were in the tree.
>
>
> > Is that also true of mt6359_accdet_enable_jack_detect ?
> > I can't find any callers in tree.
>
> Yes, and any other jack detection control following the same pattern.
OK thanks.
Dave
--
-----Open up your eyes, open up your mind, open up your code -------
/ Dr. David Alan Gilbert | Running GNU/Linux | Happy \
\ dave @ treblig.org | | In Hex /
\ _________________________|_____ http://www.treblig.org |_______/
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2025-02-06 0:18 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-05 1:44 [PATCH] ASoC: max98095: Remove unused max98095_jack_detect linux
2025-02-05 12:21 ` 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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox