linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 00/12] AC97 device/driver model revamp
@ 2017-07-24 20:49 Robert Jarzmik
  2017-07-24 20:49 ` [PATCH v4 01/12] ALSA: ac97: split out the generic ac97 registers Robert Jarzmik
                   ` (11 more replies)
  0 siblings, 12 replies; 20+ messages in thread
From: Robert Jarzmik @ 2017-07-24 20:49 UTC (permalink / raw)
  To: Dmitry Torokhov, Lee Jones, Jaroslav Kysela, Takashi Iwai,
	Daniel Mack, Haojian Zhuang, Robert Jarzmik, Liam Girdwood,
	Mark Brown, Lars-Peter Clausen, Charles Keepax
  Cc: alsa-devel, patches, linux-kernel, linux-arm-kernel, linux-input

Hi Lars, Mark, Charles, Lee,

This is a minor revision after v3, mainly reviews from Takashi, Charles.

I did more extensive testing of load/unload of the whole serie, and apart from a
bug in wm97xx-core in touchscreen tree (for a which a patch will be sent apart),
it seems to work properly. I extracted the diff from the v3 of sound/ac97 which
is in [1] for easier spotting of what has globally changed.

I would still need a review from you, Lee, for the mfd patch (patch 6/12).

Happy review.

--
Robert

Robert Jarzmik (12):
  ALSA: ac97: split out the generic ac97 registers
  ALSA: ac97: add an ac97 bus
  ASoC: add new ac97 bus support
  ASoC: arm: make pxa2xx-ac97-lib ac97 codec agnostic
  Input: wm97xx: split out touchscreen registering
  mfd: wm97xx-core: core support for wm97xx Codec
  Input: wm97xx: add new AC97 bus support
  ASoC: wm9713: add ac97 new bus support
  ASoC: wm9712: add ac97 new bus support
  ASoC: wm9705: add private structure
  ASoC: wm9705: add ac97 new bus support
  ASoC: pxa: switch to new ac97 bus support

 drivers/input/touchscreen/Kconfig       |   2 +-
 drivers/input/touchscreen/wm97xx-core.c | 252 ++++++++++-----
 drivers/mfd/Kconfig                     |  15 +
 drivers/mfd/Makefile                    |   1 +
 drivers/mfd/wm97xx-core.c               | 405 ++++++++++++++++++++++++
 include/linux/mfd/wm97xx.h              |  31 ++
 include/sound/ac97/codec.h              | 118 +++++++
 include/sound/ac97/compat.h             |  21 ++
 include/sound/ac97/controller.h         |  84 +++++
 include/sound/ac97/regs.h               | 262 +++++++++++++++
 include/sound/ac97_codec.h              | 239 +-------------
 include/sound/pxa2xx-lib.h              |  15 +-
 sound/Kconfig                           |   2 +
 sound/Makefile                          |   1 +
 sound/ac97/Kconfig                      |  19 ++
 sound/ac97/Makefile                     |   8 +
 sound/ac97/ac97_core.h                  |  10 +
 sound/ac97/bus.c                        | 542 ++++++++++++++++++++++++++++++++
 sound/ac97/codec.c                      |  15 +
 sound/ac97/snd_ac97_compat.c            | 105 +++++++
 sound/arm/Kconfig                       |   1 -
 sound/arm/pxa2xx-ac97-lib.c             |  37 ++-
 sound/arm/pxa2xx-ac97.c                 |  35 ++-
 sound/soc/codecs/Kconfig                |   9 +-
 sound/soc/codecs/wm9705.c               |  59 ++--
 sound/soc/codecs/wm9712.c               |  37 ++-
 sound/soc/codecs/wm9713.c               |  39 ++-
 sound/soc/pxa/Kconfig                   |   5 +-
 sound/soc/pxa/pxa2xx-ac97.c             |  46 ++-
 29 files changed, 2001 insertions(+), 414 deletions(-)
 create mode 100644 drivers/mfd/wm97xx-core.c
 create mode 100644 include/linux/mfd/wm97xx.h
 create mode 100644 include/sound/ac97/codec.h
 create mode 100644 include/sound/ac97/compat.h
 create mode 100644 include/sound/ac97/controller.h
 create mode 100644 include/sound/ac97/regs.h
 create mode 100644 sound/ac97/Kconfig
 create mode 100644 sound/ac97/Makefile
 create mode 100644 sound/ac97/ac97_core.h
 create mode 100644 sound/ac97/bus.c
 create mode 100644 sound/ac97/codec.c
 create mode 100644 sound/ac97/snd_ac97_compat.c

-- 
2.11.0

[1] sound diff from last revision
   (git diff submit/ac97-2..submit/ac97-3 sound/ac97 include/sound/ac97)
diff --git a/sound/ac97/bus.c b/sound/ac97/bus.c
index 7cda8175341e..af618a0e89cb 100644
--- a/sound/ac97/bus.c
+++ b/sound/ac97/bus.c
@@ -76,7 +76,6 @@ static void ac97_codec_release(struct device *dev)
 	adev = to_ac97_device(dev);
 	ac97_ctrl = adev->ac97_ctrl;
 	ac97_ctrl->codecs[adev->num] = NULL;
