summaryrefslogtreecommitdiff
path: root/include/linux/regmap.h
diff options
context:
space:
mode:
authorAidan MacDonald <aidanmacdonald.0x0@gmail.com>2022-06-23 22:14:14 +0100
committerMark Brown <broonie@kernel.org>2022-06-29 18:13:11 +0100
commitad22b3e98f9430896bd4bd8f4fbff4667f02a0c8 (patch)
treed30cf70ebd15c61d4794eb61e3c4fec22e00a2e7 /include/linux/regmap.h
parent6b0c31747722936101d56e71e809bfd7a6a440b7 (diff)
regmap-irq: Remove mask_writeonly and regmap_irq_update_bits()
Commit a71411dbf6c8 ("regmap: irq: add chip option mask_writeonly") introduced the mask_writeonly option, but it isn't used now and it appears it's never been used by any in-tree drivers. The motivation for the option is mentioned in the commit message, Some irq controllers have writeonly/multipurpose register layouts. In those cases we read invalid data back. [...] The option causes mask register updates to use regmap_write_bits() instead of regmap_update_bits(). However, regmap_write_bits() doesn't solve the reading invalid data problem. It's still a read-modify-write op like regmap_update_bits(). The difference is that 'update bits' will only write the new value if it is different from the current value, while 'write bits' will write the new value unconditionally, even if it's the same as the current value. This seems like a bit of a specialized use case and probably isn't that useful for regmap-irq, so let's just remove the option and go back to using an 'update bits' op for the mask registers. We can always add the option back if some driver ends up needing it in the future. Signed-off-by: Aidan MacDonald <aidanmacdonald.0x0@gmail.com> Link: https://lore.kernel.org/r/20220623211420.918875-7-aidanmacdonald.0x0@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/linux/regmap.h')
-rw-r--r--include/linux/regmap.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/include/linux/regmap.h b/include/linux/regmap.h
index b404c59b3b20..6489b3610362 100644
--- a/include/linux/regmap.h
+++ b/include/linux/regmap.h
@@ -1468,7 +1468,6 @@ struct regmap_irq_sub_irq_map {
*
* @status_base: Base status register address.
* @mask_base: Base mask register address.
- * @mask_writeonly: Base mask register is write only.
* @unmask_base: Base unmask register address. for chips who have
* separate mask and unmask registers
* @ack_base: Base ack address. If zero then the chip is clear on read.
@@ -1534,7 +1533,6 @@ struct regmap_irq_chip {
unsigned int type_base;
unsigned int *virt_reg_base;
unsigned int irq_reg_stride;
- unsigned int mask_writeonly:1;
unsigned int init_ack_masked:1;
unsigned int mask_invert:1;
unsigned int use_ack:1;