summaryrefslogtreecommitdiff
path: root/drivers/mfd/rk808.c
diff options
context:
space:
mode:
authorJoseph Chen <chenjh@rock-chips.com>2017-08-21 04:28:42 +0300
committerLee Jones <lee.jones@linaro.org>2017-08-21 10:54:56 +0300
commitf7c22398f5e95c995a34d4f196d53cfc32562aed (patch)
treece0f885221e7805e8f6c62e40e1dfbf6056e48c8 /drivers/mfd/rk808.c
parent8d249b67c785d48c5aa526b47495f7c88a62f73e (diff)
downloadlinux-f7c22398f5e95c995a34d4f196d53cfc32562aed.tar.xz
mfd: rk808: Add RK805 power key support
Signed-off-by: Joseph Chen <chenjh@rock-chips.com> Signed-off-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/mfd/rk808.c')
-rw-r--r--drivers/mfd/rk808.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/mfd/rk808.c b/drivers/mfd/rk808.c
index c803d2d5dfb7..216fbf6adec9 100644
--- a/drivers/mfd/rk808.c
+++ b/drivers/mfd/rk808.c
@@ -94,6 +94,19 @@ static struct resource rtc_resources[] = {
}
};
+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 const struct mfd_cell rk805s[] = {
.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[] = {