diff options
author | Krystian Garbaciak <krystian.garbaciak@diasemi.com> | 2013-07-29 19:00:44 +0200 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2013-08-20 03:16:00 +0200 |
commit | a0e08b8606f3c0722b235a09b537264e5b14f748 (patch) | |
tree | 693a33759ad3d21937f5db74de2d3e99e99bf171 /include/linux/mfd | |
parent | 8e685483b0ba17fe08cfc36fb86b3688a24b2090 (diff) | |
download | op-kernel-dev-a0e08b8606f3c0722b235a09b537264e5b14f748.zip op-kernel-dev-a0e08b8606f3c0722b235a09b537264e5b14f748.tar.gz |
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/mfd')
-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 ec2fd2a..2d2a0af 100644 --- a/include/linux/mfd/da9063/core.h +++ b/include/linux/mfd/da9063/core.h @@ -33,6 +33,41 @@ enum da9063_models { PMIC_DA9063 = 0x61, }; +/* Interrupts */ +enum da9063_irqs { + DA9063_IRQ_ONKEY = 0, + DA9063_IRQ_ALARM, + DA9063_IRQ_TICK, + DA9063_IRQ_ADC_RDY, + DA9063_IRQ_SEQ_RDY, + DA9063_IRQ_WAKE, + DA9063_IRQ_TEMP, + DA9063_IRQ_COMP_1V2, + DA9063_IRQ_LDO_LIM, + DA9063_IRQ_REG_UVOV, + DA9063_IRQ_VDD_MON, + DA9063_IRQ_WARN, + DA9063_IRQ_GPI0, + DA9063_IRQ_GPI1, + DA9063_IRQ_GPI2, + DA9063_IRQ_GPI3, + DA9063_IRQ_GPI4, + DA9063_IRQ_GPI5, + DA9063_IRQ_GPI6, + DA9063_IRQ_GPI7, + DA9063_IRQ_GPI8, + DA9063_IRQ_GPI9, + DA9063_IRQ_GPI10, + DA9063_IRQ_GPI11, + DA9063_IRQ_GPI12, + DA9063_IRQ_GPI13, + DA9063_IRQ_GPI14, + DA9063_IRQ_GPI15, +}; + +#define DA9063_IRQ_BASE_OFFSET 0 +#define DA9063_NUM_IRQ (DA9063_IRQ_GPI15 + 1 - DA9063_IRQ_BASE_OFFSET) + struct da9063 { /* Device */ struct device *dev; @@ -46,10 +81,13 @@ struct da9063 { /* Interrupts */ int chip_irq; unsigned int irq_base; + struct regmap_irq_chip_data *regmap_irq; }; int da9063_device_init(struct da9063 *da9063, unsigned int irq); +int da9063_irq_init(struct da9063 *da9063); void da9063_device_exit(struct da9063 *da9063); +void da9063_irq_exit(struct da9063 *da9063); #endif /* __MFD_DA9063_CORE_H__ */ |