Thread (18 messages) 18 messages, 4 authors, 2017-08-03
STALE3234d
Revisions (4)
  1. v6 [diff vs current]
  2. v7 current
  3. v8 [diff vs current]
  4. v9 [diff vs current]

[PATCH v7 11/12] mfd: rk808: Add RK805 power key support

From: Joseph Chen <hidden>
Date: 2017-07-21 11:19:20
Also in: linux-devicetree, linux-gpio, linux-rockchip, lkml
Subsystem: multifunction devices (mfd), the rest · Maintainers: Lee Jones, Linus Torvalds

Signed-off-by: Joseph Chen <redacted>
---
 drivers/mfd/rk808.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
diff --git a/drivers/mfd/rk808.c b/drivers/mfd/rk808.c
index db90471..6d9f96b 100644
--- a/drivers/mfd/rk808.c
+++ b/drivers/mfd/rk808.c
@@ -94,6 +94,19 @@ static bool rk808_is_volatile_reg(struct device *dev, unsigned int reg)
 	}
 };
 
+static struct resource rk805_key_resources[] = {
+	{
+		.start  = RK805_IRQ_PWRON_FALL,
+		.end    = RK805_IRQ_PWRON_FALL,
+		.flags  = IORESOURCE_IRQ,
+	},
+	{
+		.start  = RK805_IRQ_PWRON_RISE,
+		.end    = RK805_IRQ_PWRON_RISE,
+		.flags  = IORESOURCE_IRQ,
+	}
+};
+
 static const struct mfd_cell rk805s[] = {
 	{ .name = "rk808-clkout", },
 	{ .name = "rk808-regulator", },
@@ -103,6 +116,10 @@ static bool rk808_is_volatile_reg(struct device *dev, unsigned int reg)
 		.num_resources = ARRAY_SIZE(rtc_resources),
 		.resources = &rtc_resources[0],
 	},
+	{	.name = "rk805-pwrkey",
+		.num_resources = ARRAY_SIZE(rk805_key_resources),
+		.resources = &rk805_key_resources[0],
+	},
 };
 
 static const struct mfd_cell rk808s[] = {
-- 
1.9.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help