Received: by 2002:ac0:8c9a:0:0:0:0:0 with SMTP id r26csp4132385ima; Mon, 4 Feb 2019 10:45:07 -0800 (PST) X-Google-Smtp-Source: AHgI3Ibdnsj2AHY1alP0ktHkXYpJvuOws5zSaEgGcveMlfvpF3OnxTGYMK+Sdh97VnRPHTsr1Yfv X-Received: by 2002:a63:cf02:: with SMTP id j2mr717229pgg.113.1549305907787; Mon, 04 Feb 2019 10:45:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549305907; cv=none; d=google.com; s=arc-20160816; b=EAD9PKvOPGULbIovfnBwdR/nKtGQEZoRtSpdmbGLaQzB5Nx0bHRy75oi9LI0W2I3dO m8RRyNm6ALiauGJQ2g337vfRYVOQUugnGmuW1QOYkFaVApKQPS//pB7Nr/PCOOA03jK8 tE1ZhdhbGz9pUGu1rzdBTj7YVNVl1Slocmc1/TYZBokaNS7zbC/rDPwH8qstpQiGDasc 569q/7vOHjI081kwOC4L4UHIOoW+FHYxrT5fkFBsigxjyJ5Ajeyrl9vjp3a9A9i6Xu/q FKLBS+H1U5HgemPcWslQwCAj/vXy+A//jOYq18ywmYyR6v1h1Fvxp2CdWP/GhApUaXH1 EebA== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=tAw9fJanlAdgTqLr4O/M+55TsSMSQKPatGPIoV03LBc=; b=DhNEuLEtRJNR5qXjUeo0oPdXX8OOciWboohFyc04WImyj1/vPIbNUpv4dD0g2Pu10/ D4NNwuhwtA94FAgb7ptoTAMiAbQTU7cfi2rGBmey4EHNF5Nwnv+tCwhCepuwjm32lqQx 3VBpXQiQ7icNYfcqDb1d3BNhSia0LXRX7VlAdI3K5DigF8T49l0pP6nVEQ2/VaPRnbk4 vPPCEwigHf5+A+DPXjp0Q2YSPtS6cOiZSQRsZ/F+A+3ZqgEXMRzZnl88Q00a7cy+69gY aRrCbsIhi/QT7yeJFgbCazL8uru0QaJeVnA+uP5E74OS6aQVO4DBMdteKJHQtPUVvf9k rW6w== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g18si79826pgg.522.2019.02.04.10.44.51; Mon, 04 Feb 2019 10:45:07 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729390AbfBDSnV convert rfc822-to-8bit (ORCPT + 99 others); Mon, 4 Feb 2019 13:43:21 -0500 Received: from muru.com ([72.249.23.125]:37590 "EHLO muru.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726585AbfBDSnV (ORCPT ); Mon, 4 Feb 2019 13:43:21 -0500 Received: from atomide.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id 44333808C; Mon, 4 Feb 2019 18:43:29 +0000 (UTC) Date: Mon, 4 Feb 2019 10:43:17 -0800 From: Tony Lindgren To: Andreas Kemnade Cc: linux@armlinux.org.uk, khilman@kernel.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, letux-kernel@openphoenux.org Subject: Re: [PATCH] omap3: give off mode enable a more prominent place Message-ID: <20190204184317.GO5720@atomide.com> References: <20190202055827.12956-1-andreas@kemnade.info> <20190204155604.GH5720@atomide.com> <20190204193311.102a60e6@kemnade.info> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: 8BIT In-Reply-To: <20190204193311.102a60e6@kemnade.info> User-Agent: Mutt/1.11.2 (2019-01-07) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Andreas Kemnade [190204 18:33]: > On Mon, 4 Feb 2019 07:56:04 -0800 > Tony Lindgren wrote: > > > * Andreas Kemnade [190202 06:01]: > > > Enabling off mode was only reachable deeply hidden > > > in the debugfs. As powersaving is an important feature, > > > move the option out of its shady place. > > > > How about let's enable always if we have the twl4030 > > configured to allow it? You can just check if the dts has > > "ti,twl4030-power-idle" or "ti,twl4030-power-idle-osc-off" > > properties set. > > > > In order to enable deeper idle states, the user space still > > needs to idle the UARTs and possibly other hardware blocking > > idle. So we should be safe there. > > > Let us not mix up runtime pm and system pm. The uarts need > to be idled for runtime suspend, but they are off/ret for > system suspend without userspace intervention, so allowing off mode > will have an influence even without uart runtime suspend, > and also probably for other powerdomains (non-core/per). > So we still need to be sure to handle at least some erratas and > context save/restore correctly. True that's a good point. > Your Idea seems to be in pseudocode > if (powersaving_wanted) > enable_off_mode() > > I had something in mind like > if (system_is_trusted_to_handle_offmode() > enable_off_mode() For omap3, the properties for "ti,twl4030-power-idle" or "ti,twl4030-power-idle-osc-off" mean just that. The PMIC is wired and configured for off mode, and those properties should not be set unless the system is truly capable of entering off mode. If not set, we should not enable off idle by default. Otherwise the boards should be already using just "ti,twl4030-power" or "ti,twl4030-power-reset". So it should be safe to set a flag for off_mode based on that flag during boot, or set a flag for off mode allowed if the flag is needed later on. Regards, Tony