From: Qipeng Zha Date: Mon, 14 Sep 2015 16:39:17 +0000 (+0800) Subject: regmap: Add generic macro to define regmap_irq X-Git-Tag: v4.14-rc1~4390^2~63^4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b4fe8ba7a310da6a2b99e3abe67c7815198cde49;p=platform%2Fkernel%2Flinux-rpi.git 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 Acked-by: Mark Brown Signed-off-by: Lee Jones --- 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