Received: by 10.192.165.148 with SMTP id m20csp694182imm; Fri, 4 May 2018 05:04:50 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpudiK+Z1JDa9Ndi2MFve/NjKjVw824CYyligPtprLyJAN6tj2FbEWwNGsUDXIzHVl9pbOw X-Received: by 2002:a65:4907:: with SMTP id p7-v6mr22203499pgs.139.1525435490568; Fri, 04 May 2018 05:04:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525435490; cv=none; d=google.com; s=arc-20160816; b=lKVzeg+iCDEIXlHJhnS+NHqS5z1cahLnzz3hAENpinBW+HzLl/QRmJkk5imn7Z3Cat 6EyTePBUuQg7zUnTsX3+rTxiLEtUOJARNcu+4L5t5d5mCc6YwhO5ux3RHY0xsEaSu9Qo ACjDaQIhLyOr5eTzJXnfAVmBMwLWWCwTe3/1aYQE3QKKal316Det5C0qFrpndluKX4gp K0O2/JEzEhOtiQ5zllRiw56QZiXTyE/APz5Lt0UqGNkS9B3vmjn7gUf5KvqYUAFxhpL3 gVf99Qp3wCEZfgXM6oui6EkJRkfzJkaikebaBJ7mpxD6czqDf8bFaQXYJAa1M+cd8KHO Nf5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:dkim-signature:arc-authentication-results; bh=Mx2mIqoNtfVm0FXmDOvXdi5ld33SamGjRjXIi1UNKrM=; b=inn76lVTuiWf5q6FcmaMYtfSlc4fCc7GBrqsBzjrFMAGcDH58RR2mn0mhXV6GivzZv ap8D0GF/xQZTfx3QdZx6OOZmxudfHMWdWV9haW6geTlQaEd9XXc25k2TfkLW2ja+2tzB RyRCtQ+DWtn3OhWt6GdBHXqosZtEKbEvUaSmIL2h3Htq7fK2IRdFNeMpMNTrNX9MJBS4 ijcCdwsuDukZXLZ8agnB/z57igzGpaXD9v++q4bsx/TM3SASzXJjgECFHFCqDf88Hi+i HuyrVdyILWSs+b9MhernPygvPsYLZ20RB4AOKC1MYf497MMPWxaouy2PEC4eCNxF2Oke ZCRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@goldelico.com header.s=strato-dkim-0002 header.b=FYC7I8Sc; 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 u13-v6si4685014plq.161.2018.05.04.05.04.35; Fri, 04 May 2018 05:04:50 -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=@goldelico.com header.s=strato-dkim-0002 header.b=FYC7I8Sc; 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 S1751311AbeEDMEW (ORCPT + 99 others); Fri, 4 May 2018 08:04:22 -0400 Received: from mo4-p01-ob.smtp.rzone.de ([85.215.255.52]:24890 "EHLO mo4-p01-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751001AbeEDMEV (ORCPT ); Fri, 4 May 2018 08:04:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1525435459; s=strato-dkim-0002; d=goldelico.com; h=To:References:Message-Id:Cc:Date:In-Reply-To:From:Subject: X-RZG-CLASS-ID:X-RZG-AUTH:From:Subject:Sender; bh=Mx2mIqoNtfVm0FXmDOvXdi5ld33SamGjRjXIi1UNKrM=; b=FYC7I8Scs2AiE4YcUuqRtHDSHJU0u73EeVDrgL1/UsiCIiJwjNE97kk2gw5yH6JVMM 7s8Ku53ho33hgx4dkCnwVOk8m6jZLY9GkaOegzX01HL09q2zTk64mgeFNFjVYAacgt7C tUrkX7axHI72ZVPZHZrVYrx5yekhe/B+z64AycmLlxd0aEr712fLzedVmAL4qJ/BUKPS Wh7uwsQyMm7G/H5sWgrevh2sCUjLIDZAyi8Qn9buQdqgr4Jhfx9ndqSmRRu9HJQXE+ka AvYkSH1eTFcObClpZT0rZC0EeqT1uoVGvtJK1zRm1xDclVhlMAeq3dCbxr4RRXZL1w+3 TaXA== X-RZG-AUTH: ":JGIXVUS7cutRB/49FwqZ7WcJeFKiMgPgp8VKxflSZ1P34KBj4Qpw87WisNN9EVM=" X-RZG-CLASS-ID: mo00 Received: from [192.168.2.121] by smtp.strato.de (RZmta 43.8 DYNA|AUTH) with ESMTPSA id D0a232u44C4G3uZ (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (curve secp521r1 with 521 ECDH bits, eq. 15360 bits RSA)) (Client did not present a certificate); Fri, 4 May 2018 14:04:16 +0200 (CEST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: [PATCH 4/7] dt-bindings: gnss: add u-blox binding From: "H. Nikolaus Schaller" In-Reply-To: <20180504114213.3xlzqxe74n55tk5s@earth.universe> Date: Fri, 4 May 2018 14:04:15 +0200 Cc: Andreas Kemnade , Johan Hovold , 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 , Tony Lindgren Content-Transfer-Encoding: quoted-printable Message-Id: References: <20180424163458.11947-1-johan@kernel.org> <20180424163458.11947-5-johan@kernel.org> <20180426091018.GU4615@localhost> <20180502081637.GE2285@localhost> <5242FCAD-3139-4A9C-B9FA-7BBAA0E6AE57@goldelico.com> <20180503205037.7be552c1@aktux> <44A0BC7C-67C7-4116-849F-90FF7CF2B1F0@goldelico.com> <20180504114213.3xlzqxe74n55tk5s@earth.universe> To: Sebastian Reichel X-Mailer: Apple Mail (2.3124) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Sebastian, > Am 04.05.2018 um 13:42 schrieb Sebastian Reichel : >=20 > [+cc Tony] >=20 > Hi, >=20 >> I think it does not need much more (if at all) than a gpio controller = on >> the OMAP3 chip (I think the clocks are active anyways for use by the = other >> UARTs). >>=20 >> We had proposed years ago to reprogram the UART RX pin by = pinmux-states >> into an interrupt gpio but that was rejected because it was not = general >> enough and ugly in the device tree (an rx-gpios record where the = rx-line >> is already connected to the UART-rx). >>=20 >> Then we did experiment with tapping the UART driver and finally the >> serdev API was developed to solve this problem. Hence we use it now = this >> way. >=20 > Having any UART active on OMAP results in the SoC not entering > idle/off wasting energy. For normal (i.e. not connected to a = peripheral) > TTYs you can enable runtime autosuspend and configure the RX pin as > wakeup interrupt. This will wakeup the TTY on incoming traffic, but = you > will lose the first few characters (since the serial device needs some > time to wakeup). This is for example supported by the N900 uart3 > (debug uart): >=20 > $ grep -A4 "&uart3 {" arch/arm/boot/dts/omap3-n900.dts=20 > &uart3 { > interrupts-extended =3D <&intc 74 &omap3_pmx_core = OMAP3_UART3_RX>; > pinctrl-names =3D "default"; > pinctrl-0 =3D <&uart3_pins>; > }; >=20 > To get it working, you also need to enable autosuspend for the tty > in userspace (echo 3000 = /sys/class/tty/ttyS2/device/power/autosuspend_delay_ms). > This is not enabled by default due to the character loss = characteristic > during wakeup. >=20 > Having said all of this, serdev does not yet support runtime PM (at > all). Tony is currently looking into it. Fortunately serdev allows > us to enable runtime PM by default (once implemented), since we know > the remote side and can (hopefully) avoid losing characters (i.e. > with sideband wakeup gpios). thanks for explaining this! We originally had similar thoughts when proposing a w2sg0004 driver for the first time (years ago), but we can not accept loosing characters... Now, I could imagine a potential solution. The key situation why we keep the serdev open and listening is if the driver did try to turn the = module off, but in fact did turn it on (because it was not in sync). It should be possible to cover this by a timer that is started in this case. If there is serdev data received after assuming the module is turned off, the driver has detected the wrong case - and can safely close the serdev until we want to have it powered on again. If there is no response after turing off, the module power state is = already in sync and we can close the serdev as well - after the timeout (let's = say 30 seconds). Then, the serdev UART can idle. We should open the serdev and start this timer also in the probe function to catch an initially = wrong state. But I think we should focus on the basics of this driver first. Then it = can be optimized later on. BR and thanks, Nikolaus