diff options
author | Qipeng Zha <qipeng.zha@intel.com> | 2015-09-14 18:39:17 +0200 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2015-09-24 19:03:38 +0200 |
commit | b4fe8ba7a310da6a2b99e3abe67c7815198cde49 (patch) | |
tree | c48d8fe596cf3e6a3392d9688c27cd695d90a23a | |
parent | Linux 4.3-rc2 (diff) | |
download | linux-b4fe8ba7a310da6a2b99e3abe67c7815198cde49.tar.xz linux-b4fe8ba7a310da6a2b99e3abe67c7815198cde49.zip |
regmap: Add generic macro to define regmap_irq
Add REGMAP_IRQ_REG macro in regmap.h to define regmap_irq
structure easily for other driver module.
Signed-off-by: Qipeng Zha <qipeng.zha@intel.com>
Acked-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
-rw-r--r-- | include/linux/regmap.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/regmap.h b/include/linux/regmap.h index 8fc0bfd8edc4..f6226976e158 100644 --- a/include/linux/regmap.h +++ b/include/linux/regmap.h @@ -791,6 +791,9 @@ struct regmap_irq { unsigned int mask; }; +#define REGMAP_IRQ_REG(_irq, _off, _mask) \ + [_irq] = { .reg_offset = (_off), .mask = (_mask) } + /** * Description of a generic regmap irq_chip. This is not intended to * handle every possible interrupt controller, but it should handle a |