[v1,1/2] regmap-irq: Remove unused type_invert flag

Message ID 20230216223200.150679-1-aidanmacdonald.0x0@gmail.com
State New
Headers
Series [v1,1/2] regmap-irq: Remove unused type_invert flag |

Commit Message

Aidan MacDonald Feb. 16, 2023, 10:31 p.m. UTC
  type_invert is deprecated and no longer used; it can now be removed.

Signed-off-by: Aidan MacDonald <aidanmacdonald.0x0@gmail.com>
---
 drivers/base/regmap/regmap-irq.c | 11 ++---------
 include/linux/regmap.h           |  3 ---
 2 files changed, 2 insertions(+), 12 deletions(-)
  

Comments

Mark Brown Feb. 17, 2023, 2:15 a.m. UTC | #1
On Thu, 16 Feb 2023 22:31:59 +0000, Aidan MacDonald wrote:
> type_invert is deprecated and no longer used; it can now be removed.
> 
> 

Applied to

   broonie/regmap.git for-next

Thanks!

[1/2] regmap-irq: Remove unused type_invert flag
      commit: 483e6ea1b35aaeffd9b6e6e660d756be49c2a9f5
[2/2] regmap-irq: Remove unused mask_invert flag
      commit: c74e7af1245b2073930afc9a2a340d91e08f0f14

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark
  

Patch

diff --git a/drivers/base/regmap/regmap-irq.c b/drivers/base/regmap/regmap-irq.c
index a8f185430a07..e3092f522107 100644
--- a/drivers/base/regmap/regmap-irq.c
+++ b/drivers/base/regmap/regmap-irq.c
@@ -189,12 +189,8 @@  static void regmap_irq_sync_unlock(struct irq_data *data)
 			if (!d->type_buf_def[i])
 				continue;
 			reg = d->get_irq_reg(d, d->chip->type_base, i);
-			if (d->chip->type_invert)
-				ret = regmap_update_bits(d->map, reg,
-					d->type_buf_def[i], ~d->type_buf[i]);
-			else
-				ret = regmap_update_bits(d->map, reg,
-					d->type_buf_def[i], d->type_buf[i]);
+			ret = regmap_update_bits(d->map, reg,
+						 d->type_buf_def[i], d->type_buf[i]);
 			if (ret != 0)
 				dev_err(d->map->dev, "Failed to sync type in %x\n",
 					reg);
@@ -1028,9 +1024,6 @@  int regmap_add_irq_chip_fwnode(struct fwnode_handle *fwnode,
 
 			ret = regmap_read(map, reg, &d->type_buf_def[i]);
 
-			if (d->chip->type_invert)
-				d->type_buf_def[i] = ~d->type_buf_def[i];
-
 			if (ret) {
 				dev_err(map->dev, "Failed to get type defaults at 0x%x: %d\n",
 					reg, ret);
diff --git a/include/linux/regmap.h b/include/linux/regmap.h
index a3bc695bcca0..2114679729ce 100644
--- a/include/linux/regmap.h
+++ b/include/linux/regmap.h
@@ -1547,8 +1547,6 @@  struct regmap_irq_chip_data;
  * @ack_invert:  Inverted ack register: cleared bits for ack.
  * @clear_ack:  Use this to set 1 and 0 or vice-versa to clear interrupts.
  * @wake_invert: Inverted wake register: cleared bits are wake enabled.
- * @type_invert: Invert the type flags. Deprecated, use config registers
- *		 instead.
  * @type_in_mask: Use the mask registers for controlling irq type. Use this if
  *		  the hardware provides separate bits for rising/falling edge
  *		  or low/high level interrupts and they should be combined into
@@ -1625,7 +1623,6 @@  struct regmap_irq_chip {
 	unsigned int clear_ack:1;
 	unsigned int wake_invert:1;
 	unsigned int runtime_pm:1;
-	unsigned int type_invert:1;
 	unsigned int type_in_mask:1;
 	unsigned int clear_on_unmask:1;
 	unsigned int not_fixed_stride:1;