Commit 0cd1860e authored by Aidan MacDonald's avatar Aidan MacDonald Committed by Lee Jones
Browse files

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: default avatarAidan MacDonald <aidanmacdonald.0x0@gmail.com>
Signed-off-by: default avatarLee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20221112151835.39059-19-aidanmacdonald.0x0@gmail.com
parent 50ff095b
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -55,17 +55,22 @@ static const struct regmap_irq wcd934x_irqs[] = {
	WCD934X_REGMAP_IRQ_REG(WCD934X_IRQ_SOUNDWIRE, 2, BIT(4)),
};

static const unsigned int wcd934x_config_regs[] = {
	WCD934X_INTR_LEVEL0,
};

static const struct regmap_irq_chip wcd934x_regmap_irq_chip = {
	.name = "wcd934x_irq",
	.status_base = WCD934X_INTR_PIN1_STATUS0,
	.mask_base = WCD934X_INTR_PIN1_MASK0,
	.ack_base = WCD934X_INTR_PIN1_CLEAR0,
	.type_base = WCD934X_INTR_LEVEL0,
	.num_type_reg = 4,
	.type_in_mask = false,
	.num_regs = 4,
	.irqs = wcd934x_irqs,
	.num_irqs = ARRAY_SIZE(wcd934x_irqs),
	.config_base = wcd934x_config_regs,
	.num_config_bases = ARRAY_SIZE(wcd934x_config_regs),
	.num_config_regs = 4,
	.set_type_config = regmap_irq_set_type_config_simple,
};

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