public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] ASoC: codec: Remove ak4641/pxa2xx-ac97 and convert to GPIO descriptors
@ 2026-01-22 12:44 Peng Fan (OSS)
  2026-01-22 12:44 ` [PATCH 1/4] ASoC: codec: Remove ak4641 Peng Fan (OSS)
                   ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: Peng Fan (OSS) @ 2026-01-22 12:44 UTC (permalink / raw)
  To: Jaroslav Kysela, Takashi Iwai, Liam Girdwood, Mark Brown,
	Linus Walleij, Bartosz Golaszewski, Daniel Mack, Haojian Zhuang,
	Robert Jarzmik, Andy Shevchenko
  Cc: linux-kernel, linux-sound, linux-gpio, linux-arm-kernel, Peng Fan

The main goal is to convert drivers to use GPIO descriptors. While reading
the code, I think it is time to remove ak4641 and pxa2xx-ac97 driver,
more info could be found in commit log of each patch.
Then only need to convert sound/arm/pxa2xx-ac97-lib.c to use GPIO
descriptors. Not have hardware to test the pxa2xx ac97.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
Peng Fan (4):
      ASoC: codec: Remove ak4641
      ASoC: codec: Remove pxa2xx-ac97.c
      ASoC: pxa2xx-ac97: Remove platform_data
      ASoC: ac97: Convert to GPIO descriptors

 include/sound/ak4641.h      |  23 --
 sound/arm/Kconfig           |  10 -
 sound/arm/Makefile          |   3 -
 sound/arm/pxa2xx-ac97-lib.c |  50 +---
 sound/arm/pxa2xx-ac97.c     | 286 --------------------
 sound/soc/codecs/Kconfig    |   6 -
 sound/soc/codecs/Makefile   |   2 -
 sound/soc/codecs/ak4641.c   | 641 --------------------------------------------
 sound/soc/pxa/pxa2xx-ac97.c |   5 +-
 9 files changed, 13 insertions(+), 1013 deletions(-)
---
base-commit: d08c85ac8894995d4b0d8fb48d2f6a3e53cd79ab
change-id: 20260120-sound-cleanup-88dd6b97b731

Best regards,
-- 
Peng Fan <peng.fan@nxp.com>


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

* [PATCH 1/4] ASoC: codec: Remove ak4641
  2026-01-22 12:44 [PATCH 0/4] ASoC: codec: Remove ak4641/pxa2xx-ac97 and convert to GPIO descriptors Peng Fan (OSS)
@ 2026-01-22 12:44 ` Peng Fan (OSS)
  2026-01-22 15:03   ` Andy Shevchenko
  2026-01-27  9:41   ` Bartosz Golaszewski
  2026-01-22 12:44 ` [PATCH 2/4] ASoC: codec: Remove pxa2xx-ac97.c Peng Fan (OSS)
                   ` (3 subsequent siblings)
  4 siblings, 2 replies; 13+ messages in thread
From: Peng Fan (OSS) @ 2026-01-22 12:44 UTC (permalink / raw)
  To: Jaroslav Kysela, Takashi Iwai, Liam Girdwood, Mark Brown,
	Linus Walleij, Bartosz Golaszewski, Daniel Mack, Haojian Zhuang,
	Robert Jarzmik, Andy Shevchenko
  Cc: linux-kernel, linux-sound, linux-gpio, linux-arm-kernel, Peng Fan

From: Peng Fan <peng.fan@nxp.com>

Since commit d6df7df7ae5a0 ("ARM: pxa: remove unused board files"), there
has been no in-tree user of the AK4641 codec driver. The last user
(HP iPAQ hx4700) was a non-DT PXA board file that instantiated the device
via I2C board data; that code was removed as part of the PXA board-file
purge.

The AK4641 driver was introduced ~2011 and still probes only via the I2C
device-ID table ('.id_table'), without an 'of_match_table', so there are
no upstream Devicetree users to retain. With no in-tree users left, remove
the driver.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
 include/sound/ak4641.h    |  23 --
 sound/soc/codecs/Kconfig  |   6 -
 sound/soc/codecs/Makefile |   2 -
 sound/soc/codecs/ak4641.c | 641 ----------------------------------------------
 4 files changed, 672 deletions(-)

diff --git a/include/sound/ak4641.h b/include/sound/ak4641.h
deleted file mode 100644
index 8b1941bbde5203f3f8ace779720fdb9aa8b6eafd..0000000000000000000000000000000000000000
--- a/include/sound/ak4641.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-/*
- * AK4641 ALSA SoC Codec driver
- *
- * Copyright 2009 Philipp Zabel
- */
-
-#ifndef __AK4641_H
-#define __AK4641_H
-
-/**
- * struct ak4641_platform_data - platform specific AK4641 configuration
- * @gpio_power:	GPIO to control external power to AK4641
- * @gpio_npdn:	GPIO connected to AK4641 nPDN pin
- *
- * Both GPIO parameters are optional.
- */
-struct ak4641_platform_data {
-	int gpio_power;
-	int gpio_npdn;
-};
-
-#endif /* __AK4641_H */
diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
index 90f09d4bdf8e8155f9c33e596d5e670cd1fca820..c3bcead0ade9badb1562e8a5cc63c27d90cb68eb 100644
--- a/sound/soc/codecs/Kconfig
+++ b/sound/soc/codecs/Kconfig
@@ -46,7 +46,6 @@ config SND_SOC_ALL_CODECS
 	imply SND_SOC_AK4554
 	imply SND_SOC_AK4613
 	imply SND_SOC_AK4619
-	imply SND_SOC_AK4641
 	imply SND_SOC_AK4642
 	imply SND_SOC_AK4671
 	imply SND_SOC_AK5386
@@ -625,11 +624,6 @@ config SND_SOC_AK4619
         tristate "AKM AK4619 CODEC"
         depends on I2C
 
-config SND_SOC_AK4641
-	tristate
-	depends on I2C
-	depends on GPIOLIB_LEGACY
-
 config SND_SOC_AK4642
 	tristate "AKM AK4642 CODEC"
 	depends on I2C
diff --git a/sound/soc/codecs/Makefile b/sound/soc/codecs/Makefile
index a6406bc907a9d27de5b5db793953c71fd82ed63b..b319f22250db38444435accf6bee663eb8ed4cdc 100644
--- a/sound/soc/codecs/Makefile
+++ b/sound/soc/codecs/Makefile
@@ -40,7 +40,6 @@ snd-soc-ak4535-y := ak4535.o
 snd-soc-ak4554-y := ak4554.o
 snd-soc-ak4613-y := ak4613.o
 snd-soc-ak4619-y := ak4619.o
-snd-soc-ak4641-y := ak4641.o
 snd-soc-ak4642-y := ak4642.o
 snd-soc-ak4671-y := ak4671.o
 snd-soc-ak5386-y := ak5386.o
@@ -474,7 +473,6 @@ obj-$(CONFIG_SND_SOC_AK4535)	+= snd-soc-ak4535.o
 obj-$(CONFIG_SND_SOC_AK4554)	+= snd-soc-ak4554.o
 obj-$(CONFIG_SND_SOC_AK4613)	+= snd-soc-ak4613.o
 obj-$(CONFIG_SND_SOC_AK4619)	+= snd-soc-ak4619.o
-obj-$(CONFIG_SND_SOC_AK4641)	+= snd-soc-ak4641.o
 obj-$(CONFIG_SND_SOC_AK4642)	+= snd-soc-ak4642.o
 obj-$(CONFIG_SND_SOC_AK4671)	+= snd-soc-ak4671.o
 obj-$(CONFIG_SND_SOC_AK5386)	+= snd-soc-ak5386.o
