Skip to content

Commit 0cd1860

Browse files
Aidan MacDonaldlag-linaro
authored andcommitted
mfd: wcd934x: Convert irq chip to config regs
Type registers are deprecated and will eventually be removed from regmap-irq. The same functionality can be replicated with config registers. Signed-off-by: Aidan MacDonald <[email protected]> Signed-off-by: Lee Jones <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 50ff095 commit 0cd1860

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

drivers/mfd/wcd934x.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,17 +55,22 @@ static const struct regmap_irq wcd934x_irqs[] = {
5555
WCD934X_REGMAP_IRQ_REG(WCD934X_IRQ_SOUNDWIRE, 2, BIT(4)),
5656
};
5757

58+
static const unsigned int wcd934x_config_regs[] = {
59+
WCD934X_INTR_LEVEL0,
60+
};
61+
5862
static const struct regmap_irq_chip wcd934x_regmap_irq_chip = {
5963
.name = "wcd934x_irq",
6064
.status_base = WCD934X_INTR_PIN1_STATUS0,
6165
.mask_base = WCD934X_INTR_PIN1_MASK0,
6266
.ack_base = WCD934X_INTR_PIN1_CLEAR0,
63-
.type_base = WCD934X_INTR_LEVEL0,
64-
.num_type_reg = 4,
65-
.type_in_mask = false,
6667
.num_regs = 4,
6768
.irqs = wcd934x_irqs,
6869
.num_irqs = ARRAY_SIZE(wcd934x_irqs),
70+
.config_base = wcd934x_config_regs,
71+
.num_config_bases = ARRAY_SIZE(wcd934x_config_regs),
72+
.num_config_regs = 4,
73+
.set_type_config = regmap_irq_set_type_config_simple,
6974
};
7075

7176
static bool wcd934x_is_volatile_register(struct device *dev, unsigned int reg)

0 commit comments

Comments
 (0)