aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/regmap.h
diff options
context:
space:
mode:
authorAlexander Shiyan <shc_work@mail.ru>2013-12-15 04:36:51 -0500
committerMark Brown <broonie@linaro.org>2013-12-16 15:50:13 -0500
commitd3233433356aa1965b60b08ee61465b20e50474b (patch)
treecd693a91f65f5c2aa937047459fd6f3d49fcd719 /include/linux/regmap.h
parent319e2e3f63c348a9b66db4667efa73178e18b17d (diff)
regmap: irq: Allow using zero value for ack_base
In some cases, clear interrupt register may be at address 0. This patch allows to use such configurations by adding additional configuration bit to indicate this. [With doc fix from Levente Kurusa <levex@linux.com> -- broonie] Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'include/linux/regmap.h')
-rw-r--r--include/linux/regmap.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/regmap.h b/include/linux/regmap.h
index e55907804d39..c9e5fb197eb6 100644
--- a/include/linux/regmap.h
+++ b/include/linux/regmap.h
@@ -497,11 +497,13 @@ struct regmap_irq {
497 * 497 *
498 * @status_base: Base status register address. 498 * @status_base: Base status register address.
499 * @mask_base: Base mask register address. 499 * @mask_base: Base mask register address.
500 * @ack_base: Base ack address. If zero then the chip is clear on read. 500 * @ack_base: Base ack address. If zero then the chip is clear on read.
501 * Using zero value is possible with @use_ack bit.
501 * @wake_base: Base address for wake enables. If zero unsupported. 502 * @wake_base: Base address for wake enables. If zero unsupported.
502 * @irq_reg_stride: Stride to use for chips where registers are not contiguous. 503 * @irq_reg_stride: Stride to use for chips where registers are not contiguous.
503 * @init_ack_masked: Ack all masked interrupts once during initalization. 504 * @init_ack_masked: Ack all masked interrupts once during initalization.
504 * @mask_invert: Inverted mask register: cleared bits are masked out. 505 * @mask_invert: Inverted mask register: cleared bits are masked out.
506 * @use_ack: Use @ack register even if it is zero.
505 * @wake_invert: Inverted wake register: cleared bits are wake enabled. 507 * @wake_invert: Inverted wake register: cleared bits are wake enabled.
506 * @runtime_pm: Hold a runtime PM lock on the device when accessing it. 508 * @runtime_pm: Hold a runtime PM lock on the device when accessing it.
507 * 509 *
@@ -520,6 +522,7 @@ struct regmap_irq_chip {
520 unsigned int irq_reg_stride; 522 unsigned int irq_reg_stride;
521 bool init_ack_masked:1; 523 bool init_ack_masked:1;
522 bool mask_invert:1; 524 bool mask_invert:1;
525 bool use_ack:1;
523 bool wake_invert:1; 526 bool wake_invert:1;
524 bool runtime_pm:1; 527 bool runtime_pm:1;
525 528