[PATCH] regmap: Add generic macro to define regmap_irq

From: Qipeng Zha
Date: Mon Sep 14 2015 - 12:39:17 EST


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@xxxxxxxxx>
Acked-by: Mark Brown <broonie@xxxxxxxxxx>
Signed-off-by: Lee Jones <lee.jones@xxxxxxxxxx>
---
include/linux/regmap.h | 3 +++
1 file changed, 3 insertions(+)

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
--
2.5.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/