Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2001499imu; Wed, 12 Dec 2018 07:57:11 -0800 (PST) X-Google-Smtp-Source: AFSGD/Vn98H2Si4z0OKwjvqbbMYSrFKwknIQxhGJCIC+OZMgnURWRAmi4ZrUMe7xtnsKTQ+KL5MG X-Received: by 2002:a63:2f86:: with SMTP id v128mr17994717pgv.407.1544630231578; Wed, 12 Dec 2018 07:57:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544630231; cv=none; d=google.com; s=arc-20160816; b=NTe6sVpvSMpbqCs6NNR5AJzzCLABO0ze0ELnolUCi3RbEhtd3WmmKrQTcwUSO/NztE Jo5wLoskN1hgRdNEA5yUiL1FgtJfwCH0cuSTZFv814yCo5DMNyFT/WDMoBga93V01coI yoRdkg01Yde/qm59aMeqa/2b+zkT0hsqlPtZPZXvmQPvyn4A/obhEHcU8U4nbUYeTG9g 21MUwF+uIIUlgb9slVNlVTysMFcVQ0k3Z0K2il9ivpD5coBMZYujxv3+tnseTexDzodH at9XpXZx77X3Jx73qPFg/NQtEvyJVSPE4ocS0wxwDzBq7nyWN3ohCdCVm8I/gq4REZgH QO6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=MxRJpaEmCq7pl5aHRVnXXQnL4V8VTjtBmPWkYK1fRgw=; b=mI034gtGO6jTINvnEf2eqjRasYVvINlw8WwGKWlWtOHXoLGGX7iZt9IguyvL2jMA1l YRsMS1xR1WTB5GJYpr8rmvT/tYyB53OQAju/lJ6Xc0fZVLDOSXXacmNa+H/z+l31ZNBn EuKP0flXIa34oMvktWcY5KXzdezREDZpf8rwO6vuj93WsSOkdfCqE6ivliaCaozA/VKJ ZColXGebKsFPHB1XAJ7TrAnbX1rARkO6EYeQYfKYEHiiCI8ysHU87qPFTakdhhLdeKey omMgB4uPDATdF6DYmSYuZu105XJGixDLnGc8agVMcgQjvUNvQf9R8q+GPRE+SxI6T2B9 OErQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b="wT77kI/q"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f13si16754093pln.368.2018.12.12.07.56.56; Wed, 12 Dec 2018 07:57:11 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b="wT77kI/q"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727834AbeLLPzS (ORCPT + 99 others); Wed, 12 Dec 2018 10:55:18 -0500 Received: from heliosphere.sirena.org.uk ([172.104.155.198]:45846 "EHLO heliosphere.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726358AbeLLPzS (ORCPT ); Wed, 12 Dec 2018 10:55:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=MxRJpaEmCq7pl5aHRVnXXQnL4V8VTjtBmPWkYK1fRgw=; b=wT77kI/qD1QiWQ7BKsScLBWuL sA9XlEuKO84+09F1Wu62349eHWDmTqcDHNaJr8dW/Nk+PtplDJenc4zzHmhGEl/Og3/WgL0ghpMjP rsfiGGpLXcmVyiHiaBiNaROT2y/IYyRADgsJibAsxJWnBpwiet+7lU5EIL/bafhvmm4L8=; Received: from cpc102320-sgyl38-2-0-cust46.18-2.cable.virginm.net ([82.37.168.47] helo=debutante.sirena.org.uk) by heliosphere.sirena.org.uk with esmtpa (Exim 4.89) (envelope-from ) id 1gX6qk-0004Fd-T2; Wed, 12 Dec 2018 15:55:02 +0000 Received: by debutante.sirena.org.uk (Postfix, from userid 1000) id 465C21125535; Wed, 12 Dec 2018 15:55:02 +0000 (GMT) Date: Wed, 12 Dec 2018 15:55:02 +0000 From: Mark Brown To: Andrei.Stefanescu@microchip.com Cc: robh+dt@kernel.org, lgirdwood@gmail.com, mark.rutland@arm.com, gregkh@linuxfoundation.org, Cristian.Birsan@microchip.com, Nicolas.Ferre@microchip.com, Claudiu.Beznea@microchip.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: Re: [RESEND PATCH v3 3/3] regulator: mcp16502: add regulator driver for MCP16502 Message-ID: <20181212155502.GD6920@sirena.org.uk> References: <1544522876-15967-1-git-send-email-andrei.stefanescu@microchip.com> <1544522876-15967-4-git-send-email-andrei.stefanescu@microchip.com> <20181211164706.GL6686@sirena.org.uk> <6a35df06-1309-f069-9b22-8c2cc5cca56e@microchip.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="yudcn1FV7Hsu/q59" Content-Disposition: inline In-Reply-To: <6a35df06-1309-f069-9b22-8c2cc5cca56e@microchip.com> X-Cookie: The greatest remedy for anger is delay. User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --yudcn1FV7Hsu/q59 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Dec 12, 2018 at 08:01:07AM +0000, Andrei.Stefanescu@microchip.com w= rote: > > This puts the device into low power mode when the suspend function gets > > called but this might not be safe - devices using the regulator may not > > be suspended yet so could still need full regulation. Normally a GPIO > > triggered transition like this would be being done by hardware as part > > of the process of suspending the SoC. Is there some reason to do this > > manually? > There is a line from the MPU (SHDN) which goes low only when the MPU > turns off. That line is already connected to the PMIC and it differentiat= es > between suspend-to-mem and standby. To switch to low-power, the PMIC must > be controlled by the GPIO pin LPM. > The suspend sequence is: > - LPM pin goes high (PMIC enters Low-Power <-> Linux standby) > - SHDN goes low (if target suspend state is mem) and then PMIC enters=20 > HIBERNATE This feels like it should be being controlled somewhere else, if it's actually causing a change in the PMIC state it seems like it wants to be done as late as possible in suspend to minimize the risks. At the very least suspend_late() for the driver seems appropriate. Could you submit a version with this feature at least split out into a separate patch please so we can apply the rest of the code while this is discussed? --yudcn1FV7Hsu/q59 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAlwRL1UACgkQJNaLcl1U h9AOAwf+K8t0YPz/fYY45FbWktz2aoX3ECrcgy5r25ACJVOjG7tBhTelZLbGkitB 314uampogG8tT6s8WObZbEJjQL+VUbyt7bgcpTI7YamUdPSwkXSJDsfjpPOVVLoa 2iAHn+GBi7O63sKNUb9s+D4q7K1xbMs1vxcpQoV+I/SZx33z6GaoJPBUI8CcDes3 UmC9aaIMUMva/RuKtPSEomI/+qAhiuMdZ1e4SQyZ/AZLxThOPyXJvh1hs8fa2IQg qC4heudi00SNdZj0dGl6GlyYLetqaYKamlZ8aYf++xJPwI6hH/bsSP/Tiq2iaWTE wnP4HNcX1dCaLvgGy84OxUTV9fmiOQ== =8c4e -----END PGP SIGNATURE----- --yudcn1FV7Hsu/q59--