Skip to content

Commit 255a03b

Browse files
Aidan MacDonaldbroonie
authored andcommitted
ASoC: 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. Signed-off-by: Aidan MacDonald <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent cd3b9a0 commit 255a03b

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

sound/soc/codecs/wcd9335.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5013,16 +5013,22 @@ static const struct regmap_irq wcd9335_codec_irqs[] = {
50135013
},
50145014
};
50155015

5016+
static const unsigned int wcd9335_config_regs[] = {
5017+
WCD9335_INTR_LEVEL0,
5018+
};
5019+
50165020
static const struct regmap_irq_chip wcd9335_regmap_irq1_chip = {
50175021
.name = "wcd9335_pin1_irq",
50185022
.status_base = WCD9335_INTR_PIN1_STATUS0,
50195023
.mask_base = WCD9335_INTR_PIN1_MASK0,
50205024
.ack_base = WCD9335_INTR_PIN1_CLEAR0,
5021-
.type_base = WCD9335_INTR_LEVEL0,
5022-
.num_type_reg = 4,
50235025
.num_regs = 4,
50245026
.irqs = wcd9335_codec_irqs,
50255027
.num_irqs = ARRAY_SIZE(wcd9335_codec_irqs),
5028+
.config_base = wcd9335_config_regs,
5029+
.num_config_bases = ARRAY_SIZE(wcd9335_config_regs),
5030+
.num_config_regs = 4,
5031+
.set_type_config = regmap_irq_set_type_config_simple,
50265032
};
50275033

50285034
static int wcd9335_parse_dt(struct wcd9335_codec *wcd)

0 commit comments

Comments
 (0)