summaryrefslogtreecommitdiffstats
path: root/include/linux/regmap.h
diff options
context:
space:
mode:
authorQipeng Zha2015-09-14 18:39:17 +0200
committerLee Jones2015-09-24 19:03:38 +0200
commitb4fe8ba7a310da6a2b99e3abe67c7815198cde49 (patch)
treec48d8fe596cf3e6a3392d9688c27cd695d90a23a /include/linux/regmap.h
parentLinux 4.3-rc2 (diff)
downloadkernel-qcow2-linux-b4fe8ba7a310da6a2b99e3abe67c7815198cde49.tar.gz
kernel-qcow2-linux-b4fe8ba7a310da6a2b99e3abe67c7815198cde49.tar.xz
kernel-qcow2-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>
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 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