Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'regmap-fix-v5.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap

Pull regmap fixes from Mark Brown:
"The cleanups for the way we handle type information introduced during
the merge window revealed that we'd been abusing the irq APIs for a
long time, causing breakage for systems.

This has a couple of minimal fixes for that which restore the previous
behaviour for the time being, we'll fix it properly for v5.1 but
that'd be a bit much to do as a bug fix"

* tag 'regmap-fix-v5.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap:
regmap-irq: do not write mask register if mask_base is zero
regmap: regmap-irq: silently ignore unsupported type settings

+7 -1
+7 -1
drivers/base/regmap/regmap-irq.c
··· 108 108 * suppress pointless writes. 109 109 */ 110 110 for (i = 0; i < d->chip->num_regs; i++) { 111 + if (!d->chip->mask_base) 112 + continue; 113 + 111 114 reg = d->chip->mask_base + 112 115 (i * map->reg_stride * d->irq_reg_stride); 113 116 if (d->chip->mask_invert) { ··· 261 258 const struct regmap_irq_type *t = &irq_data->type; 262 259 263 260 if ((t->types_supported & type) != type) 264 - return -ENOTSUPP; 261 + return 0; 265 262 266 263 reg = t->type_reg_offset / map->reg_stride; 267 264 ··· 591 588 /* Mask all the interrupts by default */ 592 589 for (i = 0; i < chip->num_regs; i++) { 593 590 d->mask_buf[i] = d->mask_buf_def[i]; 591 + if (!chip->mask_base) 592 + continue; 593 + 594 594 reg = chip->mask_base + 595 595 (i * map->reg_stride * d->irq_reg_stride); 596 596 if (chip->mask_invert)