diff --git a/sound/soc/codecs/ak4641.c b/sound/soc/codecs/ak4641.c
deleted file mode 100644
index 9db8cdb26d33a564a9f80afdad1fbef1a5bc35b6..0000000000000000000000000000000000000000
--- a/sound/soc/codecs/ak4641.c
+++ /dev/null
@@ -1,641 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0-only
-/*
- * ak4641.c  --  AK4641 ALSA Soc Audio driver
- *
- * Copyright (C) 2008 Harald Welte <laforge@gnufiish.org>
- * Copyright (C) 2011 Dmitry Artamonow <mad_soft@inbox.ru>
- *
- * Based on ak4535.c by Richard Purdie
- */
-
-#include <linux/module.h>
-#include <linux/init.h>
-#include <linux/delay.h>
-#include <linux/gpio.h>
-#include <linux/pm.h>
-#include <linux/i2c.h>
-#include <linux/regmap.h>
-#include <linux/slab.h>
-#include <sound/core.h>
-#include <sound/pcm.h>
-#include <sound/pcm_params.h>
-#include <sound/soc.h>
-#include <sound/initval.h>
-#include <sound/tlv.h>
-#include <sound/ak4641.h>
-
-/* AK4641 register space */
-#define AK4641_PM1		0x00
-#define AK4641_PM2		0x01
-#define AK4641_SIG1		0x02
-#define AK4641_SIG2		0x03
-#define AK4641_MODE1		0x04
-#define AK4641_MODE2		0x05
-#define AK4641_DAC		0x06
-#define AK4641_MIC		0x07
-#define AK4641_TIMER		0x08
-#define AK4641_ALC1		0x09
-#define AK4641_ALC2		0x0a
-#define AK4641_PGA		0x0b
-#define AK4641_LATT		0x0c
-#define AK4641_RATT		0x0d
-#define AK4641_VOL		0x0e
-#define AK4641_STATUS		0x0f
-#define AK4641_EQLO		0x10
-#define AK4641_EQMID		0x11
-#define AK4641_EQHI		0x12
-#define AK4641_BTIF		0x13
-
-/* codec private data */
-struct ak4641_priv {
-	struct regmap *regmap;
-	unsigned int sysclk;
-	int deemph;
-	int playback_fs;
-};
-
-/*
- * ak4641 register cache
- */
-static const struct reg_default ak4641_reg_defaults[] = {
-	{  0, 0x00 }, {  1, 0x80 }, {  2, 0x00 }, {  3, 0x80 },
-	{  4, 0x02 }, {  5, 0x00 }, {  6, 0x11 }, {  7, 0x05 },
-	{  8, 0x00 }, {  9, 0x00 }, { 10, 0x36 }, { 11, 0x10 },
-	{ 12, 0x00 }, { 13, 0x00 }, { 14, 0x57 }, { 15, 0x00 },
-	{ 16, 0x88 }, { 17, 0x88 }, { 18, 0x08 }, { 19, 0x08 }
-};
-
-static const int deemph_settings[] = {44100, 0, 48000, 32000};
-
-static int ak4641_set_deemph(struct snd_soc_component *component)
-{
-	struct ak4641_priv *ak4641 = snd_soc_component_get_drvdata(component);
-	int i, best = 0;
-
-	for (i = 0 ; i < ARRAY_SIZE(deemph_settings); i++) {
-		/* if deemphasis is on, select the nearest available rate */
-		if (ak4641->deemph && deemph_settings[i] != 0 &&
-		    abs(deemph_settings[i] - ak4641->playback_fs) <
-		    abs(deemph_settings[best] - ak4641->playback_fs))
-			best = i;
-
-		if (!ak4641->deemph && deemph_settings[i] == 0)
-			best = i;
-	}
-
-	dev_dbg(component->dev, "Set deemphasis %d\n", best);
-
-	return snd_soc_component_update_bits(component, AK4641_DAC, 0x3, best);
-}
-
-static int ak4641_put_deemph(struct snd_kcontrol *kcontrol,
-				struct snd_ctl_elem_value *ucontrol)
-{
-	struct snd_soc_component *component = snd_kcontrol_chip(kcontrol);
-	struct ak4641_priv *ak4641 = snd_soc_component_get_drvdata(component);
-	int deemph = ucontrol->value.integer.value[0];
-
-	if (deemph > 1)
-		return -EINVAL;
-
-	ak4641->deemph = deemph;
-
-	return ak4641_set_deemph(component);
-}
-
-static int ak4641_get_deemph(struct snd_kcontrol *kcontrol,
-				struct snd_ctl_elem_value *ucontrol)
-{
-	struct snd_soc_component *component = snd_kcontrol_chip(kcontrol);
-	struct ak4641_priv *ak4641 = snd_soc_component_get_drvdata(component);
-
-	ucontrol->value.integer.value[0] = ak4641->deemph;
-	return 0;
-};
-
-static const char *ak4641_mono_out[] = {"(L + R)/2", "Hi-Z"};
-static const char *ak4641_hp_out[] = {"Stereo", "Mono"};
-static const char *ak4641_mic_select[] = {"Internal", "External"};
-static const char *ak4641_mic_or_dac[] = {"Microphone", "Voice DAC"};
-
-
-static const DECLARE_TLV_DB_SCALE(mono_gain_tlv, -1700, 2300, 0);
-static const DECLARE_TLV_DB_SCALE(mic_boost_tlv, 0, 2000, 0);
-static const DECLARE_TLV_DB_SCALE(eq_tlv, -1050, 150, 0);
-static const DECLARE_TLV_DB_SCALE(master_tlv, -12750, 50, 0);
-static const DECLARE_TLV_DB_SCALE(mic_stereo_sidetone_tlv, -2700, 300, 0);
-static const DECLARE_TLV_DB_SCALE(mic_mono_sidetone_tlv, -400, 400, 0);
-static const DECLARE_TLV_DB_SCALE(capture_tlv, -800, 50, 0);
-static const DECLARE_TLV_DB_SCALE(alc_tlv, -800, 50, 0);
-static const DECLARE_TLV_DB_SCALE(aux_in_tlv, -2100, 300, 0);
-
-
-static SOC_ENUM_SINGLE_DECL(ak4641_mono_out_enum,
-			    AK4641_SIG1, 6, ak4641_mono_out);
-static SOC_ENUM_SINGLE_DECL(ak4641_hp_out_enum,
-			    AK4641_MODE2, 2, ak4641_hp_out);
-static SOC_ENUM_SINGLE_DECL(ak4641_mic_select_enum,
-			    AK4641_MIC, 1, ak4641_mic_select);
-static SOC_ENUM_SINGLE_DECL(ak4641_mic_or_dac_enum,
-			    AK4641_BTIF, 4, ak4641_mic_or_dac);
-
-static const struct snd_kcontrol_new ak4641_snd_controls[] = {
-	SOC_ENUM("Mono 1 Output", ak4641_mono_out_enum),
-	SOC_SINGLE_TLV("Mono 1 Gain Volume", AK4641_SIG1, 7, 1, 1,
-							mono_gain_tlv),
-	SOC_ENUM("Headphone Output", ak4641_hp_out_enum),
-	SOC_SINGLE_BOOL_EXT("Playback Deemphasis Switch", 0,
-					ak4641_get_deemph, ak4641_put_deemph),
-
-	SOC_SINGLE_TLV("Mic Boost Volume", AK4641_MIC, 0, 1, 0, mic_boost_tlv),
-
-	SOC_SINGLE("ALC Operation Time", AK4641_TIMER, 0, 3, 0),
-	SOC_SINGLE("ALC Recovery Time", AK4641_TIMER, 2, 3, 0),
-	SOC_SINGLE("ALC ZC Time", AK4641_TIMER, 4, 3, 0),
-
-	SOC_SINGLE("ALC 1 Switch", AK4641_ALC1, 5, 1, 0),
-
-	SOC_SINGLE_TLV("ALC Volume", AK4641_ALC2, 0, 71, 0, alc_tlv),
-	SOC_SINGLE("Left Out Enable Switch", AK4641_SIG2, 1, 1, 0),
-	SOC_SINGLE("Right Out Enable Switch", AK4641_SIG2, 0, 1, 0),
-
-	SOC_SINGLE_TLV("Capture Volume", AK4641_PGA, 0, 71, 0, capture_tlv),
-
-	SOC_DOUBLE_R_TLV("Master Playback Volume", AK4641_LATT,
-				AK4641_RATT, 0, 255, 1, master_tlv),
-
-	SOC_SINGLE_TLV("AUX In Volume", AK4641_VOL, 0, 15, 0, aux_in_tlv),
-
-	SOC_SINGLE("Equalizer Switch", AK4641_DAC, 2, 1, 0),
-	SOC_SINGLE_TLV("EQ1 100 Hz Volume", AK4641_EQLO, 0, 15, 1, eq_tlv),
-	SOC_SINGLE_TLV("EQ2 250 Hz Volume", AK4641_EQLO, 4, 15, 1, eq_tlv),
-	SOC_SINGLE_TLV("EQ3 1 kHz Volume", AK4641_EQMID, 0, 15, 1, eq_tlv),
-	SOC_SINGLE_TLV("EQ4 3.5 kHz Volume", AK4641_EQMID, 4, 15, 1, eq_tlv),
-	SOC_SINGLE_TLV("EQ5 10 kHz Volume", AK4641_EQHI, 0, 15, 1, eq_tlv),
-};
-
-/* Mono 1 Mixer */
-static const struct snd_kcontrol_new ak4641_mono1_mixer_controls[] = {
-	SOC_DAPM_SINGLE_TLV("Mic Mono Sidetone Volume", AK4641_VOL, 7, 1, 0,
-						mic_mono_sidetone_tlv),
-	SOC_DAPM_SINGLE("Mic Mono Sidetone Switch", AK4641_SIG1, 4, 1, 0),
-	SOC_DAPM_SINGLE("Mono Playback Switch", AK4641_SIG1, 5, 1, 0),
-};
-
-/* Stereo Mixer */
-static const struct snd_kcontrol_new ak4641_stereo_mixer_controls[] = {
-	SOC_DAPM_SINGLE_TLV("Mic Sidetone Volume", AK4641_VOL, 4, 7, 0,
-						mic_stereo_sidetone_tlv),
-	SOC_DAPM_SINGLE("Mic Sidetone Switch", AK4641_SIG2, 4, 1, 0),
-	SOC_DAPM_SINGLE("Playback Switch", AK4641_SIG2, 7, 1, 0),
-	SOC_DAPM_SINGLE("Aux Bypass Switch", AK4641_SIG2, 5, 1, 0),
-};
-
-/* Input Mixer */
-static const struct snd_kcontrol_new ak4641_input_mixer_controls[] = {
-	SOC_DAPM_SINGLE("Mic Capture Switch", AK4641_MIC, 2, 1, 0),
-	SOC_DAPM_SINGLE("Aux Capture Switch", AK4641_MIC, 5, 1, 0),
-};
-
-/* Mic mux */
-static const struct snd_kcontrol_new ak4641_mic_mux_control =
-	SOC_DAPM_ENUM("Mic Select", ak4641_mic_select_enum);
-
-/* Input mux */
-static const struct snd_kcontrol_new ak4641_input_mux_control =
-	SOC_DAPM_ENUM("Input Select", ak4641_mic_or_dac_enum);
-
-/* mono 2 switch */
-static const struct snd_kcontrol_new ak4641_mono2_control =
-	SOC_DAPM_SINGLE("Switch", AK4641_SIG1, 0, 1, 0);
-
-/* ak4641 dapm widgets */
-static const struct snd_soc_dapm_widget ak4641_dapm_widgets[] = {
-	SND_SOC_DAPM_MIXER("Stereo Mixer", SND_SOC_NOPM, 0, 0,
-		&ak4641_stereo_mixer_controls[0],
-		ARRAY_SIZE(ak4641_stereo_mixer_controls)),
-	SND_SOC_DAPM_MIXER("Mono1 Mixer", SND_SOC_NOPM, 0, 0,
-		&ak4641_mono1_mixer_controls[0],
-		ARRAY_SIZE(ak4641_mono1_mixer_controls)),
-	SND_SOC_DAPM_MIXER("Input Mixer", SND_SOC_NOPM, 0, 0,
-		&ak4641_input_mixer_controls[0],
-		ARRAY_SIZE(ak4641_input_mixer_controls)),
-	SND_SOC_DAPM_MUX("Mic Mux", SND_SOC_NOPM, 0, 0,
-		&ak4641_mic_mux_control),
-	SND_SOC_DAPM_MUX("Input Mux", SND_SOC_NOPM, 0, 0,
-		&ak4641_input_mux_control),
-	SND_SOC_DAPM_SWITCH("Mono 2 Enable", SND_SOC_NOPM, 0, 0,
-		&ak4641_mono2_control),
-
-	SND_SOC_DAPM_OUTPUT("LOUT"),
-	SND_SOC_DAPM_OUTPUT("ROUT"),
-	SND_SOC_DAPM_OUTPUT("MOUT1"),
-	SND_SOC_DAPM_OUTPUT("MOUT2"),
-	SND_SOC_DAPM_OUTPUT("MICOUT"),
-
-	SND_SOC_DAPM_ADC("ADC", "HiFi Capture", AK4641_PM1, 0, 0),
-	SND_SOC_DAPM_PGA("Mic", AK4641_PM1, 1, 0, NULL, 0),
-	SND_SOC_DAPM_PGA("AUX In", AK4641_PM1, 2, 0, NULL, 0),
-	SND_SOC_DAPM_PGA("Mono Out", AK4641_PM1, 3, 0, NULL, 0),
-	SND_SOC_DAPM_PGA("Line Out", AK4641_PM1, 4, 0, NULL, 0),
-
-	SND_SOC_DAPM_DAC("DAC", "HiFi Playback", AK4641_PM2, 0, 0),
-	SND_SOC_DAPM_PGA("Mono Out 2", AK4641_PM2, 3, 0, NULL, 0),
-
-	SND_SOC_DAPM_ADC("Voice ADC", "Voice Capture", AK4641_BTIF, 0, 0),
-	SND_SOC_DAPM_DAC("Voice DAC", "Voice Playback", AK4641_BTIF, 1, 0),
-
-	SND_SOC_DAPM_MICBIAS("Mic Int Bias", AK4641_MIC, 3, 0),
-	SND_SOC_DAPM_MICBIAS("Mic Ext Bias", AK4641_MIC, 4, 0),
-
-	SND_SOC_DAPM_INPUT("MICIN"),
-	SND_SOC_DAPM_INPUT("MICEXT"),
-	SND_SOC_DAPM_INPUT("AUX"),
-	SND_SOC_DAPM_INPUT("AIN"),
-};
-
-static const struct snd_soc_dapm_route ak4641_audio_map[] = {
-	/* Stereo Mixer */
-	{"Stereo Mixer", "Playback Switch", "DAC"},
-	{"Stereo Mixer", "Mic Sidetone Switch", "Input Mux"},
-	{"Stereo Mixer", "Aux Bypass Switch", "AUX In"},
-
-	/* Mono 1 Mixer */
-	{"Mono1 Mixer", "Mic Mono Sidetone Switch", "Input Mux"},
-	{"Mono1 Mixer", "Mono Playback Switch", "DAC"},
-
-	/* Mic */
-	{"Mic", NULL, "AIN"},
-	{"Mic Mux", "Internal", "Mic Int Bias"},
-	{"Mic Mux", "External", "Mic Ext Bias"},
-	{"Mic Int Bias", NULL, "MICIN"},
-	{"Mic Ext Bias", NULL, "MICEXT"},
-	{"MICOUT", NULL, "Mic Mux"},
-
-	/* Input Mux */
-	{"Input Mux", "Microphone", "Mic"},
-	{"Input Mux", "Voice DAC", "Voice DAC"},
-
-	/* Line Out */
-	{"LOUT", NULL, "Line Out"},
-	{"ROUT", NULL, "Line Out"},
-	{"Line Out", NULL, "Stereo Mixer"},
-
-	/* Mono 1 Out */
-	{"MOUT1", NULL, "Mono Out"},
-	{"Mono Out", NULL, "Mono1 Mixer"},
-
-	/* Mono 2 Out */
-	{"MOUT2", NULL, "Mono 2 Enable"},
-	{"Mono 2 Enable", "Switch", "Mono Out 2"},
-	{"Mono Out 2", NULL, "Stereo Mixer"},
-
-	{"Voice ADC", NULL, "Mono 2 Enable"},
-
-	/* Aux In */
-	{"AUX In", NULL, "AUX"},
-
-	/* ADC */
-	{"ADC", NULL, "Input Mixer"},
-	{"Input Mixer", "Mic Capture Switch", "Mic"},
-	{"Input Mixer", "Aux Capture Switch", "AUX In"},
-};
-
-static int ak4641_set_dai_sysclk(struct snd_soc_dai *codec_dai,
-	int clk_id, unsigned int freq, int dir)
-{
-	struct snd_soc_component *component = codec_dai->component;
-	struct ak4641_priv *ak4641 = snd_soc_component_get_drvdata(component);
-
-	ak4641->sysclk = freq;
-	return 0;
-}
-
-static int ak4641_i2s_hw_params(struct snd_pcm_substream *substream,
-				 struct snd_pcm_hw_params *params,
-				 struct snd_soc_dai *dai)
-{
-	struct snd_soc_component *component = dai->component;
-	struct ak4641_priv *ak4641 = snd_soc_component_get_drvdata(component);
-	int rate = params_rate(params), fs = 256;
-	u8 mode2;
-
-	if (rate)
-		fs = ak4641->sysclk / rate;
-	else
-		return -EINVAL;
-
-	/* set fs */
-	switch (fs) {
-	case 1024:
-		mode2 = (0x2 << 5);
-		break;
-	case 512:
-		mode2 = (0x1 << 5);
-		break;
-	case 256:
-		mode2 = (0x0 << 5);
-		break;
-	default:
-		dev_err(component->dev, "Error: unsupported fs=%d\n", fs);
-		return -EINVAL;
-	}
-
-	snd_soc_component_update_bits(component, AK4641_MODE2, (0x3 << 5), mode2);
-
-	/* Update de-emphasis filter for the new rate */
-	if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
-		ak4641->playback_fs = rate;
-		ak4641_set_deemph(component);
-	}
-
-	return 0;
-}
-
-static int ak4641_pcm_set_dai_fmt(struct snd_soc_dai *codec_dai,
-				  unsigned int fmt)
-{
-	struct snd_soc_component *component = codec_dai->component;
-	u8 btif;
-	int ret;
-
-	/* interface format */
-	switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) {
-	case SND_SOC_DAIFMT_I2S:
-		btif = (0x3 << 5);
-		break;
-	case SND_SOC_DAIFMT_LEFT_J:
-		btif = (0x2 << 5);
-		break;
-	case SND_SOC_DAIFMT_DSP_A:	/* MSB after FRM */
-		btif = (0x0 << 5);
-		break;
-	case SND_SOC_DAIFMT_DSP_B:	/* MSB during FRM */
-		btif = (0x1 << 5);
-		break;
-	default:
-		return -EINVAL;
-	}
-
-	ret = snd_soc_component_update_bits(component, AK4641_BTIF, (0x3 << 5), btif);
-	if (ret < 0)
-		return ret;
-
-	return 0;
-}
-
-static int ak4641_i2s_set_dai_fmt(struct snd_soc_dai *codec_dai,
-		unsigned int fmt)
-{
-	struct snd_soc_component *component = codec_dai->component;
-	u8 mode1 = 0;
-
-	/* interface format */
-	switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) {
-	case SND_SOC_DAIFMT_I2S:
-		mode1 = 0x02;
-		break;
-	case SND_SOC_DAIFMT_LEFT_J:
-		mode1 = 0x01;
-		break;
-	default:
-		return -EINVAL;
-	}
-
-	return snd_soc_component_write(component, AK4641_MODE1, mode1);
-}
-
-static int ak4641_mute(struct snd_soc_dai *dai, int mute, int direction)
-{
-	struct snd_soc_component *component = dai->component;
-
-	return snd_soc_component_update_bits(component, AK4641_DAC, 0x20, mute ? 0x20 : 0);
-}
-
-static int ak4641_set_bias_level(struct snd_soc_component *component,
-	enum snd_soc_bias_level level)
-{
-	struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component);
-	struct ak4641_priv *ak4641 = snd_soc_component_get_drvdata(component);
-	struct ak4641_platform_data *pdata = component->dev->platform_data;
-	int ret;
-
-	switch (level) {
-	case SND_SOC_BIAS_ON:
-		/* unmute */
-		snd_soc_component_update_bits(component, AK4641_DAC, 0x20, 0);
-		break;
-	case SND_SOC_BIAS_PREPARE:
-		/* mute */
-		snd_soc_component_update_bits(component, AK4641_DAC, 0x20, 0x20);
-		break;
-	case SND_SOC_BIAS_STANDBY:
-		if (snd_soc_dapm_get_bias_level(dapm) == SND_SOC_BIAS_OFF) {
-			if (pdata && gpio_is_valid(pdata->gpio_power))
-				gpio_set_value(pdata->gpio_power, 1);
-			mdelay(1);
-			if (pdata && gpio_is_valid(pdata->gpio_npdn))
-				gpio_set_value(pdata->gpio_npdn, 1);
-			mdelay(1);
-
-			ret = regcache_sync(ak4641->regmap);
-			if (ret) {
-				dev_err(component->dev,
-					"Failed to sync cache: %d\n", ret);
-				return ret;
-			}
-		}
-		snd_soc_component_update_bits(component, AK4641_PM1, 0x80, 0x80);
-		snd_soc_component_update_bits(component, AK4641_PM2, 0x80, 0);
-		break;
-	case SND_SOC_BIAS_OFF:
-		snd_soc_component_update_bits(component, AK4641_PM1, 0x80, 0);
-		if (pdata && gpio_is_valid(pdata->gpio_npdn))
-			gpio_set_value(pdata->gpio_npdn, 0);
-		if (pdata && gpio_is_valid(pdata->gpio_power))
-			gpio_set_value(pdata->gpio_power, 0);
-		regcache_mark_dirty(ak4641->regmap);
-		break;
-	}
-	return 0;
-}
-
-#define AK4641_RATES	(SNDRV_PCM_RATE_8000_48000)
-#define AK4641_RATES_BT (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_11025 |\
-			 SNDRV_PCM_RATE_16000)
-#define AK4641_FORMATS	(SNDRV_PCM_FMTBIT_S16_LE)
-
-static const struct snd_soc_dai_ops ak4641_i2s_dai_ops = {
-	.hw_params    = ak4641_i2s_hw_params,
-	.set_fmt      = ak4641_i2s_set_dai_fmt,
-	.mute_stream  = ak4641_mute,
-	.set_sysclk   = ak4641_set_dai_sysclk,
-	.no_capture_mute = 1,
-};
-
-static const struct snd_soc_dai_ops ak4641_pcm_dai_ops = {
-	.hw_params    = NULL, /* rates are controlled by BT chip */
-	.set_fmt      = ak4641_pcm_set_dai_fmt,
-	.mute_stream  = ak4641_mute,
-	.set_sysclk   = ak4641_set_dai_sysclk,
-	.no_capture_mute = 1,
-};
-
-static struct snd_soc_dai_driver ak4641_dai[] = {
-{
-	.name = "ak4641-hifi",
-	.id = 1,
-	.playback = {
-		.stream_name = "HiFi Playback",
-		.channels_min = 1,
-		.channels_max = 2,
-		.rates = AK4641_RATES,
-		.formats = AK4641_FORMATS,
-	},
-	.capture = {
-		.stream_name = "HiFi Capture",
-		.channels_min = 1,
-		.channels_max = 2,
-		.rates = AK4641_RATES,
-		.formats = AK4641_FORMATS,
-	},
-	.ops = &ak4641_i2s_dai_ops,
-	.symmetric_rate = 1,
-},
-{
-	.name = "ak4641-voice",
-	.id = 1,
-	.playback = {
-		.stream_name = "Voice Playback",
-		.channels_min = 1,
-		.channels_max = 1,
-		.rates = AK4641_RATES_BT,
-		.formats = AK4641_FORMATS,
-	},
-	.capture = {
-		.stream_name = "Voice Capture",
-		.channels_min = 1,
-		.channels_max = 1,
-		.rates = AK4641_RATES_BT,
-		.formats = AK4641_FORMATS,
-	},
-	.ops = &ak4641_pcm_dai_ops,
-	.symmetric_rate = 1,
-},
-};
-
-static const struct snd_soc_component_driver soc_component_dev_ak4641 = {
-	.controls		= ak4641_snd_controls,
-	.num_controls		= ARRAY_SIZE(ak4641_snd_controls),
-	.dapm_widgets		= ak4641_dapm_widgets,
-	.num_dapm_widgets	= ARRAY_SIZE(ak4641_dapm_widgets),
-	.dapm_routes		= ak4641_audio_map,
-	.num_dapm_routes	= ARRAY_SIZE(ak4641_audio_map),
-	.set_bias_level		= ak4641_set_bias_level,
-	.suspend_bias_off	= 1,
-	.idle_bias_on		= 1,
-	.use_pmdown_time	= 1,
-	.endianness		= 1,
-};
-
-static const struct regmap_config ak4641_regmap = {
-	.reg_bits = 8,
-	.val_bits = 8,
-
-	.max_register = AK4641_BTIF,
-	.reg_defaults = ak4641_reg_defaults,
-	.num_reg_defaults = ARRAY_SIZE(ak4641_reg_defaults),
-	.cache_type = REGCACHE_RBTREE,
-};
-
-static int ak4641_i2c_probe(struct i2c_client *i2c)
-{
-	struct ak4641_platform_data *pdata = i2c->dev.platform_data;
-	struct ak4641_priv *ak4641;
-	int ret;
-
-	ak4641 = devm_kzalloc(&i2c->dev, sizeof(struct ak4641_priv),
-			      GFP_KERNEL);
-	if (!ak4641)
-		return -ENOMEM;
-
-	ak4641->regmap = devm_regmap_init_i2c(i2c, &ak4641_regmap);
-	if (IS_ERR(ak4641->regmap))
-		return PTR_ERR(ak4641->regmap);
-
-	if (pdata) {
-		if (gpio_is_valid(pdata->gpio_power)) {
-			ret = gpio_request_one(pdata->gpio_power,
-					GPIOF_OUT_INIT_LOW, "ak4641 power");
-			if (ret)
-				goto err_out;
-		}
-		if (gpio_is_valid(pdata->gpio_npdn)) {
-			ret = gpio_request_one(pdata->gpio_npdn,
-					GPIOF_OUT_INIT_LOW, "ak4641 npdn");
-			if (ret)
-				goto err_gpio;
-
-			udelay(1); /* > 150 ns */
-			gpio_set_value(pdata->gpio_npdn, 1);
-		}
-	}
-
-	i2c_set_clientdata(i2c, ak4641);
-
-	ret = devm_snd_soc_register_component(&i2c->dev,
-				&soc_component_dev_ak4641,
-				ak4641_dai, ARRAY_SIZE(ak4641_dai));
-	if (ret != 0)
-		goto err_gpio2;
-
-	return 0;
-
-err_gpio2:
-	if (pdata) {
-		if (gpio_is_valid(pdata->gpio_power))
-			gpio_set_value(pdata->gpio_power, 0);
-		if (gpio_is_valid(pdata->gpio_npdn))
-			gpio_free(pdata->gpio_npdn);
-	}
-err_gpio:
-	if (pdata && gpio_is_valid(pdata->gpio_power))
-		gpio_free(pdata->gpio_power);
-err_out:
-	return ret;
-}
-
-static void ak4641_i2c_remove(struct i2c_client *i2c)
-{
-	struct ak4641_platform_data *pdata = i2c->dev.platform_data;
-
-	if (pdata) {
-		if (gpio_is_valid(pdata->gpio_power)) {
-			gpio_set_value(pdata->gpio_power, 0);
-			gpio_free(pdata->gpio_power);
-		}
-		if (gpio_is_valid(pdata->gpio_npdn))
-			gpio_free(pdata->gpio_npdn);
-	}
-}
-
-static const struct i2c_device_id ak4641_i2c_id[] = {
-	{ "ak4641" },
-	{ }
-};
-MODULE_DEVICE_TABLE(i2c, ak4641_i2c_id);
-
-static struct i2c_driver ak4641_i2c_driver = {
-	.driver = {
-		.name = "ak4641",
-	},
-	.probe =    ak4641_i2c_probe,
-	.remove =   ak4641_i2c_remove,
-	.id_table = ak4641_i2c_id,
-};
-
-module_i2c_driver(ak4641_i2c_driver);
-
-MODULE_DESCRIPTION("SoC AK4641 driver");
-MODULE_AUTHOR("Harald Welte <laforge@gnufiish.org>");
-MODULE_LICENSE("GPL");

