lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200312150330.GH14625@b29397-desktop>
Date:   Thu, 12 Mar 2020 15:03:26 +0000
From:   Peter Chen <peter.chen@....com>
To:     Mark Brown <broonie@...nel.org>
CC:     "lgirdwood@...il.com" <lgirdwood@...il.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        dl-linux-imx <linux-imx@....com>
Subject: Re: [PATCH 1/1] regulator: fixed: add system pm routines for pinctrl

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@....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@....com>
Acked-by: Leonard Crestez <leonard.crestez@....com>
Signed-off-by: Peter Chen <peter.chen@....com>
Signed-off-by: Dong Aisheng <aisheng.dong@....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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