Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp3100563imm; Thu, 17 May 2018 03:27:22 -0700 (PDT) X-Google-Smtp-Source: AB8JxZraxV+OeARrqhQZ8vJBFR9lpF8nzLm1G1LDx9c1vWeHPL04cW5hlglzKbUHvx20E5AjYBMr X-Received: by 2002:a62:2218:: with SMTP id i24-v6mr4630728pfi.53.1526552842868; Thu, 17 May 2018 03:27:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526552842; cv=none; d=google.com; s=arc-20160816; b=Au5cpbcskPN2OrwVpRfF321PF1zsmyNRszmOtg39TQqr21orqa2sAl6MoCX+Yctg8e vgCx6vTLuCrTP9YPzBO7v41FmD6+y7lAbB8LFVe++isuAoMX+YANxqDxgj2DIIzW5Xmv D0Xgr4xJFQBw7enD/Bt4kkjTS5j6QNqKV6p6ui0R+JNZ3bE8/Pd3C2Y9uo4w8hvCLclh FEmMkmL6sw0xEhF6EfvahfeaHHYE9MlWhjbw55tuG1mIxPZm1uYvFYJLV36PBrgk/jQC S6zusg8p3gJ5faJ4+jW1rdWSMk9/MBKG1FIcmAqXZZhwTy8jCluBhE1//jyFyT6ehml8 8lyw== 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=EVgObRDUitj8VOMOAJhPq3kOAHnLgEbdLCTiGI4jm5U=; b=YY29bQWNJSjavUPIvltjCnEcLcS8eL+1bWqf49XkfOd/rbCbCXBO4x5glKyBZxTsNE edgP7bzFCdK9ngflzJsFmnKkachlgWbg/8Ac9DWebWtBnS6IIZCzbplfqRi+505+wYC6 jVeom5nQ2lhgDbYI1HkRUR2adHK0j+uaK0WtWPmUSlxntaqGhgKL+ssT/Scu49EnJJqI Soyf0Ct74NSLF73xBWND4194aMVMjxpsR4UxkyCwF0wk0VfBN3JNo3UUcp4fZgFKhrvM p2si5jKZvwVI4j4V/TMgRy7Y9agTraBXgs8+tdUenNoujhp3mQKmxu4CzAWoFmaFhE0R 9EvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=IvS7m8QM; 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 s11-v6si3678575pgc.607.2018.05.17.03.27.06; Thu, 17 May 2018 03:27:22 -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=IvS7m8QM; 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 S1752160AbeEQKZH (ORCPT + 99 others); Thu, 17 May 2018 06:25:07 -0400 Received: from mail-lf0-f65.google.com ([209.85.215.65]:35470 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752083AbeEQKZD (ORCPT ); Thu, 17 May 2018 06:25:03 -0400 Received: by mail-lf0-f65.google.com with SMTP id y72-v6so7972513lfd.2; Thu, 17 May 2018 03:25:02 -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=EVgObRDUitj8VOMOAJhPq3kOAHnLgEbdLCTiGI4jm5U=; b=IvS7m8QM8hZTj0ehgp4+Zt2HJBz0LpTVf5rFjKfrL4b1iVjaHYxUXkTybLzcFQlOV0 ZZvDY5AC8ZIPiZD6ODu3Pv/HxbZBpa3pBZl0IB+tCqbTbElqXHYfGS0/MtU8FgBxg4cP rf0IoBtpa9jL9AhiwXnu6yE1bdxJgZcL1XZrdFH3+CMpS3cC4scNcHXIQkWFc8RNwo02 pArVmeRepu6mxsbED86Ph0AIQxwFbu+NyNPuAHTDRikoxOSbzvDRKgCcgASC83/qVuGe 4JQ5JJjls1Ii3bA9pvV7FKerHPQIjpiajfju5P0dXMM/C23XX+MDdBDf3yJE3tfjLXl6 h3NA== 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=EVgObRDUitj8VOMOAJhPq3kOAHnLgEbdLCTiGI4jm5U=; b=P7l+L07krt1S7NWD7h+cRWppxtW4oFa9jbIOdCo2QKdIHnAzdAJVEWLvrU7osIANa/ VedaSpWQy4h2XGQ+QyQ+YGlJ1NsshINdEr/L85ydFfqTQpWXuYq+jA//isLMWh9vyIIf csKOOfR7KYqVksXZxNxTrTyiss21e9ZJrX/Nueqvq5qA0QFuzTLkGZtMn6a+Tf4psJT+ suM+WZdFJUhZc0Txt9G7cY/+kKYmkeupUCibNOOXCOrwm+gow153AnWfYgZmgovr0f6t kjDgopdwC0YGXY+cJy8Yu8xL40tyeEJ8nDlRBvzUoLdVB9EhxT/8pzdjGcBk5qswF8rj HCMA== X-Gm-Message-State: ALKqPwfNJYmVEZYJFZskbx9lXcZG4bn8HUxyT/dwl6LCO8WYS2APAGRQ VC85MfnykDQ6zgLdYL37ta4= X-Received: by 2002:a19:b257:: with SMTP id b84-v6mr16938220lff.84.1526552701633; Thu, 17 May 2018 03:25:01 -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 a14-v6sm1129828lfh.80.2018.05.17.03.25.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 May 2018 03:25:00 -0700 (PDT) Received: from johan by xi.terra with local (Exim 4.90_1) (envelope-from ) id 1fJG5m-0008F8-GX; Thu, 17 May 2018 12:25:02 +0200 Date: Thu, 17 May 2018 12:25:02 +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-pm@vger.kernel.org Subject: Re: Serdev runtime PM (was: Re: [PATCH 4/7] dt-bindings: gnss: add u-blox binding) Message-ID: <20180517102502.GJ30172@localhost> References: <5242FCAD-3139-4A9C-B9FA-7BBAA0E6AE57@goldelico.com> <20180503205037.7be552c1@aktux> <44A0BC7C-67C7-4116-849F-90FF7CF2B1F0@goldelico.com> <20180504114213.3xlzqxe74n55tk5s@earth.universe> <20180507100135.GS2285@localhost> <20180507154515.GP98604@atomide.com> <20180507163439.GV2285@localhost> <20180508155608.3bzcbepsmoskhlox@earth.universe> <20180509091831.GA2285@localhost> <20180509140550.GC98604@atomide.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180509140550.GC98604@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 On Wed, May 09, 2018 at 07:05:50AM -0700, Tony Lindgren wrote: > * Johan Hovold [180509 09:20]: > > On Tue, May 08, 2018 at 05:56:08PM +0200, Sebastian Reichel wrote: > > > I think using open/close for runtime pm is good enough for GPS, > > > since it regularly sends data and draws lots of power anyways. > > > But devices, that have an out-of-band wakeup signal can do proper > > > runtime PM of the serial port without loosing characters. > > > > Yeah, there may be some applications where this is possible. And this is > > not the case for GPS, but not just because of a generally higher power > > consumption, but due to the fact that we cannot afford having the first > > message in every report burst be dropped. > > Well most of the phone implementations use one or two out of band > GPIOs to first wake the UART before any data is sent. For serdev > this can be called from the serdev consumer write function for TX. > For RX, the serdev consumer needs to implement an interrupt handler > and wake up the parent UART before serdev RX. Right, but the client driver would then wake the parent controller when expecting RX, while waking its own (serial-attached) device when wanting to do TX. Just for the record, we also cleared this up here: https://marc.info/?l=linux-kernel&m=152604434504868&w=2 > > > Note, that OMAP does not reach deep idle states with active > > > serial port. This is not acceptable for low power devices. > > > > Sure, but note that OMAP is the only serial driver which currently > > implements this kind of aggressive runtime PM (besides a couple of > > usb-serial drivers). This means that a serdev driver can never rely on > > this being the case, and therefore needs to be restrictive about how > > long the port is kept open if it cares about power at all. > > Well by default we don't allow lossy UART. It needs to be manually > configured via /sys for the timeout. With serdev, this can all be > done with no /sys configuration needed for the cases with GPIO > wake irqs :) Indeed, but serdev client drivers must also work with serial drivers which do not implement this kind of aggressive runtime PM, and then the only way to save power is to close the port when not in use. Thanks, Johan