-- 
2.37.1


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

* [PATCH 2/4] ASoC: codec: Remove pxa2xx-ac97.c
  2026-01-22 12:44 [PATCH 0/4] ASoC: codec: Remove ak4641/pxa2xx-ac97 and convert to GPIO descriptors Peng Fan (OSS)
  2026-01-22 12:44 ` [PATCH 1/4] ASoC: codec: Remove ak4641 Peng Fan (OSS)
@ 2026-01-22 12:44 ` Peng Fan (OSS)
  2026-01-22 15:00   ` Andy Shevchenko
  2026-01-27  9:43   ` Bartosz Golaszewski
  2026-01-22 12:44 ` [PATCH 3/4] ASoC: pxa2xx-ac97: Remove platform_data Peng Fan (OSS)
                   ` (2 subsequent siblings)
  4 siblings, 2 replies; 13+ messages in thread
From: Peng Fan (OSS) @ 2026-01-22 12:44 UTC (permalink / raw)
  To: Jaroslav Kysela, Takashi Iwai, Liam Girdwood, Mark Brown,
	Linus Walleij, Bartosz Golaszewski, Daniel Mack, Haojian Zhuang,
	Robert Jarzmik, Andy Shevchenko
  Cc: linux-kernel, linux-sound, linux-gpio, linux-arm-kernel, Peng Fan

