Skip to contentSkip to conversation

ASoC: Cleanup deprecated regmap-irq functionality

PATCH In review Aidan MacDonald 2 participants 5 messages Jul 21, 2022 – Aug 28, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover ASoC: Cleanup deprecated regmap-irq functionality

Update two ASoC codec drivers to remove uses of regmap-irq type registers, which have recently been deprecated by the "regmap-irq cleanups and refactoring" series in linux-next.

Aidan MacDonald (2):
sound: soc: codecs: wcd9335: Convert irq chip to config regs
sound: soc: codecs: wcd938x: Remove spurious type_base from irq chip

 sound/soc/codecs/wcd9335.c | 10 ++++++++--
 sound/soc/codecs/wcd938x.c |  1 -
 2 files changed, 8 insertions(+), 3 deletions(-)

base-commit: 353f7988dd8413c47718f7ca79c030b6fb62cfe5
prerequisite-patch-id: a45db1cac7537769dc10087fc61f977dc150744c
prerequisite-patch-id: cb8aa009c7bb7a6575eb05e3af65342dc8d0efa3
prerequisite-patch-id: 8d32557e53b894d1fb17250d2d0eb3673f068d37
prerequisite-patch-id: 5b293867ef81e3697892ac51b941bb53680a70dc
prerequisite-patch-id: 8138d39a4817e804141bfe8c2ad37d9c55456a40
prerequisite-patch-id: b01216129e887519d441cf556bbc75c397871773
prerequisite-patch-id: b5dcf0c0609113c2d81bc557c1fc95ef23f40811
prerequisite-patch-id: 622ca1c10e851b1889aaa567c1d2a0adf43cca44
prerequisite-patch-id: d28c5187f9bf0e43f27b2f4aa8dcf7fd91842a03
prerequisite-patch-id: d29d54b756be73304f844abeeaf9b46a5c0119d5
prerequisite-patch-id: 5d405790ae89c0831b46a359f86e94bac5a67470
prerequisite-patch-id: c90120e79acbb52ffa148bfedee1df9d35b5eced
prerequisite-patch-id: 2e35247a5cfe5a28565c9272b85fc6835011b032

Signature · 1 line
2.35.1
#1 lore raw

PATCH 1/2 sound: soc: codecs: wcd9335: Convert irq chip to config regs

Type registers in regmap-irq have been deprecated in favor of config registers, which are more general. Chips using type_base can switch over to a single config base register and a standard ->set_irq_type() callback provided by regmap-irq, which uses the type info associated with each 'struct regmap_irq' to update type registers in the same way as the old code did.

---
 sound/soc/codecs/wcd9335.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
sound/soc/codecs/wcd9335.c +8 -2
index 3cb7a3eab8c7..81678c85ff7b 100644
@@ -5031,16 +5031,22 @@ static const struct regmap_irq wcd9335_codec_irqs[] = {
 	},
 };
 
+static const unsigned int wcd9335_config_regs[] = {
+	WCD9335_INTR_LEVEL0,
+};
+
 static const struct regmap_irq_chip wcd9335_regmap_irq1_chip = {
 	.name = "wcd9335_pin1_irq",
 	.status_base = WCD9335_INTR_PIN1_STATUS0,
 	.mask_base = WCD9335_INTR_PIN1_MASK0,
 	.ack_base = WCD9335_INTR_PIN1_CLEAR0,
-	.type_base = WCD9335_INTR_LEVEL0,
-	.num_type_reg = 4,
 	.num_regs = 4,
 	.irqs = wcd9335_codec_irqs,
 	.num_irqs = ARRAY_SIZE(wcd9335_codec_irqs),
+	.config_base = wcd9335_config_regs,
+	.num_config_bases = ARRAY_SIZE(wcd9335_config_regs),
+	.num_config_regs = 4,
+	.set_type_config = regmap_irq_set_type_config_simple,
 };
 
 static int wcd9335_parse_dt(struct wcd9335_codec *wcd)
Signature · 1 line
2.35.1
#2 lore raw

PATCH 2/2 sound: soc: codecs: wcd938x: Remove spurious type_base from irq chip

In reply to Aidan MacDonald

There is no reason to set type_base here: the chip doesn't set num_type_regs and none of the IRQs have type information so it's not possible for regmap-irq to configure IRQ types.

Type registers are also deprecated in regmap-irq, so any IRQ type support in the future should be implemented using config registers instead.

---
 sound/soc/codecs/wcd938x.c | 1 -
 1 file changed, 1 deletion(-)
sound/soc/codecs/wcd938x.c +0 -1
index 781ae569be29..aca06a4026f3 100644
@@ -1298,7 +1298,6 @@ static struct regmap_irq_chip wcd938x_regmap_irq_chip = {
 	.num_regs = 3,
 	.status_base = WCD938X_DIGITAL_INTR_STATUS_0,
 	.mask_base = WCD938X_DIGITAL_INTR_MASK_0,
-	.type_base = WCD938X_DIGITAL_INTR_LEVEL_0,
 	.ack_base = WCD938X_DIGITAL_INTR_CLEAR_0,
 	.use_ack = 1,
 	.runtime_pm = true,
Signature · 1 line
2.35.1
maintainer
#3 lore raw
In reply to Aidan MacDonald
Quoted 9 lines · Aidan MacDonald

Update two ASoC codec drivers to remove uses of regmap-irq type registers, which have recently been deprecated by the "regmap-irq cleanups and refactoring" series in linux-next.

Aidan MacDonald (2):
sound: soc: codecs: wcd9335: Convert irq chip to config regs
sound: soc: codecs: wcd938x: Remove spurious type_base from irq chip

Please submit patches using subject lines reflecting the style for the subsystem, this makes it easier for people to identify relevant patches. Look at what existing commits in the area you're changing are doing and make sure your subject lines visually resemble what they're doing. There's no need to resubmit to fix this alone.

maintainer
#4 lore raw
In reply to Aidan MacDonald
Quoted 11 lines · Aidan MacDonald

Update two ASoC codec drivers to remove uses of regmap-irq type registers, which have recently been deprecated by the "regmap-irq cleanups and refactoring" series in linux-next.

Aidan MacDonald (2):
sound: soc: codecs: wcd9335: Convert irq chip to config regs
sound: soc: codecs: wcd938x: Remove spurious type_base from irq chip

[...]

Applied to

broonie/sound.git for-next

Thanks!

[1/2] sound: soc: codecs: wcd9335: Convert irq chip to config regs

      commit: 255a03bb1bb3b10d1c1ca785c596db84723f59d7
[2/2] sound: soc: codecs: wcd938x: Remove spurious type_base from irq chip
      commit: de3287f177a5666409978a1a0331a33e2842d43b

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