Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp3085631imm; Thu, 17 May 2018 03:10:24 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqncEmFZKHCeyfhjtM0lTZiU7Bq6Av0SaiXfEdlHSPo8JPxtLLJ6+P3J3OyWKcpVT8Rdqd7 X-Received: by 2002:a17:902:24e:: with SMTP id 72-v6mr4538630plc.87.1526551823899; Thu, 17 May 2018 03:10:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526551823; cv=none; d=google.com; s=arc-20160816; b=tBDfWGwyYGJ6oShF+nmJRMBFOptYtUORby/WCgCZ6go3oOLfBQDXB1P3E4+xlfYDmf //FaipskoF71p9dDkb980PLCVXYZJKIR36QRdXrt+U6LFhzK12GBSTJKjrYPt1xsFqPJ gGIq2W4bRjOtal7KvzYP1yD9AvLWjDIgsJfNFUfdvtd+NHPW9DbSx0r78xiwYb2jZ6MK xD/f6L61fMiO9MV5xVZbWPwHfz2637xy2LlXUGO/JIcPc9mPfJ3INqaXbsRuDONUx1y7 gNAj420XEBGJCquuDIeDPua9NnerJEUkAUeY+eLMDuECw5VAlWFjB9MsBL2sGLDnL91s P/Lw== 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:arc-authentication-results; bh=82iiPBgu3p88DIHCjcvEwVhkn/nBOuPaVbQW1W1v+Dc=; b=XhggU5orwb3GF6RlI4ZDuojQzh97X+1YnQG/2QT65zK5gMeuT21R/r57YWqMv2ABXr UnGKSyPaE3Xe+eWx+g5RMIeW9+nDvLlVLpPqpqw974x4fiuJQPY38LIjWf6RJxCXp/4m fL/Iv4cYkjoNftNvMSznDezDBrrRPHIl7Y8YmO8cuJpe4z3vCe7Td3J4IURMgMlSfi+s LuKwIjTunZVEQiXDVSScdCtfarWWcO4ZBKjiSj2M1XWhvWwWsdNb3bdT9Aia2U4dpQW3 UDl8ik5hRuIBHS8ntlOrvwbNhYBtjSR00cY9HA6a5A30/WmqzcUVsKeNejO7fU9WrdiV H3Gw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=jWXp9tAG; 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 q23-v6si5015980pfj.8.2018.05.17.03.10.09; Thu, 17 May 2018 03:10:23 -0700 (PDT) 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=@gmail.com header.s=20161025 header.b=jWXp9tAG; 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 S1751977AbeEQKJw (ORCPT + 99 others); Thu, 17 May 2018 06:09:52 -0400 Received: from mail-lf0-f67.google.com ([209.85.215.67]:37637 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751293AbeEQKJt (ORCPT ); Thu, 17 May 2018 06:09:49 -0400 Received: by mail-lf0-f67.google.com with SMTP id r2-v6so7906046lff.4; Thu, 17 May 2018 03:09:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=82iiPBgu3p88DIHCjcvEwVhkn/nBOuPaVbQW1W1v+Dc=; b=jWXp9tAGVVRO0sPycMOl3Bj3C6KwMd7WvzrkZeEa33QuOeJjlsAjecTRuivuLyRIJW 3YhbJ6m531VmcrLWeNqB8T9mLBGOQ/eFC/DEYhMYhs3qA5aDZJJmHfbkIDGEYglmLvIy 17Y+smKhPp0CgV5K9psylpmSZaZRa1wciuTeUxBrRH17x184NCMHvfJHKcszqQWZunQK XVL2SZz4HCnsnAK+cYS1Ptq2LjuHwmu6Wtfy0op03y9M7LAn63faOpTBmQn6y4wn9d3g +BTNP3avr+EVpZE8ZRxaBIiA3x5ippgGpodbNMWAi7BuBObR1VXQpi6uzicxlwiukDfy drQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=82iiPBgu3p88DIHCjcvEwVhkn/nBOuPaVbQW1W1v+Dc=; b=sUeShdNb1hjdE24h/hxnSH2CrSijsiJcH+AunRUE4+9nFNqruG01WmPZkiG/kSn5Qs i8oGgRzPna5cHtNTxU1cWg8ByAD6YmTOq2uv9lX1O4m6/EYn7jDV27UGMCfcWP4clHN5 5i0Fllc8QF4K2FnSn6XsEf0oVjwwHOehRm9VTefu6llau3r2DwV0CYXoka9e2BM2ctLJ J9fxIXTaAHR/bh/Rk/92rX+99IPsnsTSvNhldml5hJ2cR7SvbSbdwDSGwMQ+zeSpqDzO ZN2EqPjK+NL+J2r8+8OA5wagXD4Jri0gMY/fmcvFG9FMfubkiwv8Ny1oWxXHWss6PxVm kxrw== X-Gm-Message-State: ALKqPweF+ydAj4O6vgwafaxqSDEQq3QPyYA1SFu/DPbvWzX03BCRh4Zy IPLBKbWVGVBqVV77R9Fb3O8= X-Received: by 2002:a19:180a:: with SMTP id o10-v6mr18084838lfi.18.1526551787605; Thu, 17 May 2018 03:09:47 -0700 (PDT) Received: from xi.terra (c-8bb2e655.07-184-6d6c6d4.bbcust.telenor.se. [85.230.178.139]) by smtp.gmail.com with ESMTPSA id f10-v6sm784739ljg.2.2018.05.17.03.09.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 May 2018 03:09:46 -0700 (PDT) Received: from johan by xi.terra with local (Exim 4.90_1) (envelope-from ) id 1fJFr2-0008Az-1U; Thu, 17 May 2018 12:09:48 +0200 Date: Thu, 17 May 2018 12:09:48 +0200 From: Johan Hovold To: Tony Lindgren Cc: Johan Hovold , Sebastian Reichel , "H. Nikolaus Schaller" , Andreas Kemnade , Mark Rutland , Arnd Bergmann , Pavel Machek , "linux-kernel@vger.kernel.org" , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Greg Kroah-Hartman , Rob Herring , linux-serial@vger.kernel.org, linux-omap@vger.kernel.org, linux-pm@vger.kernel.org Subject: Re: OMAP serial runtime PM and autosuspend (was: Re: [PATCH 4/7] dt-bindings: gnss: add u-blox binding)) Message-ID: <20180517100948.GI30172@localhost> References: <20180507154515.GP98604@atomide.com> <20180507163439.GV2285@localhost> <20180507175032.GR98604@atomide.com> <20180508065852.GW2285@localhost> <20180508152228.GV98604@atomide.com> <20180508154756.GW98604@atomide.com> <20180508155405.GX98604@atomide.com> <20180508164904.GZ98604@atomide.com> <20180509131003.GC2285@localhost> <20180509135706.GB98604@atomide.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180509135706.GB98604@atomide.com> User-Agent: Mutt/1.9.5 (2018-04-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Sorry about the late reply. ] On Wed, May 09, 2018 at 06:57:06AM -0700, Tony Lindgren wrote: > * Johan Hovold [180509 13:12]: > > It seems we really should not be using the negative autosuspend to > > configure the RPM behaviour the way these drivers do. Perhaps a new > > mechanism is needed. > > Hmm well simply defaulting to "on" instead of "auto" and setting the > autosuspend_ms to 3000 by default might be doable. I think that way > we can keep use_autosuspend() in probe. Let's hope there are no > existing use cases that would break with that. No, defaulting to "on" (i.e. calling pm_runtime_forbid()) wouldn't work either as that would also prevent the device from runtime suspending just as the current negative autosuspend delay does. I fail to see how we can implement this using the current toolbox. What you're after here is really a mechanism for selecting between two different runtime PM schemes at runtime: 1. normal serial RPM, where the controller is active while the port is open (this should be the safe default) 2. aggressive serial RPM, where the controller is allowed to suspend while the port is open even though this may result in lost characters when waking up on incoming data For normal ttys, we need a user-space interface for selecting between the two, and for serdev we may want a way to select the RPM scheme from within the kernel. Note that with my serdev controller runtime PM patch, serdev core could always opt for aggressive PM (as by default serdev core holds an RPM reference for the controller while the port is open). Thanks, Johan