From: Peng Fan <peng.fan@nxp.com>

With commit ce79f3a1ad5f ("ARM: pxa: prune unused device support") and
commit 2548e6c76ebf ("ARM: pxa: pxa2xx-ac97-lib: use IRQ resource"), there
is no 'pxa2xx-ac97' platform device created by machine level code, so this
driver could be removed.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
 sound/arm/Kconfig       |  10 --
 sound/arm/Makefile      |   3 -
 sound/arm/pxa2xx-ac97.c | 286 ------------------------------------------------
 3 files changed, 299 deletions(-)

diff --git a/sound/arm/Kconfig b/sound/arm/Kconfig
index dea2c661b3537309d8ba0ab044640f15205bf29c..e4d7288d1e1e3e7c5d081a7bf474319693d5bff6 100644
--- a/sound/arm/Kconfig
+++ b/sound/arm/Kconfig
@@ -18,16 +18,6 @@ config SND_ARMAACI
 	select SND_PCM
 	select SND_AC97_CODEC
 
-config SND_PXA2XX_AC97
-	tristate "AC97 driver for the Intel PXA2xx chip"
-	depends on ARCH_PXA
-	select SND_AC97_CODEC
-	select SND_PXA2XX_LIB
-	select SND_PXA2XX_LIB_AC97
-	help
-	  Say Y or M if you want to support any AC97 codec attached to
-	  the PXA2xx AC97 interface.
-
 endif	# SND_ARM
 
 config SND_PXA2XX_LIB
