[PATCH 44/49] regmap-irq: Remove broken_mask_unmask flag

Aidan MacDonald aidanmacdonald.0x0 at gmail.com
Mon Jun 20 13:06:39 PDT 2022


Drop broken_mask_unmask flag; no drivers are relying on it anymore.

Signed-off-by: Aidan MacDonald <aidanmacdonald.0x0 at gmail.com>
---
 drivers/base/regmap/regmap-irq.c | 9 +--------
 include/linux/regmap.h           | 1 -
 2 files changed, 1 insertion(+), 9 deletions(-)

diff --git a/drivers/base/regmap/regmap-irq.c b/drivers/base/regmap/regmap-irq.c
index 082a2981120c..8a718615fd09 100644
--- a/drivers/base/regmap/regmap-irq.c
+++ b/drivers/base/regmap/regmap-irq.c
@@ -723,15 +723,8 @@ int regmap_add_irq_chip_fwnode(struct fwnode_handle *fwnode,
 
 	/*
 	 * Swap role of mask_base and unmask_base if mask bits are inverted.
-	 *
-	 * Historically, chips that specify both mask_base and unmask_base
-	 * got inverted mask behavior; this was arguably a bug in regmap-irq
-	 * and there was no way to get the normal, non-inverted behavior.
-	 * Those chips will set the broken_mask_unmask flag. They don't set
-	 * mask_invert so there is no need to worry about interactions with
-	 * that flag.
 	 */
-	if (chip->mask_invert || chip->broken_mask_unmask) {
+	if (chip->mask_invert) {
 		d->mask_base = chip->unmask_base;
 		d->unmask_base = chip->mask_base;
 	} else {
diff --git a/include/linux/regmap.h b/include/linux/regmap.h
index 0cf3c4a66946..a3103c88e936 100644
--- a/include/linux/regmap.h
+++ b/include/linux/regmap.h
@@ -1524,7 +1524,6 @@ struct regmap_irq_chip {
 	bool clear_on_unmask:1;
 	bool not_fixed_stride:1;
 	bool status_invert:1;
-	bool broken_mask_unmask:1;
 
 	int num_regs;
 
-- 
2.35.1




More information about the linux-arm-kernel mailing list