devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Ondřej Jirman" <megi@xff.cz>
To: Lee Jones <lee@kernel.org>, Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Heiko Stuebner <heiko@sntech.de>
Cc: Ondrej Jirman <megi@xff.cz>,
	Sebastian Reichel <sebastian.reichel@collabora.com>,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: [PATCH v3 4/4] mfd: rk8xx: Add support for RK806 power off
Date: Tue, 10 Oct 2023 19:41:19 +0200	[thread overview]
Message-ID: <20231010174138.1888396-5-megi@xff.cz> (raw)
In-Reply-To: <20231010174138.1888396-1-megi@xff.cz>

From: Ondrej Jirman <megi@xff.cz>

Use DEV_OFF bit to power off the RK806 PMIC, when system-power-controller
is used in DTS.

Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
 drivers/mfd/rk8xx-core.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/mfd/rk8xx-core.c b/drivers/mfd/rk8xx-core.c
index a50a181b18e9..c47164a3ec1d 100644
--- a/drivers/mfd/rk8xx-core.c
+++ b/drivers/mfd/rk8xx-core.c
@@ -525,6 +525,10 @@ static int rk808_power_off(struct sys_off_data *data)
 		reg = RK805_DEV_CTRL_REG;
 		bit = DEV_OFF;
 		break;
+	case RK806_ID:
+		reg = RK806_SYS_CFG3;
+		bit = DEV_OFF;
+		break;
 	case RK808_ID:
 		reg = RK808_DEVCTRL_REG,
 		bit = DEV_OFF_RST;
-- 
2.42.0


  parent reply	other threads:[~2023-10-10 17:41 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-10 17:41 [PATCH v3 0/4] Add support for poweroff via RK806 PMIC Ondřej Jirman
2023-10-10 17:41 ` [PATCH v3 1/4] dt-bindings: mfd: rk8xx: Deprecate rockchip,system-power-controller Ondřej Jirman
2023-10-12 20:00   ` Rob Herring
2023-10-19 10:29   ` Lee Jones
2023-10-19 10:30     ` Krzysztof Kozlowski
2023-10-19 13:50       ` Lee Jones
2023-10-19 14:03         ` Ondřej Jirman
2023-10-19 15:00           ` Lee Jones
2023-10-10 17:41 ` [PATCH v3 2/4] dt-bindings: mfd: rk806: Allow system-power-controller property Ondřej Jirman
2023-10-12 20:00   ` Rob Herring
2023-10-10 17:41 ` [PATCH v3 3/4] mfd: rk8xx: Add support for standard " Ondřej Jirman
2023-10-10 17:41 ` Ondřej Jirman [this message]
2023-10-11 16:38 ` [PATCH v3 0/4] Add support for poweroff via RK806 PMIC Sebastian Reichel

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=20231010174138.1888396-5-megi@xff.cz \
    --to=megi@xff.cz \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=heiko@sntech.de \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=lee@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=robh+dt@kernel.org \
    --cc=sebastian.reichel@collabora.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;
as well as URLs for NNTP newsgroup(s).