diff --git a/sound/arm/Makefile b/sound/arm/Makefile
index 899edb4bb278dad0e7dd90fd11703f4dca6c3cb1..99325a66cf771ad7a22df18b340221fa13e69a2d 100644
--- a/sound/arm/Makefile
+++ b/sound/arm/Makefile
@@ -9,6 +9,3 @@ snd-aaci-y			:= aaci.o
 obj-$(CONFIG_SND_PXA2XX_LIB)	+= snd-pxa2xx-lib.o
 snd-pxa2xx-lib-y		:= pxa2xx-pcm-lib.o
 snd-pxa2xx-lib-$(CONFIG_SND_PXA2XX_LIB_AC97)	+= pxa2xx-ac97-lib.o
-
-obj-$(CONFIG_SND_PXA2XX_AC97)	+= snd-pxa2xx-ac97.o
-snd-pxa2xx-ac97-y		:= pxa2xx-ac97.o
diff --git a/sound/arm/pxa2xx-ac97.c b/sound/arm/pxa2xx-ac97.c
deleted file mode 100644
index 77b11616a7ee05a45573d1b643f3192f35c0c38a..0000000000000000000000000000000000000000
--- a/sound/arm/pxa2xx-ac97.c
+++ /dev/null
@@ -1,286 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0-only
-/*
- * linux/sound/pxa2xx-ac97.c -- AC97 support for the Intel PXA2xx chip.
- *
- * Author:	Nicolas Pitre
- * Created:	Dec 02, 2004
- * Copyright:	MontaVista Software Inc.
- */
-
-#include <linux/init.h>
-#include <linux/io.h>
-#include <linux/module.h>
-#include <linux/platform_device.h>
-#include <linux/dmaengine.h>
-#include <linux/dma-mapping.h>
-
-#include <sound/core.h>
-#include <sound/pcm.h>
-#include <sound/ac97_codec.h>
-#include <sound/initval.h>
-#include <sound/pxa2xx-lib.h>
-#include <sound/dmaengine_pcm.h>
-
-#include <linux/platform_data/asoc-pxa.h>
-
-static void pxa2xx_ac97_legacy_reset(struct snd_ac97 *ac97)
-{
-	if (!pxa2xx_ac97_try_cold_reset())
-		pxa2xx_ac97_try_warm_reset();
-
-	pxa2xx_ac97_finish_reset();
-}
-
-static unsigned short pxa2xx_ac97_legacy_read(struct snd_ac97 *ac97,
-					      unsigned short reg)
-{
-	int ret;
-
-	ret = pxa2xx_ac97_read(ac97->num, reg);
-	if (ret < 0)
-		return 0;
-	else
-		return (unsigned short)(ret & 0xffff);
-}
-
-static void pxa2xx_ac97_legacy_write(struct snd_ac97 *ac97,
-				     unsigned short reg, unsigned short val)
-{
-	pxa2xx_ac97_write(ac97->num, reg, val);
-}
-
-static const struct snd_ac97_bus_ops pxa2xx_ac97_ops = {
-	.read	= pxa2xx_ac97_legacy_read,
-	.write	= pxa2xx_ac97_legacy_write,
-	.reset	= pxa2xx_ac97_legacy_reset,
-};
-
-static struct snd_pcm *pxa2xx_ac97_pcm;
-static struct snd_ac97 *pxa2xx_ac97_ac97;
-
-static int pxa2xx_ac97_pcm_open(struct snd_pcm_substream *substream)
-{
-	struct snd_pcm_runtime *runtime = substream->runtime;
-	pxa2xx_audio_ops_t *platform_ops;
-	int ret, i;
-
-	ret = pxa2xx_pcm_open(substream);
-	if (ret)
-		return ret;
-
-	runtime->hw.channels_min = 2;
-	runtime->hw.channels_max = 2;
-
-	i = (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) ?
-		AC97_RATES_FRONT_DAC : AC97_RATES_ADC;
-	runtime->hw.rates = pxa2xx_ac97_ac97->rates[i];
-	snd_pcm_limit_hw_rates(runtime);
-
-	platform_ops = substream->pcm->card->dev->platform_data;
-	if (platform_ops && platform_ops->startup) {
-		ret = platform_ops->startup(substream, platform_ops->priv);
-		if (ret < 0)
-			pxa2xx_pcm_close(substream);
-	}
-
-	return ret;
-}
-
-static int pxa2xx_ac97_pcm_close(struct snd_pcm_substream *substream)
-{
-	pxa2xx_audio_ops_t *platform_ops;
-
-	platform_ops = substream->pcm->card->dev->platform_data;
-	if (platform_ops && platform_ops->shutdown)
-		platform_ops->shutdown(substream, platform_ops->priv);
-
-	return 0;
-}
-
-static int pxa2xx_ac97_pcm_prepare(struct snd_pcm_substream *substream)
-{
-	struct snd_pcm_runtime *runtime = substream->runtime;
-	int reg = (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) ?
-		  AC97_PCM_FRONT_DAC_RATE : AC97_PCM_LR_ADC_RATE;
-	int ret;
-
-	ret = pxa2xx_pcm_prepare(substream);
-	if (ret < 0)
-		return ret;
-
-	return snd_ac97_set_rate(pxa2xx_ac97_ac97, reg, runtime->rate);
-}
-
-static int pxa2xx_ac97_do_suspend(struct snd_card *card)
-{
-	pxa2xx_audio_ops_t *platform_ops = card->dev->platform_data;
-
-	snd_power_change_state(card, SNDRV_CTL_POWER_D3cold);
-	snd_ac97_suspend(pxa2xx_ac97_ac97);
-	if (platform_ops && platform_ops->suspend)
-		platform_ops->suspend(platform_ops->priv);
-
-	return pxa2xx_ac97_hw_suspend();
-}
-
-static int pxa2xx_ac97_do_resume(struct snd_card *card)
-{
-	pxa2xx_audio_ops_t *platform_ops = card->dev->platform_data;
-	int rc;
-
-	rc = pxa2xx_ac97_hw_resume();
-	if (rc)
-		return rc;
-
-	if (platform_ops && platform_ops->resume)
-		platform_ops->resume(platform_ops->priv);
-	snd_ac97_resume(pxa2xx_ac97_ac97);
-	snd_power_change_state(card, SNDRV_CTL_POWER_D0);
-
-	return 0;
-}
-
-static int pxa2xx_ac97_suspend(struct device *dev)
-{
-	struct snd_card *card = dev_get_drvdata(dev);
-	int ret = 0;
-
-	if (card)
-		ret = pxa2xx_ac97_do_suspend(card);
-
-	return ret;
-}
-
-static int pxa2xx_ac97_resume(struct device *dev)
-{
-	struct snd_card *card = dev_get_drvdata(dev);
-	int ret = 0;
-
-	if (card)
-		ret = pxa2xx_ac97_do_resume(card);
-
-	return ret;
-}
-
-static DEFINE_SIMPLE_DEV_PM_OPS(pxa2xx_ac97_pm_ops, pxa2xx_ac97_suspend, pxa2xx_ac97_resume);
-
-static const struct snd_pcm_ops pxa2xx_ac97_pcm_ops = {
-	.open		= pxa2xx_ac97_pcm_open,
-	.close		= pxa2xx_ac97_pcm_close,
-	.hw_params	= pxa2xx_pcm_hw_params,
-	.prepare	= pxa2xx_ac97_pcm_prepare,
-	.trigger	= pxa2xx_pcm_trigger,
-	.pointer	= pxa2xx_pcm_pointer,
-};
-
-
-static int pxa2xx_ac97_pcm_new(struct snd_card *card)
-{
-	struct snd_pcm *pcm;
-	int ret;
-
-	ret = snd_pcm_new(card, "PXA2xx-PCM", 0, 1, 1, &pcm);
-	if (ret)
-		goto out;
-
-	ret = dma_coerce_mask_and_coherent(card->dev, DMA_BIT_MASK(32));
-	if (ret)
-		goto out;
-
-	snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &pxa2xx_ac97_pcm_ops);
-	snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &pxa2xx_ac97_pcm_ops);
-	ret = pxa2xx_pcm_preallocate_dma_buffer(pcm);
-	if (ret)
-		goto out;
-
-	pxa2xx_ac97_pcm = pcm;
-	ret = 0;
-
- out:
-	return ret;
-}
-
-static int pxa2xx_ac97_probe(struct platform_device *dev)
-{
-	struct snd_card *card;
-	struct snd_ac97_bus *ac97_bus;
-	struct snd_ac97_template ac97_template;
-	int ret;
-	pxa2xx_audio_ops_t *pdata = dev->dev.platform_data;
-
-	if (dev->id >= 0) {
-		dev_err(&dev->dev, "PXA2xx has only one AC97 port.\n");
-		ret = -ENXIO;
-		goto err_dev;
-	}
-
-	ret = snd_card_new(&dev->dev, SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1,
-			   THIS_MODULE, 0, &card);
-	if (ret < 0)
-		goto err;
-
-	strscpy(card->driver, dev->dev.driver->name, sizeof(card->driver));
-
-	ret = pxa2xx_ac97_pcm_new(card);
-	if (ret)
-		goto err;
-
-	ret = pxa2xx_ac97_hw_probe(dev);
-	if (ret)
-		goto err;
-
-	ret = snd_ac97_bus(card, 0, &pxa2xx_ac97_ops, NULL, &ac97_bus);
-	if (ret)
-		goto err_remove;
-	memset(&ac97_template, 0, sizeof(ac97_template));
-	ret = snd_ac97_mixer(ac97_bus, &ac97_template, &pxa2xx_ac97_ac97);
-	if (ret)
-		goto err_remove;
-
-	snprintf(card->shortname, sizeof(card->shortname),
-		 "%s", snd_ac97_get_short_name(pxa2xx_ac97_ac97));
-	snprintf(card->longname, sizeof(card->longname),
-		 "%s (%s)", dev->dev.driver->name, card->mixername);
-
-	if (pdata && pdata->codec_pdata[0])
-		snd_ac97_dev_add_pdata(ac97_bus->codec[0], pdata->codec_pdata[0]);
-	ret = snd_card_register(card);
-	if (ret == 0) {
-		platform_set_drvdata(dev, card);
-		return 0;
-	}
-
-err_remove:
-	pxa2xx_ac97_hw_remove(dev);
-err:
-	if (card)
-		snd_card_free(card);
-err_dev:
-	return ret;
-}
-
-static void pxa2xx_ac97_remove(struct platform_device *dev)
-{
-	struct snd_card *card = platform_get_drvdata(dev);
-
-	if (card) {
-		snd_card_free(card);
-		pxa2xx_ac97_hw_remove(dev);
-	}
-}
-
-static struct platform_driver pxa2xx_ac97_driver = {
-	.probe		= pxa2xx_ac97_probe,
-	.remove		= pxa2xx_ac97_remove,
-	.driver		= {
-		.name	= "pxa2xx-ac97",
-		.pm	= &pxa2xx_ac97_pm_ops,
-	},
-};
-
-module_platform_driver(pxa2xx_ac97_driver);
-
-MODULE_AUTHOR("Nicolas Pitre");
-MODULE_DESCRIPTION("AC97 driver for the Intel PXA2xx chip");
-MODULE_LICENSE("GPL");
-MODULE_ALIAS("platform:pxa2xx-ac97");

