public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Heiko Stuebner <heiko@sntech.de>
To: lee.jones@linaro.org
Cc: linux-kernel@vger.kernel.org, d.schultz@phytec.de,
	linux-rockchip@lists.infradead.org,
	christoph.muellner@theobroma-systems.com,
	tony.xie@rock-chips.com, Heiko Stuebner <heiko@sntech.de>
Subject: [PATCH 2/4] mfd: rk808: fix rk817 powerkey integration
Date: Tue, 17 Sep 2019 10:12:54 +0200	[thread overview]
Message-ID: <20190917081256.24919-2-heiko@sntech.de> (raw)
In-Reply-To: <20190917081256.24919-1-heiko@sntech.de>

The pwrkey integration seems to stem from the vendor kernel, as the
compatible is wrong and also the order of key-irqs is swapped.

So fix these issues to make the pwrkey on rk817 actually work.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
 drivers/mfd/rk808.c | 14 +++-----------
 1 file changed, 3 insertions(+), 11 deletions(-)

diff --git a/drivers/mfd/rk808.c b/drivers/mfd/rk808.c
index 050478cabc95..966841744ee6 100644
--- a/drivers/mfd/rk808.c
+++ b/drivers/mfd/rk808.c
@@ -121,16 +121,8 @@ static struct resource rk817_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,
-	}
+	DEFINE_RES_IRQ(RK805_IRQ_PWRON_RISE),
+	DEFINE_RES_IRQ(RK805_IRQ_PWRON_FALL),
 };
 
 static struct resource rk817_pwrkey_resources[] = {
@@ -167,7 +159,7 @@ static const struct mfd_cell rk817s[] = {
 	{ .name = "rk808-clkout",},
 	{ .name = "rk808-regulator",},
 	{
-		.name = "rk8xx-pwrkey",
+		.name = "rk805-pwrkey",
 		.num_resources = ARRAY_SIZE(rk817_pwrkey_resources),
 		.resources = &rk817_pwrkey_resources[0],
 	},
-- 
2.20.1


  reply	other threads:[~2019-09-17  8:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-17  8:12 [PATCH 1/4] mfd: rk808: fix rk818 ID template Heiko Stuebner
2019-09-17  8:12 ` Heiko Stuebner [this message]
2019-10-04 12:05   ` [PATCH 2/4] mfd: rk808: fix rk817 powerkey integration Lee Jones
2019-09-17  8:12 ` [PATCH 3/4] mfd: rk808: set rk817 interrupt polarity to low Heiko Stuebner
2019-09-17  8:12 ` [PATCH 4/4] mfd: rk808: use DEFINE_RES_IRQ for rk808 rtc alarm irq Heiko Stuebner
2019-10-04 12:06   ` Lee Jones
2019-10-04 11:55 ` [PATCH 1/4] mfd: rk808: fix rk818 ID template Lee Jones

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190917081256.24919-2-heiko@sntech.de \
    --to=heiko@sntech.de \
    --cc=christoph.muellner@theobroma-systems.com \
    --cc=d.schultz@phytec.de \
    --cc=lee.jones@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=tony.xie@rock-chips.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox