Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
1/*
2 * Copyright (C) 2015-2017 Dialog Semiconductor
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 */
14
15#ifndef __MFD_DA9062_CORE_H__
16#define __MFD_DA9062_CORE_H__
17
18#include <linux/interrupt.h>
19#include <linux/mfd/da9062/registers.h>
20
21enum da9062_compatible_types {
22 COMPAT_TYPE_DA9061 = 1,
23 COMPAT_TYPE_DA9062,
24};
25
26enum da9061_irqs {
27 /* IRQ A */
28 DA9061_IRQ_ONKEY,
29 DA9061_IRQ_WDG_WARN,
30 DA9061_IRQ_SEQ_RDY,
31 /* IRQ B*/
32 DA9061_IRQ_TEMP,
33 DA9061_IRQ_LDO_LIM,
34 DA9061_IRQ_DVC_RDY,
35 DA9061_IRQ_VDD_WARN,
36 /* IRQ C */
37 DA9061_IRQ_GPI0,
38 DA9061_IRQ_GPI1,
39 DA9061_IRQ_GPI2,
40 DA9061_IRQ_GPI3,
41 DA9061_IRQ_GPI4,
42
43 DA9061_NUM_IRQ,
44};
45
46enum da9062_irqs {
47 /* IRQ A */
48 DA9062_IRQ_ONKEY,
49 DA9062_IRQ_ALARM,
50 DA9062_IRQ_TICK,
51 DA9062_IRQ_WDG_WARN,
52 DA9062_IRQ_SEQ_RDY,
53 /* IRQ B*/
54 DA9062_IRQ_TEMP,
55 DA9062_IRQ_LDO_LIM,
56 DA9062_IRQ_DVC_RDY,
57 DA9062_IRQ_VDD_WARN,
58 /* IRQ C */
59 DA9062_IRQ_GPI0,
60 DA9062_IRQ_GPI1,
61 DA9062_IRQ_GPI2,
62 DA9062_IRQ_GPI3,
63 DA9062_IRQ_GPI4,
64
65 DA9062_NUM_IRQ,
66};
67
68struct da9062 {
69 struct device *dev;
70 struct regmap *regmap;
71 struct regmap_irq_chip_data *regmap_irq;
72 enum da9062_compatible_types chip_type;
73};
74
75#endif /* __MFD_DA9062_CORE_H__ */