-- 
2.37.1


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

* [PATCH 3/4] ASoC: pxa2xx-ac97: Remove platform_data
  2026-01-22 12:44 [PATCH 0/4] ASoC: codec: Remove ak4641/pxa2xx-ac97 and convert to GPIO descriptors Peng Fan (OSS)
  2026-01-22 12:44 ` [PATCH 1/4] ASoC: codec: Remove ak4641 Peng Fan (OSS)
  2026-01-22 12:44 ` [PATCH 2/4] ASoC: codec: Remove pxa2xx-ac97.c Peng Fan (OSS)
@ 2026-01-22 12:44 ` Peng Fan (OSS)
  2026-01-22 14:58   ` Andy Shevchenko
  2026-01-22 12:45 ` [PATCH 4/4] ASoC: ac97: Convert to GPIO descriptors Peng Fan (OSS)
  2026-01-28  3:02 ` [PATCH 0/4] ASoC: codec: Remove ak4641/pxa2xx-ac97 and convert " Mark Brown
  4 siblings, 1 reply; 13+ messages in thread
From: Peng Fan (OSS) @ 2026-01-22 12:44 UTC (permalink / raw)
  To: Jaroslav Kysela, Takashi Iwai, Liam Girdwood, Mark Brown,
	Linus Walleij, Bartosz Golaszewski, Daniel Mack, Haojian Zhuang,
	Robert Jarzmik, Andy Shevchenko
  Cc: linux-kernel, linux-sound, linux-gpio, linux-arm-kernel, Peng Fan

From: Peng Fan <peng.fan@nxp.com>

Since commit d6df7df7ae5a0 ("ARM: pxa: remove unused board files"), there
has been no in-tree user to create the device with platform data. So remove
them.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
 sound/arm/pxa2xx-ac97-lib.c | 33 ++++++---------------------------
 sound/soc/pxa/pxa2xx-ac97.c |  5 +----
 2 files changed, 7 insertions(+), 31 deletions(-)