-	sysfs_remove_link(&dev->kobj, "ac97_controller");
 	kfree(adev);
 }
 
@@ -269,8 +268,29 @@ static const struct attribute_group *ac97_adapter_groups[] = {
 	NULL,
 };
 
+static void ac97_del_adapter(struct ac97_controller *ac97_ctrl)
+{
+	mutex_lock(&ac97_controllers_mutex);
+	ac97_ctrl_codecs_unregister(ac97_ctrl);
+	list_del(&ac97_ctrl->controllers);
+	mutex_unlock(&ac97_controllers_mutex);
+
+	device_unregister(&ac97_ctrl->adap);
+}
+
+static void ac97_adapter_release(struct device *dev)
+{
+	struct ac97_controller *ac97_ctrl;
+
+	ac97_ctrl = to_ac97_controller(dev);
+	idr_remove(&ac97_adapter_idr, ac97_ctrl->nr);
+	dev_dbg(&ac97_ctrl->adap, "adapter unregistered by %s\n",
+		dev_name(ac97_ctrl->parent));
+}
+
 static const struct device_type ac97_adapter_type = {
 	.groups		= ac97_adapter_groups,
+	.release	= ac97_adapter_release,
 };
 
 static int ac97_add_adapter(struct ac97_controller *ac97_ctrl)
@@ -298,16 +318,6 @@ static int ac97_add_adapter(struct ac97_controller *ac97_ctrl)
 	return ret;
 }
 
-static void ac97_del_adapter(struct ac97_controller *ac97_ctrl)
-{
-	mutex_lock(&ac97_controllers_mutex);
-	ac97_ctrl_codecs_unregister(ac97_ctrl);
-	list_del(&ac97_ctrl->controllers);
-	idr_remove(&ac97_adapter_idr, ac97_ctrl->nr);
-	mutex_unlock(&ac97_controllers_mutex);
-	put_device(&ac97_ctrl->adap);
-}
-
 /**
  * snd_ac97_controller_register - register an ac97 controller
  * @ops: the ac97 bus operations
@@ -508,7 +518,7 @@ static int ac97_bus_remove(struct device *dev)
 }
 
 static struct bus_type ac97_bus_type = {
-	.name		= "ac97",
+	.name		= "ac97bus",
 	.dev_groups	= ac97_dev_groups,
 	.match		= ac97_bus_match,
 	.pm		= &ac97_pm,
@@ -522,5 +532,11 @@ static int __init ac97_bus_init(void)
 }
 subsys_initcall(ac97_bus_init);
 
+static void __exit ac97_bus_exit(void)
+{
+	bus_unregister(&ac97_bus_type);
+}
+module_exit(ac97_bus_exit);
+
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Robert Jarzmik <robert.jarzmik@free.fr>");

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

end of thread, other threads:[~2017-09-04 17:25 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-24 20:49 [PATCH v4 00/12] AC97 device/driver model revamp Robert Jarzmik
2017-07-24 20:49 ` [PATCH v4 01/12] ALSA: ac97: split out the generic ac97 registers Robert Jarzmik
2017-07-24 20:49 ` [PATCH v4 02/12] ALSA: ac97: add an ac97 bus Robert Jarzmik
2017-07-25 21:42   ` Takashi Iwai
2017-07-27 20:59     ` Robert Jarzmik
2017-07-24 20:49 ` [PATCH v4 03/12] ASoC: add new ac97 bus support Robert Jarzmik
2017-09-04 17:25   ` Applied "ASoC: add new ac97 bus support" to the asoc tree Mark Brown
2017-07-24 20:49 ` [PATCH v4 04/12] ASoC: arm: make pxa2xx-ac97-lib ac97 codec agnostic Robert Jarzmik
2017-07-24 20:49 ` [PATCH v4 05/12] Input: wm97xx: split out touchscreen registering Robert Jarzmik
2017-07-24 20:49 ` [PATCH v4 06/12] mfd: wm97xx-core: core support for wm97xx Codec Robert Jarzmik
2017-07-25 10:17   ` Charles Keepax
2017-07-24 20:49 ` [PATCH v4 07/12] Input: wm97xx: add new AC97 bus support Robert Jarzmik
2017-07-24 20:49 ` [PATCH v4 08/12] ASoC: wm9713: add ac97 new " Robert Jarzmik
2017-07-25 10:18   ` Charles Keepax
2017-07-24 20:49 ` [PATCH v4 09/12] ASoC: wm9712: " Robert Jarzmik
2017-07-25 10:20   ` Charles Keepax
2017-07-28 22:14     ` Robert Jarzmik
2017-07-24 20:49 ` [PATCH v4 10/12] ASoC: wm9705: add private structure Robert Jarzmik
2017-07-24 20:49 ` [PATCH v4 11/12] ASoC: wm9705: add ac97 new bus support Robert Jarzmik
2017-07-24 20:49 ` [PATCH v4 12/12] ASoC: pxa: switch to new ac97 " Robert Jarzmik

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).