[PATCH RFC v3 3/4] mfd: rn5t618: add IRQ definitions for RN5T618
From: Andreas Kemnade
Date: Tue Feb 18 2020 - 01:21:02 EST
Previously, only the definitions for the RC5T619 were
available.
Signed-off-by: Andreas Kemnade <andreas@xxxxxxxxxxxx>
---
depends on:
https://lore.kernel.org/lkml/20191220122416.31881-1-andreas@xxxxxxxxxxxx/
Untested, IMHO only acceptable with a Tested-By.
Not needed for the RC5T619, feel free to ignore them if the whole series
would be delayed just because of missing Tested-By for this.
drivers/mfd/rn5t618.c | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/drivers/mfd/rn5t618.c b/drivers/mfd/rn5t618.c
index 321836f78120..6828fd40b0a1 100644
--- a/drivers/mfd/rn5t618.c
+++ b/drivers/mfd/rn5t618.c
@@ -58,6 +58,24 @@ static const struct regmap_config rn5t618_regmap_config = {
.cache_type = REGCACHE_RBTREE,
};
+static const struct regmap_irq rn5t618_irqs[] = {
+ REGMAP_IRQ_REG(RN5T618_IRQ_SYS, 0, BIT(0)),
+ REGMAP_IRQ_REG(RN5T618_IRQ_DCDC, 0, BIT(1)),
+ REGMAP_IRQ_REG(RN5T618_IRQ_ADC, 0, BIT(3)),
+ REGMAP_IRQ_REG(RN5T618_IRQ_GPIO, 0, BIT(4)),
+ REGMAP_IRQ_REG(RN5T618_IRQ_CHG, 0, BIT(6)),
+};
+
+static const struct regmap_irq_chip rn5t618_irq_chip = {
+ .name = "rn5t618",
+ .irqs = rn5t618_irqs,
+ .num_irqs = ARRAY_SIZE(rn5t618_irqs),
+ .num_regs = 1,
+ .status_base = RN5T618_INTMON,
+ .mask_base = RN5T618_INTEN,
+ .mask_invert = true,
+};
+
static const struct regmap_irq rc5t619_irqs[] = {
REGMAP_IRQ_REG(RN5T618_IRQ_SYS, 0, BIT(0)),
REGMAP_IRQ_REG(RN5T618_IRQ_DCDC, 0, BIT(1)),
@@ -92,6 +110,9 @@ static int rn5t618_irq_init(struct rn5t618 *rn5t618)
case RC5T619:
irq_chip = &rc5t619_irq_chip;
break;
+ case RN5T618:
+ irq_chip = &rn5t618_irq_chip;
+ break;
default:
irq_chip = NULL;
break;
--
2.20.1