[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200120212056.28806-3-andreas@kemnade.info>
Date: Mon, 20 Jan 2020 22:20:55 +0100
From: Andreas Kemnade <andreas@...nade.info>
To: jic23@...nel.org, knaack.h@....de, lars@...afoo.de,
pmeerw@...erw.net, lee.jones@...aro.org, b.galvani@...il.com,
linus.walleij@...aro.org, andreas@...nade.info,
linux-kernel@...r.kernel.org, linux-iio@...r.kernel.org,
phh@....me, stefan@...er.ch, letux-kernel@...nphoenux.org,
martin.blumenstingl@...glemail.com
Subject: [PATCH RFC v2 2/3] mfd: rn5t618: add IRQ definitions for RN5T618
Previously, only the definitions for the RC5T619 were
available.
Signed-off-by: Andreas Kemnade <andreas@...nade.info>
---
Untested, IMHO only acceptable with a Tested-By
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.11.0
Powered by blists - more mailing lists