1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Copyright 2012 Creative Product Design
4 * Marc Reilly <marc@cpdesign.com.au>
6 #ifndef __DRIVERS_MFD_MC13XXX_H
7 #define __DRIVERS_MFD_MC13XXX_H
9 #include <linux/mutex.h>
10 #include <linux/regmap.h>
11 #include <linux/mfd/mc13xxx.h>
13 #define MC13XXX_NUMREGS 0x3f
14 #define MC13XXX_IRQ_REG_CNT 2
15 #define MC13XXX_IRQ_PER_REG 24
19 struct mc13xxx_variant
{
21 void (*print_revision
)(struct mc13xxx
*mc13xxx
, u32 revision
);
24 extern struct mc13xxx_variant
25 mc13xxx_variant_mc13783
,
26 mc13xxx_variant_mc13892
,
27 mc13xxx_variant_mc34708
;
30 struct regmap
*regmap
;
33 const struct mc13xxx_variant
*variant
;
35 struct regmap_irq irqs
[MC13XXX_IRQ_PER_REG
* MC13XXX_IRQ_REG_CNT
];
36 struct regmap_irq_chip irq_chip
;
37 struct regmap_irq_chip_data
*irq_data
;
46 int mc13xxx_common_init(struct device
*dev
);
47 int mc13xxx_common_exit(struct device
*dev
);
49 #endif /* __DRIVERS_MFD_MC13XXX_H */