Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp3004755ybt; Mon, 29 Jun 2020 12:40:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyXd+VMhfeU7wa+LYaRvoMgmVpoplVprpDBIawUN8j0xnYfTLYS8aCIXmW+m30zmN7FL81K X-Received: by 2002:a17:906:c14f:: with SMTP id dp15mr15353607ejc.454.1593459634234; Mon, 29 Jun 2020 12:40:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593459634; cv=none; d=google.com; s=arc-20160816; b=H1wa3a1XXh7TZblhUl8B+7j6ahJtu64aWbyC6xzmK7JZSdv/Ec+LyJi4uk3CSsK1vc sGIv4iJYzDpIsp3Yb8YGG4T+NuB8iBPnG4ErhR8VbUgmYNnXONTrIOnFMlf8wyyFU10E a1taSsNoy2Dk/qaIIcJcHi//uzJLSSRN9WF11jij9a2s3EuUU1lIDvWR3XzYVz6D75S8 KKXwl0O0HEkdkE3mPCswD+9xpJHNkoDDpIGqNY33Q6GYwsQJpfAzbLuLnrydWErnm+Ur lH8E+pX95vtC8Q8jmACU4MerYwH+H5uBq+GTjg8+S0jJEkTNuHduvHMIAv9fxAYSGLbs YjTA== 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; bh=ro/sJh7+SUNQTvDIs3s1PtwZ8ejB/BAhHKKID9KxULY=; b=jfNgeUJT/p6knLzdGsp+7DLBO9DBq2CJRGeVmZzgt4wW1qVdyoETGa6unlJ/ak1m/X 4Ve9fHu74zt6BkzwIMk7HHvnAzTPISIML+g7B/ynj4G7tW/Qd+/rA6dL1iWTBlnszCog 3Gz7kOZ9VKxmbtYVxYVdhDhNuLpEOFxSQcXwG3HnwgiDrm7HiNFuSkIxUMN3P1CXpJoI 6OwHAlJjF1+fMq5LfZYFpxSykdRHj8NN7A4UV0hGiR6NmzPBsbIoS4/Va/r00Vb3uiYe cACOdVYEHr+b3T045iau2BLgnlnsnjxjcwj4WmGTven5PGpPeKs32/7PWI9N6Cygn41r ImtA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p18si379674ejb.157.2020.06.29.12.40.11; Mon, 29 Jun 2020 12:40:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733082AbgF2TkG (ORCPT + 99 others); Mon, 29 Jun 2020 15:40:06 -0400 Received: from foss.arm.com ([217.140.110.172]:41800 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731818AbgF2Tjz (ORCPT ); Mon, 29 Jun 2020 15:39:55 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 2974A1509; Mon, 29 Jun 2020 06:40:57 -0700 (PDT) Received: from bogus (unknown [10.37.12.57]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id AA0C43F73C; Mon, 29 Jun 2020 06:40:54 -0700 (PDT) Date: Mon, 29 Jun 2020 14:40:47 +0100 From: Sudeep Holla To: Mark Brown Cc: Yoshihiro Shimoda , "ulf.hansson@linaro.org" , "lgirdwood@gmail.com" , "geert+renesas@glider.be" , "magnus.damm@gmail.com" , "linux-mmc@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-renesas-soc@vger.kernel.org" , Sudeep Holla Subject: Re: [PATCH/RFC v4 2/4] regulator: fixed: add regulator_ops members for suspend/resume Message-ID: <20200629134011.GA23284@bogus> References: <1593163942-5087-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> <1593163942-5087-3-git-send-email-yoshihiro.shimoda.uh@renesas.com> <20200626143914.GE5289@sirena.org.uk> <20200629125756.GC5499@sirena.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200629125756.GC5499@sirena.org.uk> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 29, 2020 at 01:57:56PM +0100, Mark Brown wrote: > On Mon, Jun 29, 2020 at 02:42:26AM +0000, Yoshihiro Shimoda wrote: > > > From: Mark Brown, Sent: Friday, June 26, 2020 11:39 PM > > Copying in Sudeep for the feedback on firmware interfaces. > Thanks Mark. > > > According to the changelog this is all about reflecting changes in the > > > system state done by firmware but there's no interaction with firmware > > > here which means this will be at best fragile. If we need to reflect > > > changes in firmware configuration I'd expect there to be some > > > interaction with firmware about how it is configured, or at least that > > > the configuration would come from the same source. > I agree. > > I should have described background of previous patch series though, > > according to previous discussion [1] the firmware side (like PSCI) is > > also fragile unfortunately... So, I thought using regulator-off-in-suspend > > in a regulator was better. > Please fix the firmware. You might have bigger problem than this if the PSCI firmware is fragile as you state. Better to disable power management on the platform if the firmware can't be fixed. > > On other hand, Ulf is talking about either adding a property (perhaps like > > regulator-off-in-suspend) into a regulator or just adding a new property > > into MMC [2]. What do you think about Ulf' comment? I'm thinking > > adding a new property "full-pwr-cycle-in-suspend" is the best solution. > > This is because using a regulator property and reflecting a state of regulator without > > firmware is fragile, as you said. I haven't followed all the threads, but if it related to the policy you want in the Linux, then may be use DT property or something. I don't know. But if this is to indicate something based on firmware runtime/configuration, then NACK for any approaches unconditionally. > > TBH I worry about a property drifting out of sync with the firmware on > systems where the firmware can be updated. Personally my default > assumption would always be that we're going to loose power for anything > except the RAM and whatever is needed for wake sources during suspend so > I find the discussion a bit surprising but in any case that seems like a > better option than trying to shoehorn things in the way the series here > did. Like I said in my earlier replies if this is done through the > regulator API I'd expect it to be via the suspend interface. > +1. If this platform needs Linux to keep some state on for users in the firmware or anything outside Linux, it must resume back in the same state as we entered the suspend state from the kernel. -- Regards, Sudeep