public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Chen <peter.chen@nxp.com>
To: Mark Brown <broonie@kernel.org>
Cc: "lgirdwood@gmail.com" <lgirdwood@gmail.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	dl-linux-imx <linux-imx@nxp.com>
Subject: Re: [PATCH 1/1] regulator: fixed: add system pm routines for pinctrl
Date: Thu, 12 Mar 2020 15:03:26 +0000	[thread overview]
Message-ID: <20200312150330.GH14625@b29397-desktop> (raw)
In-Reply-To: <20200312143723.GF4038@sirena.org.uk>

On 20-03-12 14:37:23, Mark Brown wrote:
> On Thu, Mar 12, 2020 at 01:00:33PM +0000, Peter Chen wrote:
> > On 20-03-12 11:47:12, Mark Brown wrote:
> 
> > > Which pins exactly is this controlling?  I would not expect a fixed
> > > voltage regulator to have pinctrl support, this feels like it's papering
> > > over some other issue.
> 
> > Sorry, I forget sending dts patch. We use fixed gpio regulator to control
> > USB VBus.
> 
> Surely it's the GPIO controller that needs pinctrl support then?

But the pinctrl register value for this gpio will be cleared after
suspend, we need to restore it, otherwise, the function will be not
gpio. See below patch:

From 355de404fecd29a330e5b636ce1ffd1adce2f230 Mon Sep 17 00:00:00 2001
From: Peter Chen <peter.chen@nxp.com>
Date: Mon, 20 Jan 2020 10:04:43 +0800
Subject: [PATCH 1/1] ARM: dts: imx7ulp-evk: add pinctrl for suspend

For imx7ulp, the power of pinctrl is lost during the system
susupend, so we need to restore the pinctrl value after resume.
Add one group pinctrl for "sleep" for both id and vbus pinctrl.

Reviewed-by: Jun Li <jun.li@nxp.com>
Acked-by: Leonard Crestez <leonard.crestez@nxp.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
---
 arch/arm/boot/dts/imx7ulp-evk.dts | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/imx7ulp-evk.dts b/arch/arm/boot/dts/imx7ulp-evk.dts
index d67ca52042eb..3bf6bb071fa0 100644
--- a/arch/arm/boot/dts/imx7ulp-evk.dts
+++ b/arch/arm/boot/dts/imx7ulp-evk.dts
@@ -125,8 +125,9 @@
 
 		reg_usb_otg1_vbus: regulator-usb-otg1-vbus {
 			compatible = "regulator-fixed";
-			pinctrl-names = "default";
+			pinctrl-names = "default", "sleep";
 			pinctrl-0 = <&pinctrl_usbotg1_vbus>;
+			pinctrl-1 = <&pinctrl_usbotg1_vbus>;
 			regulator-name = "usb_otg1_vbus";
 			regulator-min-microvolt = <5000000>;
 			regulator-max-microvolt = <5000000>;
@@ -402,8 +403,9 @@
 
 &usbotg1 {
 	vbus-supply = <&reg_usb_otg1_vbus>;
-	pinctrl-names = "default";
+	pinctrl-names = "default", "sleep";
 	pinctrl-0 = <&pinctrl_usbotg1_id>;
+	pinctrl-1 = <&pinctrl_usbotg1_id>;
 	srp-disable;
 	hnp-disable;
 	adp-disable;
-- 
2.17.1


-- 

Thanks,
Peter Chen

  reply	other threads:[~2020-03-12 15:03 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-12 10:38 [PATCH 1/1] regulator: fixed: add system pm routines for pinctrl Peter Chen
2020-03-12 11:47 ` Mark Brown
2020-03-12 13:00   ` Peter Chen
2020-03-12 14:37     ` Mark Brown
2020-03-12 15:03       ` Peter Chen [this message]
2020-03-12 15:07         ` Mark Brown
2020-03-13  3:08           ` Peter Chen
2020-03-13 12:11             ` Mark Brown
2020-03-13 13:16               ` Peter Chen
2020-03-13 13:29                 ` Mark Brown

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=20200312150330.GH14625@b29397-desktop \
    --to=peter.chen@nxp.com \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-imx@nxp.com \
    --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