summaryrefslogtreecommitdiffstats
path: root/include/linux/regmap.h
diff options
context:
space:
mode:
authorQipeng Zha <qipeng.zha@intel.com>2015-09-15 00:39:17 +0800
committerLee Jones <lee.jones@linaro.org>2015-09-24 18:03:38 +0100
commitb4fe8ba7a310da6a2b99e3abe67c7815198cde49 (patch)
treec48d8fe596cf3e6a3392d9688c27cd695d90a23a /include/linux/regmap.h
parent1f93e4a96c9109378204c147b3eec0d0e8100fde (diff)
downloadop-kernel-dev-b4fe8ba7a310da6a2b99e3abe67c7815198cde49.zip
op-kernel-dev-b4fe8ba7a310da6a2b99e3abe67c7815198cde49.tar.gz
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>
Diffstat (limited to 'include/linux/regmap.h')
-rw-r--r--include/linux/regmap.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/regmap.h b/include/linux/regmap.h
index 8fc0bfd..f622697 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
OpenPOWER on IntegriCloud