mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ondrej Jirman <megous@megous.com>
To: Lee Jones <lee.jones@linaro.org>,
	linux-kernel@vger.kernel.org (open list)
Cc: Ondrej Jirman <megous@megous.com>
Subject: [PATCH] mfd: rk808: Add support for power off on RK817
Date: Sun, 29 Aug 2021 04:51:53 +0200	[thread overview]
Message-ID: <20210829025153.1058978-1-megous@megous.com> (raw)

RK817 has a power-off bit in SYS_CFG3. Add support for powering
off the PMIC.

Signed-off-by: Ondrej Jirman <megous@megous.com>
---
 drivers/mfd/rk808.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/mfd/rk808.c b/drivers/mfd/rk808.c
index 77ccd31ca1d9..b181fe401330 100644
--- a/drivers/mfd/rk808.c
+++ b/drivers/mfd/rk808.c
@@ -543,6 +543,10 @@ static void rk808_pm_power_off(void)
 		reg = RK808_DEVCTRL_REG,
 		bit = DEV_OFF_RST;
 		break;
+	case RK817_ID:
+		reg = RK817_SYS_CFG(3);
+		bit = DEV_OFF;
+		break;
 	case RK818_ID:
 		reg = RK818_DEVCTRL_REG;
 		bit = DEV_OFF;
-- 
2.33.0


             reply	other threads:[~2021-08-29  3:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-29  2:51 Ondrej Jirman [this message]
2021-09-22 13:19 ` 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=20210829025153.1058978-1-megous@megous.com \
    --to=megous@megous.com \
    --cc=lee.jones@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®