2 * Copyright 2012 Creative Product Design
3 * Marc Reilly <marc@cpdesign.com.au>
5 * This program is free software; you can redistribute it and/or modify it under
6 * the terms of the GNU General Public License version 2 as published by the
7 * Free Software Foundation.
9 #ifndef __DRIVERS_MFD_MC13XXX_H
10 #define __DRIVERS_MFD_MC13XXX_H
12 #include <linux/mutex.h>
13 #include <linux/regmap.h>
14 #include <linux/mfd/mc13xxx.h>
16 #define MC13XXX_NUMREGS 0x3f
17 #define MC13XXX_IRQ_REG_CNT 2
18 #define MC13XXX_IRQ_PER_REG 24
22 struct mc13xxx_variant
{
24 void (*print_revision
)(struct mc13xxx
*mc13xxx
, u32 revision
);
27 extern struct mc13xxx_variant
28 mc13xxx_variant_mc13783
,
29 mc13xxx_variant_mc13892
,
30 mc13xxx_variant_mc34708
;
33 struct regmap
*regmap
;
36 const struct mc13xxx_variant
*variant
;
38 struct regmap_irq irqs
[MC13XXX_IRQ_PER_REG
* MC13XXX_IRQ_REG_CNT
];
39 struct regmap_irq_chip irq_chip
;
40 struct regmap_irq_chip_data
*irq_data
;
49 int mc13xxx_common_init(struct device
*dev
);
50 int mc13xxx_common_exit(struct device
*dev
);
52 #endif /* __DRIVERS_MFD_MC13XXX_H */