Received: by 10.192.165.148 with SMTP id m20csp55586imm; Fri, 4 May 2018 06:38:33 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpp1gpiWtYFRFWGJPKF3LylCoCRyHs7U/YMszPO+U9F9wxrJAUYph2IrarSqARvYlNIEmPV X-Received: by 2002:a65:4102:: with SMTP id w2-v6mr21559421pgp.31.1525441113437; Fri, 04 May 2018 06:38:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525441113; cv=none; d=google.com; s=arc-20160816; b=PiCpLyZ5fxf4HU8tflHZG0yCrBQi8h8MT3q5hofNUvh9MbgjQapoD5ljILrfzvx45T DfWaADtul3IrazThdZy7kq9H2AGz0cdgHMOqnFmrbF/2Ip8xG8gq1nXAi7dVhSz0blpO xk5FcGg8dsTKKrsAMl7HHIvu+uu9mnA/hHuCz8LA9fJsUIXRHRHNmEjQH66R2uPfMIGz xLMC6o1pNDo2ZSNvcL854VXthLPFI93HlOMWrgkn221Wq3FRYjrjCtxUNy4zf9vQ7yv+ ZAwFmF7AIRULkaUXJqBoEEYzffEPHsTmZOOyifvrk4ksV8ZNzYIMRUMtNHJyckPYASMl lAPw== 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=rTL3CevQ7xXae47VlwBMVYWXRjJ90rqwIA+mmSGggu4=; b=RxcWA7h6an1V2RxoX55kHKZqglsYeKt3Tiyga/sn2rOIhSMETVUoASrSft1l2In8R4 hhs7jjIlW4x3gq8azoWWUi/FclnD1C+VdJD/TqcJl4RWM6vdF5Lt/XBQ/dVI2bFUEEdp rwyPj2p/8155s2LFahJflMOofK/vpV7gMAXMM47EJIwuqRVzeYvlo4xrJs1BimoNv/Pn 8XhodYzlnxRdfA4A9LDrUnFLO0I4JYPrvp2z2B26evYRLttM9tT7cLWwsXK4kJ6KxkhN jFv4Zbrdui+cK0yhbp99wzBDq68Psx6upibOrJrMtXcS7tyf6FHkq6+/T4r9KIQJbnYQ RgAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=dzUZu6eo; 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=pass (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 b5-v6si7909226ple.417.2018.05.04.06.38.18; Fri, 04 May 2018 06:38:33 -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=pass header.i=@kernel.org header.s=default header.b=dzUZu6eo; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751302AbeEDNiE (ORCPT + 99 others); Fri, 4 May 2018 09:38:04 -0400 Received: from mail.kernel.org ([198.145.29.99]:55038 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751114AbeEDNiD (ORCPT ); Fri, 4 May 2018 09:38:03 -0400 Received: from mail.kernel.org (host-091-097-030-018.ewe-ip-backbone.de [91.97.30.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id F304A21707; Fri, 4 May 2018 13:38:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1525441082; bh=ivbC/sxUIo3LVs0rcxV/xedgDjVxT12vSjWWroIIbiI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=dzUZu6eoyADWfx4gbK0Zdsw9jLjcl68OLq+yHCQd+5V2IjE5OXtFueEubH7q7mKiy ItJ8+VGa+TYHjTzr6trPDezUQGHorVSIb7R0+EllkU+1Wy3AR/Sd0dXk8vae/AZIB5 WVVzJ6MQCGaSNdrOejz7uE9RDz/aeDmx4BrSzK+o= Date: Fri, 4 May 2018 15:37:59 +0200 From: Sebastian Reichel To: "H. Nikolaus Schaller" 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 Subject: Re: [PATCH 4/7] dt-bindings: gnss: add u-blox binding Message-ID: <20180504133759.xauwewrqevsbhjyr@earth.universe> References: <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> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="b3dmbfubuz4ltplf" Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180323 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --b3dmbfubuz4ltplf Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Fri, May 04, 2018 at 02:04:15PM +0200, H. Nikolaus Schaller wrote: > > Am 04.05.2018 um 13:42 schrieb Sebastian Reichel : > >> 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 o= ther > >> 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-li= ne > >> 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 th= is > >> 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_d= elay_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). >=20 > 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... >=20 > 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. >=20 > If there is no response after turing off, the module power state is alrea= dy > 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 wro= ng > state. That sounds like a good plan. > But I think we should focus on the basics of this driver first. Then it c= an > be optimized later on. Definitely. -- Sebastian. --b3dmbfubuz4ltplf Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE72YNB0Y/i3JqeVQT2O7X88g7+poFAlrsYjIACgkQ2O7X88g7 +pqczhAAlYu484CN9moEQUVNT6heZ47nborx+QPwEiRNcPnpzP7N+h2z9CuKXpOL /NbpEYW2gUguM629q5BSrJEbtnoQqbe0GyLvcqv9OE10Vwt/GtuiixrS6410AEJE 1yG0x/0QAfM2yYLxxl6ClzwH03uWgOqkMgJknyos4ov41nExQyZHA7zaqvj2N7l4 dhkp1gg4DeLDAqbznrDu9NwNMs/u3oGM3dcG/9veJ0QcVbrij6dsBoavGp+jT4fe Rm1etml6w1F3UiGu7wQOuyyM4P6qIlFXhevZVqXPz8o1naIVfWktf4p1mRhLi85C tI6+a9u0cI3MT3KPH2K+6u8lGf26egZHIEGzLX0giI8UBefSZ85QWdgSsS4VNBb+ uXxzRNtvisgjZ9WFBqL2OWJ/L/n04Y1Ey/dwUyQuoaXNSrAggVg5rYT0U4Xbu4BP eR1UWvO9jy1eNOIZEx8ZxeTxBEducv99Z8T4BRqKbRnYmydPyO4VwEwpaqR2/1eo dVVGNpCiuu3cvi6iJK/iyBjr7iF/CFSP5biE64RghDUv8X+lYPetsdMnwmIiMJ8a hqDcaFtAOCRgEcj1OOZWIvYRuqop1SJlfqJLkGigEcVRJPFiXjT/ixG2ShjgbR0q zIUSWLGgTgz4rXagyPOPhKqdck/ofqUKfAeqjwiXvoPNGJ5gvIM= =Htwd -----END PGP SIGNATURE----- --b3dmbfubuz4ltplf--