diff options
author | Xiaofan Tian <tianxf@marvell.com> | 2012-08-30 05:03:35 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-08-30 14:13:41 -0400 |
commit | 36ac914ba2a5f1a14c5e0bf5d33bc20016d50940 (patch) | |
tree | 44535bd6b9ddab5abf4a354d6b3bbe46a1ab03a1 /include/linux/regmap.h | |
parent | 7a97637988c355646e730bcf0e6d548619112cdd (diff) |
regmap: irq: Add mask invert flag for enable register
Currently, regmap will write 1 to mask_base to mask
an interrupt and write 0 to unmask it.
But some chips do not have an interrupt mask register,
and only have interrupt enable register.
Then we should write 0 to disable interrupt and 1 to enable.
So add an mask_invert flag to handle this.
If it is not set, behavior is same as previous.
If set it to 1, the mask value will be inverted
before written to mask_base
Signed-off-by: Xiaofan Tian <tianxf@marvell.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'include/linux/regmap.h')
-rw-r--r-- | include/linux/regmap.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/regmap.h b/include/linux/regmap.h index 9c4c9c673f38..e3bcc3f4dcb8 100644 --- a/include/linux/regmap.h +++ b/include/linux/regmap.h | |||
@@ -300,6 +300,7 @@ struct regmap_irq_chip { | |||
300 | unsigned int ack_base; | 300 | unsigned int ack_base; |
301 | unsigned int wake_base; | 301 | unsigned int wake_base; |
302 | unsigned int irq_reg_stride; | 302 | unsigned int irq_reg_stride; |
303 | unsigned int mask_invert; | ||
303 | bool runtime_pm; | 304 | bool runtime_pm; |
304 | 305 | ||
305 | int num_regs; | 306 | int num_regs; |