diff options
author | Krystian Garbaciak <krystian.garbaciak@diasemi.com> | 2013-07-29 13:00:44 -0400 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2013-08-19 21:16:00 -0400 |
commit | a0e08b8606f3c0722b235a09b537264e5b14f748 (patch) | |
tree | 693a33759ad3d21937f5db74de2d3e99e99bf171 /include/linux | |
parent | 8e685483b0ba17fe08cfc36fb86b3688a24b2090 (diff) |
mfd: da9063: Add IRQ support
This patch adds a regmap irqchip for DA9063 IRQs. It depends on
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap.git tags/regmap-irq-ack-mask
Signed-off-by: Krystian Garbaciak <krystian.garbaciak@diasemi.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/mfd/da9063/core.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/include/linux/mfd/da9063/core.h b/include/linux/mfd/da9063/core.h index ec2fd2aa24ae..2d2a0af675fd 100644 --- a/include/linux/mfd/da9063/core.h +++ b/include/linux/mfd/da9063/core.h | |||
@@ -33,6 +33,41 @@ enum da9063_models { | |||
33 | PMIC_DA9063 = 0x61, | 33 | PMIC_DA9063 = 0x61, |
34 | }; | 34 | }; |
35 | 35 | ||
36 | /* Interrupts */ | ||
37 | enum da9063_irqs { | ||
38 | DA9063_IRQ_ONKEY = 0, | ||
39 | DA9063_IRQ_ALARM, | ||
40 | DA9063_IRQ_TICK, | ||
41 | DA9063_IRQ_ADC_RDY, | ||
42 | DA9063_IRQ_SEQ_RDY, | ||
43 | DA9063_IRQ_WAKE, | ||
44 | DA9063_IRQ_TEMP, | ||
45 | DA9063_IRQ_COMP_1V2, | ||
46 | DA9063_IRQ_LDO_LIM, | ||
47 | DA9063_IRQ_REG_UVOV, | ||
48 | DA9063_IRQ_VDD_MON, | ||
49 | DA9063_IRQ_WARN, | ||
50 | DA9063_IRQ_GPI0, | ||
51 | DA9063_IRQ_GPI1, | ||
52 | DA9063_IRQ_GPI2, | ||
53 | DA9063_IRQ_GPI3, | ||
54 | DA9063_IRQ_GPI4, | ||
55 | DA9063_IRQ_GPI5, | ||
56 | DA9063_IRQ_GPI6, | ||
57 | DA9063_IRQ_GPI7, | ||
58 | DA9063_IRQ_GPI8, | ||
59 | DA9063_IRQ_GPI9, | ||
60 | DA9063_IRQ_GPI10, | ||
61 | DA9063_IRQ_GPI11, | ||
62 | DA9063_IRQ_GPI12, | ||
63 | DA9063_IRQ_GPI13, | ||
64 | DA9063_IRQ_GPI14, | ||
65 | DA9063_IRQ_GPI15, | ||
66 | }; | ||
67 | |||
68 | #define DA9063_IRQ_BASE_OFFSET 0 | ||
69 | #define DA9063_NUM_IRQ (DA9063_IRQ_GPI15 + 1 - DA9063_IRQ_BASE_OFFSET) | ||
70 | |||
36 | struct da9063 { | 71 | struct da9063 { |
37 | /* Device */ | 72 | /* Device */ |
38 | struct device *dev; | 73 | struct device *dev; |
@@ -46,10 +81,13 @@ struct da9063 { | |||
46 | /* Interrupts */ | 81 | /* Interrupts */ |
47 | int chip_irq; | 82 | int chip_irq; |
48 | unsigned int irq_base; | 83 | unsigned int irq_base; |
84 | struct regmap_irq_chip_data *regmap_irq; | ||
49 | }; | 85 | }; |
50 | 86 | ||
51 | int da9063_device_init(struct da9063 *da9063, unsigned int irq); | 87 | int da9063_device_init(struct da9063 *da9063, unsigned int irq); |
88 | int da9063_irq_init(struct da9063 *da9063); | ||
52 | 89 | ||
53 | void da9063_device_exit(struct da9063 *da9063); | 90 | void da9063_device_exit(struct da9063 *da9063); |
91 | void da9063_irq_exit(struct da9063 *da9063); | ||
54 | 92 | ||
55 | #endif /* __MFD_DA9063_CORE_H__ */ | 93 | #endif /* __MFD_DA9063_CORE_H__ */ |