diff --git a/sound/arm/pxa2xx-ac97-lib.c b/sound/arm/pxa2xx-ac97-lib.c
index 64510318091f4a6700dfab67479cc1465c545294..0a28e44118c5253054370b6d8117d8b61fa257fd 100644
--- a/sound/arm/pxa2xx-ac97-lib.c
+++ b/sound/arm/pxa2xx-ac97-lib.c
@@ -321,7 +321,6 @@ int pxa2xx_ac97_hw_probe(struct platform_device *dev)
 {
 	int ret;
 	int irq;
-	pxa2xx_audio_ops_t *pdata = dev->dev.platform_data;
 
 	ac97_reg_base = devm_platform_ioremap_resource(dev, 0);
 	if (IS_ERR(ac97_reg_base)) {
@@ -329,32 +328,12 @@ int pxa2xx_ac97_hw_probe(struct platform_device *dev)
 		return PTR_ERR(ac97_reg_base);
 	}
 
-	if (pdata) {
-		switch (pdata->reset_gpio) {
-		case 95:
-		case 113:
-			reset_gpio = pdata->reset_gpio;
-			break;
-		case 0:
-			reset_gpio = 113;
-			break;
-		case -1:
-			break;
-		default:
-			dev_err(&dev->dev, "Invalid reset GPIO %d\n",
-				pdata->reset_gpio);
-		}
-	} else if (!pdata && dev->dev.of_node) {
-		pdata = devm_kzalloc(&dev->dev, sizeof(*pdata), GFP_KERNEL);
-		if (!pdata)
-			return -ENOMEM;
-		pdata->reset_gpio = of_get_named_gpio(dev->dev.of_node,
-						      "reset-gpios", 0);
-		if (pdata->reset_gpio == -ENOENT)
-			pdata->reset_gpio = -1;
-		else if (pdata->reset_gpio < 0)
-			return pdata->reset_gpio;
-		reset_gpio = pdata->reset_gpio;
+	if (dev->dev.of_node) {
+		reset_gpio = of_get_named_gpio(dev->dev.of_node, "reset-gpios", 0);
+		if (reset_gpio == -ENOENT)
+			reset_gpio = -1;
+		else if (reset_gpio < 0)
+			return reset_gpio;
 	} else {
 		if (cpu_is_pxa27x())
 			reset_gpio = 113;
diff --git a/sound/soc/pxa/pxa2xx-ac97.c b/sound/soc/pxa/pxa2xx-ac97.c
index 78f50032afc5d93acf8945793cd589bc5bf2f862..109a4958d9c04c6b027d89524ee3493d98330c1a 100644
--- a/sound/soc/pxa/pxa2xx-ac97.c
+++ b/sound/soc/pxa/pxa2xx-ac97.c
@@ -222,9 +222,7 @@ static int pxa2xx_ac97_dev_probe(struct platform_device *pdev)
 {
 	int ret;
 	struct ac97_controller *ctrl;
-	pxa2xx_audio_ops_t *pdata = pdev->dev.platform_data;
 	struct resource *regs;
-	void **codecs_pdata;
 
 	if (pdev->id != -1) {
 		dev_err(&pdev->dev, "PXA2xx has only one AC97 port.\n");
@@ -247,10 +245,9 @@ static int pxa2xx_ac97_dev_probe(struct platform_device *pdev)
 		return ret;
 	}
 
-	codecs_pdata = pdata ? pdata->codec_pdata : NULL;
 	ctrl = snd_ac97_controller_register(&pxa2xx_ac97_ops, &pdev->dev,
 					    AC97_SLOTS_AVAILABLE_ALL,
-					    codecs_pdata);
+					    NULL);
 	if (IS_ERR(ctrl))
 		return PTR_ERR(ctrl);
 

-- 
2.37.1


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

* [PATCH 4/4] ASoC: ac97: Convert to GPIO descriptors
  2026-01-22 12:44 [PATCH 0/4] ASoC: codec: Remove ak4641/pxa2xx-ac97 and convert to GPIO descriptors Peng Fan (OSS)
                   ` (2 preceding siblings ...)
  2026-01-22 12:44 ` [PATCH 3/4] ASoC: pxa2xx-ac97: Remove platform_data Peng Fan (OSS)
@ 2026-01-22 12:45 ` Peng Fan (OSS)
  2026-01-22 15:07   ` Andy Shevchenko
  2026-01-28  3:02 ` [PATCH 0/4] ASoC: codec: Remove ak4641/pxa2xx-ac97 and convert " Mark Brown
  4 siblings, 1 reply; 13+ messages in thread
From: Peng Fan (OSS) @ 2026-01-22 12:45 UTC (permalink / raw)
  To: Jaroslav Kysela, Takashi Iwai, Liam Girdwood, Mark Brown,
	Linus Walleij, Bartosz Golaszewski, Daniel Mack, Haojian Zhuang,
	Robert Jarzmik, Andy Shevchenko
  Cc: linux-kernel, linux-sound, linux-gpio, linux-arm-kernel, Peng Fan

From: Peng Fan <peng.fan@nxp.com>

of_gpio.h is deprecated, update the driver to use GPIO descriptors.
 - Use devm_gpiod_get to get GPIO descriptor, and set consumer
   name.

Since the driver still pass the reset_gpio to pxa27x_configure_ac97reset,
so use desc_to_gpio() to get it gpio id.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
 sound/arm/pxa2xx-ac97-lib.c | 25 ++++++++++---------------
 1 file changed, 10 insertions(+), 15 deletions(-)

diff --git a/sound/arm/pxa2xx-ac97-lib.c b/sound/arm/pxa2xx-ac97-lib.c
index 0a28e44118c5253054370b6d8117d8b61fa257fd..1e114dbcf93c94ef30b7b81c40ef9aa30d1271ff 100644
--- a/sound/arm/pxa2xx-ac97-lib.c
+++ b/sound/arm/pxa2xx-ac97-lib.c
@@ -13,10 +13,9 @@
 #include <linux/interrupt.h>
 #include <linux/clk.h>
 #include <linux/delay.h>
+#include <linux/gpio/consumer.h>
 #include <linux/module.h>
 #include <linux/io.h>
-#include <linux/gpio.h>
-#include <linux/of_gpio.h>
 #include <linux/soc/pxa/cpu.h>
 
 #include <sound/pxa2xx-lib.h>
@@ -31,6 +30,7 @@ static volatile long gsr_bits;
 static struct clk *ac97_clk;
 static struct clk *ac97conf_clk;
 static int reset_gpio;
+struct gpio_desc *rst_gpio;
 static void __iomem *ac97_reg_base;
 
 /*
@@ -329,11 +329,14 @@ int pxa2xx_ac97_hw_probe(struct platform_device *dev)
 	}
 
 	if (dev->dev.of_node) {
-		reset_gpio = of_get_named_gpio(dev->dev.of_node, "reset-gpios", 0);
-		if (reset_gpio == -ENOENT)
+		/* Assert reset using GPIOD_OUT_HIGH, because reset is GPIO_ACTIVE_LOW */
+		rst_gpio = devm_gpiod_get(&dev->dev, "reset", GPIOD_OUT_HIGH);
+		ret = PTR_ERR(rst_gpio);
+		if (ret == -ENOENT)
 			reset_gpio = -1;
-		else if (reset_gpio < 0)
-			return reset_gpio;
+		else if (ret)
+			return ret;
+		reset_gpio = desc_to_gpio(rst_gpio);
 	} else {
 		if (cpu_is_pxa27x())
 			reset_gpio = 113;
@@ -346,13 +349,7 @@ int pxa2xx_ac97_hw_probe(struct platform_device *dev)
 		 * here so that it is an output driven high when switching from
 		 * AC97_nRESET alt function to generic gpio.
 		 */
-		ret = gpio_request_one(reset_gpio, GPIOF_OUT_INIT_HIGH,
-				       "pxa27x ac97 reset");
-		if (ret < 0) {
-			pr_err("%s: gpio_request_one() failed: %d\n",
-			       __func__, ret);
-			goto err_conf;
-		}
+		gpiod_set_consumer_name(rst_gpio, "pxa27x ac97 reset");
 		pxa27x_configure_ac97reset(reset_gpio, false);
 
 		ac97conf_clk = clk_get(&dev->dev, "AC97CONFCLK");
@@ -403,8 +400,6 @@ EXPORT_SYMBOL_GPL(pxa2xx_ac97_hw_probe);
 
 void pxa2xx_ac97_hw_remove(struct platform_device *dev)
 {
-	if (cpu_is_pxa27x())
-		gpio_free(reset_gpio);
 	writel(readl(ac97_reg_base + GCR) | (GCR_ACLINK_OFF), ac97_reg_base + GCR);
 	free_irq(platform_get_irq(dev, 0), NULL);
 	if (ac97conf_clk) {

-- 
2.37.1


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

* Re: [PATCH 3/4] ASoC: pxa2xx-ac97: Remove platform_data
  2026-01-22 12:44 ` [PATCH 3/4] ASoC: pxa2xx-ac97: Remove platform_data Peng Fan (OSS)
@ 2026-01-22 14:58   ` Andy Shevchenko
  2026-01-22 15:01     ` Andy Shevchenko
  0 siblings, 1 reply; 13+ messages in thread
From: Andy Shevchenko @ 2026-01-22 14:58 UTC (permalink / raw)
  To: Peng Fan (OSS)
  Cc: Jaroslav Kysela, Takashi Iwai, Liam Girdwood, Mark Brown,
	Linus Walleij, Bartosz Golaszewski, Daniel Mack, Haojian Zhuang,
	Robert Jarzmik, linux-kernel, linux-sound, linux-gpio,
	linux-arm-kernel, Peng Fan

On Thu, Jan 22, 2026 at 08:44:59PM +0800, Peng Fan (OSS) wrote:

> Since commit d6df7df7ae5a0 ("ARM: pxa: remove unused board files"), there
> has been no in-tree user to create the device with platform data. So remove
> them.

I like the changes for PXA27x, but one important comment below.

...

> +	if (dev->dev.of_node) {
> +		reset_gpio = of_get_named_gpio(dev->dev.of_node, "reset-gpios", 0);
> +		if (reset_gpio == -ENOENT)
> +			reset_gpio = -1;
> +		else if (reset_gpio < 0)
> +			return reset_gpio;

No, please convert to devm_gpiod_get*() or even better to use reset-gpio driver.
TL;DR: no (reinstantiated) of_get_named_gpio() or alike must be in the kernel.

>  	} else {
>  		if (cpu_is_pxa27x())
>  			reset_gpio = 113;

-- 
With Best Regards,
Andy Shevchenko



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

* Re: [PATCH 2/4] ASoC: codec: Remove pxa2xx-ac97.c
  2026-01-22 12:44 ` [PATCH 2/4] ASoC: codec: Remove pxa2xx-ac97.c Peng Fan (OSS)
@ 2026-01-22 15:00   ` Andy Shevchenko
  2026-01-27  9:43   ` Bartosz Golaszewski
  1 sibling, 0 replies; 13+ messages in thread
From: Andy Shevchenko @ 2026-01-22 15:00 UTC (permalink / raw)
  To: Peng Fan (OSS)
  Cc: Jaroslav Kysela, Takashi Iwai, Liam Girdwood, Mark Brown,
	Linus Walleij, Bartosz Golaszewski, Daniel Mack, Haojian Zhuang,
	Robert Jarzmik, linux-kernel, linux-sound, linux-gpio,
	linux-arm-kernel, Peng Fan

On Thu, Jan 22, 2026 at 08:44:58PM +0800, Peng Fan (OSS) wrote:

> With commit ce79f3a1ad5f ("ARM: pxa: prune unused device support") and
> commit 2548e6c76ebf ("ARM: pxa: pxa2xx-ac97-lib: use IRQ resource"), there
> is no 'pxa2xx-ac97' platform device created by machine level code, so this
> driver could be removed.

So cool! Full support from me!
Acked-by: Andy Shevchenko <andriy.shevchenko@intel.com>

Would we able to clean up SPI PXA2xx headers after that? (We have SSI and SSP split)

-- 
With Best Regards,
Andy Shevchenko



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

* Re: [PATCH 3/4] ASoC: pxa2xx-ac97: Remove platform_data
  2026-01-22 14:58   ` Andy Shevchenko
@ 2026-01-22 15:01     ` Andy Shevchenko
  0 siblings, 0 replies; 13+ messages in thread
From: Andy Shevchenko @ 2026-01-22 15:01 UTC (permalink / raw)
  To: Peng Fan (OSS)
  Cc: Jaroslav Kysela, Takashi Iwai, Liam Girdwood, Mark Brown,
	Linus Walleij, Bartosz Golaszewski, Daniel Mack, Haojian Zhuang,
	Robert Jarzmik, linux-kernel, linux-sound, linux-gpio,
	linux-arm-kernel, Peng Fan

On Thu, Jan 22, 2026 at 04:58:59PM +0200, Andy Shevchenko wrote:
> On Thu, Jan 22, 2026 at 08:44:59PM +0800, Peng Fan (OSS) wrote:

...

> > +	if (dev->dev.of_node) {
> > +		reset_gpio = of_get_named_gpio(dev->dev.of_node, "reset-gpios", 0);
> > +		if (reset_gpio == -ENOENT)
> > +			reset_gpio = -1;
> > +		else if (reset_gpio < 0)
> > +			return reset_gpio;
> 
> No, please convert to devm_gpiod_get*() or even better to use reset-gpio driver.
> TL;DR: no (reinstantiated) of_get_named_gpio() or alike must be in the kernel.

Ah, you do it in the followup, right?
If that is the case (I'm going to look into it after this one)
Acked-by: Andy Shevchenko <andriy.shevchenko@intel.com>

And thanks for cleaning it up, eventually!

> >  	} else {
> >  		if (cpu_is_pxa27x())
> >  			reset_gpio = 113;

-- 
With Best Regards,
Andy Shevchenko



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

* Re: [PATCH 1/4] ASoC: codec: Remove ak4641
  2026-01-22 12:44 ` [PATCH 1/4] ASoC: codec: Remove ak4641 Peng Fan (OSS)
@ 2026-01-22 15:03   ` Andy Shevchenko
  2026-01-27  9:41   ` Bartosz Golaszewski
  1 sibling, 0 replies; 13+ messages in thread
From: Andy Shevchenko @ 2026-01-22 15:03 UTC (permalink / raw)
  To: Peng Fan (OSS)
  Cc: Jaroslav Kysela, Takashi Iwai, Liam Girdwood, Mark Brown,
	Linus Walleij, Bartosz Golaszewski, Daniel Mack, Haojian Zhuang,
	Robert Jarzmik, linux-kernel, linux-sound, linux-gpio,
	linux-arm-kernel, Peng Fan

On Thu, Jan 22, 2026 at 08:44:57PM +0800, Peng Fan (OSS) wrote:

> Since commit d6df7df7ae5a0 ("ARM: pxa: remove unused board files"), there
> has been no in-tree user of the AK4641 codec driver. The last user
> (HP iPAQ hx4700) was a non-DT PXA board file that instantiated the device
> via I2C board data; that code was removed as part of the PXA board-file
> purge.
> 
> The AK4641 driver was introduced ~2011 and still probes only via the I2C
> device-ID table ('.id_table'), without an 'of_match_table', so there are
> no upstream Devicetree users to retain. With no in-tree users left, remove
> the driver.

Yep, and if needed they may resurrect it, clean up and resubmit using proper
(modern) APIs.

Acked-by: Andy Shevchenko <andriy.shevchenko@intel.com>

-- 
With Best Regards,
Andy Shevchenko



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

* Re: [PATCH 4/4] ASoC: ac97: Convert to GPIO descriptors
  2026-01-22 12:45 ` [PATCH 4/4] ASoC: ac97: Convert to GPIO descriptors Peng Fan (OSS)
@ 2026-01-22 15:07   ` Andy Shevchenko
  0 siblings, 0 replies; 13+ messages in thread
From: Andy Shevchenko @ 2026-01-22 15:07 UTC (permalink / raw)
  To: Peng Fan (OSS)
  Cc: Jaroslav Kysela, Takashi Iwai, Liam Girdwood, Mark Brown,
	Linus Walleij, Bartosz Golaszewski, Daniel Mack, Haojian Zhuang,
	Robert Jarzmik, linux-kernel, linux-sound, linux-gpio,
	linux-arm-kernel, Peng Fan

On Thu, Jan 22, 2026 at 08:45:00PM +0800, Peng Fan (OSS) wrote:

> of_gpio.h is deprecated, update the driver to use GPIO descriptors.
>  - Use devm_gpiod_get to get GPIO descriptor, and set consumer
>    name.
> 
> Since the driver still pass the reset_gpio to pxa27x_configure_ac97reset,
> so use desc_to_gpio() to get it gpio id.

GPIO

Why can't we convert that one to use GPIO descriptor to begin with?

...


>  	if (dev->dev.of_node) {
> -		reset_gpio = of_get_named_gpio(dev->dev.of_node, "reset-gpios", 0);
> -		if (reset_gpio == -ENOENT)
> +		/* Assert reset using GPIOD_OUT_HIGH, because reset is GPIO_ACTIVE_LOW */
> +		rst_gpio = devm_gpiod_get(&dev->dev, "reset", GPIOD_OUT_HIGH);
> +		ret = PTR_ERR(rst_gpio);
> +		if (ret == -ENOENT)
>  			reset_gpio = -1;
> -		else if (reset_gpio < 0)
> -			return reset_gpio;
> +		else if (ret)
> +			return ret;
> +		reset_gpio = desc_to_gpio(rst_gpio);

Also, have you considered moving towards 'reset-gpio' driver?

...

And last but not least Q, have you checked gpiolib-of.c if there is any quirks
regarding this case (might be some fixes related to polarity)?

-- 
With Best Regards,
Andy Shevchenko



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

* Re: [PATCH 1/4] ASoC: codec: Remove ak4641
  2026-01-22 12:44 ` [PATCH 1/4] ASoC: codec: Remove ak4641 Peng Fan (OSS)
  2026-01-22 15:03   ` Andy Shevchenko
@ 2026-01-27  9:41   ` Bartosz Golaszewski
  1 sibling, 0 replies; 13+ messages in thread
From: Bartosz Golaszewski @ 2026-01-27  9:41 UTC (permalink / raw)
  To: Peng Fan (OSS)
  Cc: linux-kernel, linux-sound, linux-gpio, linux-arm-kernel, Peng Fan,
	Jaroslav Kysela, Takashi Iwai, Liam Girdwood, Mark Brown,
	Linus Walleij, Bartosz Golaszewski, Daniel Mack, Haojian Zhuang,
	Robert Jarzmik, Andy Shevchenko

On Thu, 22 Jan 2026 13:44:57 +0100, "Peng Fan (OSS)"
<peng.fan@oss.nxp.com> said:
> From: Peng Fan <peng.fan@nxp.com>
>
> Since commit d6df7df7ae5a0 ("ARM: pxa: remove unused board files"), there
> has been no in-tree user of the AK4641 codec driver. The last user
> (HP iPAQ hx4700) was a non-DT PXA board file that instantiated the device
> via I2C board data; that code was removed as part of the PXA board-file
> purge.
>
> The AK4641 driver was introduced ~2011 and still probes only via the I2C
> device-ID table ('.id_table'), without an 'of_match_table', so there are
> no upstream Devicetree users to retain. With no in-tree users left, remove
> the driver.
>
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---

Yes, please!

Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>

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

* Re: [PATCH 2/4] ASoC: codec: Remove pxa2xx-ac97.c
  2026-01-22 12:44 ` [PATCH 2/4] ASoC: codec: Remove pxa2xx-ac97.c Peng Fan (OSS)
  2026-01-22 15:00   ` Andy Shevchenko
@ 2026-01-27  9:43   ` Bartosz Golaszewski
  1 sibling, 0 replies; 13+ messages in thread
From: Bartosz Golaszewski @ 2026-01-27  9:43 UTC (permalink / raw)
  To: Peng Fan (OSS)
  Cc: linux-kernel, linux-sound, linux-gpio, linux-arm-kernel, Peng Fan,
	Jaroslav Kysela, Takashi Iwai, Liam Girdwood, Mark Brown,
	Linus Walleij, Bartosz Golaszewski, Daniel Mack, Haojian Zhuang,
	Robert Jarzmik, Andy Shevchenko

On Thu, 22 Jan 2026 13:44:58 +0100, "Peng Fan (OSS)"
<peng.fan@oss.nxp.com> said:
> From: Peng Fan <peng.fan@nxp.com>
>
> With commit ce79f3a1ad5f ("ARM: pxa: prune unused device support") and
> commit 2548e6c76ebf ("ARM: pxa: pxa2xx-ac97-lib: use IRQ resource"), there
> is no 'pxa2xx-ac97' platform device created by machine level code, so this
> driver could be removed.
>
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---

Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>

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

* Re: [PATCH 0/4] ASoC: codec: Remove ak4641/pxa2xx-ac97 and convert to GPIO descriptors
  2026-01-22 12:44 [PATCH 0/4] ASoC: codec: Remove ak4641/pxa2xx-ac97 and convert to GPIO descriptors Peng Fan (OSS)
                   ` (3 preceding siblings ...)
  2026-01-22 12:45 ` [PATCH 4/4] ASoC: ac97: Convert to GPIO descriptors Peng Fan (OSS)
@ 2026-01-28  3:02 ` Mark Brown
  4 siblings, 0 replies; 13+ messages in thread
From: Mark Brown @ 2026-01-28  3:02 UTC (permalink / raw)
  To: Jaroslav Kysela, Takashi Iwai, Liam Girdwood, Linus Walleij,
	Bartosz Golaszewski, Daniel Mack, Haojian Zhuang, Robert Jarzmik,
	Andy Shevchenko, Peng Fan (OSS)
  Cc: linux-kernel, linux-sound, linux-gpio, linux-arm-kernel, Peng Fan

On Thu, 22 Jan 2026 20:44:56 +0800, Peng Fan (OSS) wrote:
> The main goal is to convert drivers to use GPIO descriptors. While reading
> the code, I think it is time to remove ak4641 and pxa2xx-ac97 driver,
> more info could be found in commit log of each patch.
> Then only need to convert sound/arm/pxa2xx-ac97-lib.c to use GPIO
> descriptors. Not have hardware to test the pxa2xx ac97.
> 
> 
> [...]

Applied to

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

Thanks!

[1/4] ASoC: codec: Remove ak4641
      commit: d7e1f9e84af460c5f1e5352eda8f036000cfcf0a
[2/4] ASoC: codec: Remove pxa2xx-ac97.c
      commit: b094de7810f3c0340a3aebaf6b8fc60c81c0cf91
[3/4] ASoC: pxa2xx-ac97: Remove platform_data
      commit: be829277ef79aa626e952e17030d711bdb6c1eef
[4/4] ASoC: ac97: Convert to GPIO descriptors
      commit: c76d50b71e898694c946993eb3c77f50efa97254

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] 13+ messages in thread

end of thread, other threads:[~2026-01-28  3:02 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-22 12:44 [PATCH 0/4] ASoC: codec: Remove ak4641/pxa2xx-ac97 and convert to GPIO descriptors Peng Fan (OSS)
2026-01-22 12:44 ` [PATCH 1/4] ASoC: codec: Remove ak4641 Peng Fan (OSS)
2026-01-22 15:03   ` Andy Shevchenko
2026-01-27  9:41   ` Bartosz Golaszewski
2026-01-22 12:44 ` [PATCH 2/4] ASoC: codec: Remove pxa2xx-ac97.c Peng Fan (OSS)
2026-01-22 15:00   ` Andy Shevchenko
2026-01-27  9:43   ` Bartosz Golaszewski
2026-01-22 12:44 ` [PATCH 3/4] ASoC: pxa2xx-ac97: Remove platform_data Peng Fan (OSS)
2026-01-22 14:58   ` Andy Shevchenko
2026-01-22 15:01     ` Andy Shevchenko
2026-01-22 12:45 ` [PATCH 4/4] ASoC: ac97: Convert to GPIO descriptors Peng Fan (OSS)
2026-01-22 15:07   ` Andy Shevchenko
2026-01-28  3:02 ` [PATCH 0/4] ASoC: codec: Remove ak4641/pxa2xx-ac97 and convert " Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox