diff options
author | Aidan MacDonald <aidanmacdonald.0x0@gmail.com> | 2022-07-21 11:25:57 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2022-08-28 20:20:01 +0100 |
commit | 255a03bb1bb3b10d1c1ca785c596db84723f59d7 (patch) | |
tree | bd59c366a9eaa2c0ee62c070df6939c1e1bc2972 | |
parent | cd3b9a0f205249c3e7482270b695b90ecf382187 (diff) | |
download | linux-stable-255a03bb1bb3b10d1c1ca785c596db84723f59d7.tar.gz linux-stable-255a03bb1bb3b10d1c1ca785c596db84723f59d7.tar.bz2 linux-stable-255a03bb1bb3b10d1c1ca785c596db84723f59d7.zip |
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 <aidanmacdonald.0x0@gmail.com>
Link: https://lore.kernel.org/r/20220721102558.25457-2-aidanmacdonald.0x0@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | sound/soc/codecs/wcd9335.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sound/soc/codecs/wcd9335.c b/sound/soc/codecs/wcd9335.c index beeeb35e8032..2c5aa4df1e66 100644 --- a/sound/soc/codecs/wcd9335.c +++ b/sound/soc/codecs/wcd9335.c @@ -5013,16 +5013,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) |