Received: by 10.192.165.148 with SMTP id m20csp673076imm; Fri, 4 May 2018 04:42:49 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqd37FtJwwYlttsXr9KsbMTb0sWFBbVt0uGfmhxhI3infbaZOPt0/+Q/ejFn3IVedwaVJLM X-Received: by 2002:a65:4d44:: with SMTP id j4-v6mr5965030pgt.344.1525434169426; Fri, 04 May 2018 04:42:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525434169; cv=none; d=google.com; s=arc-20160816; b=rZOxgN6+D8swZE6Rnvn3qzWWWhEOPSvjXfjBPRdKRe361Mavon6eAvcHYUWbngUwW6 uQ1/mxz6q3wFW5Qx0xqG50yfi4GD9GXx2b2Z/kLNfzKSO99jjsEG2lTI+nCMw2e7JxZ8 fozJ/07Jsd/KzJ9kMtrbzPw35XYeXnYRirNBl4W+VjhTCb8a0a54fbKYtOkehwNNqOTx 86SJLGOIt12+90UV4i26/JH6ICggPk1YVGjyGTt5CEr2iSyCfxcXI0YQJ5+XjeaSM0dC xg2trRzLM2jABfWi2R2H5krhrdnYQuxSDjVAgR7ITb9ZhHZYdo92PNwrgg6gcjb08gyK Rtgg== 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=eydVPYIsIXoKCjm7dL7pQJkHt+uISrf1jp8gfhYoJtg=; b=y9yDt9FQT5+T+uV1pKyBdWh6x0915H6PNoo4bybVAnzlYrfutKirLgryhSRJ+oPEik jz7faiNxonxXf5eFlF7WDWIfJIsyYlyIG59hR0XjFAYYKnZAK17bLIzmKjN4zSkuVlWh tOPpJSkiH3i8aFQeP5BVhhm8pT0pr8Jf5lIRRFanstVvi4G4yUO2DrshQjuTwVE9HR+I LqGTCUdZZRyA72R0f1KIH+jPyKK5FgvmG/u5TCGXLIQSxd6LHw6navdpC0PstufJQxnu 0T8wvnKjFeKP3qRTft8rBVE5dwkJP99xpaVLYjO/iYELtADOn9j6Us9DlI8XtWwLSsZ3 fcFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=v+0AUmYM; 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 j125-v6si12806605pgc.553.2018.05.04.04.42.34; Fri, 04 May 2018 04:42:49 -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=v+0AUmYM; 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 S1751269AbeEDLmS (ORCPT + 99 others); Fri, 4 May 2018 07:42:18 -0400 Received: from mail.kernel.org ([198.145.29.99]:50034 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750866AbeEDLmR (ORCPT ); Fri, 4 May 2018 07:42:17 -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 0425221783; Fri, 4 May 2018 11:42:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1525434136; bh=MNTKmN8FAbJK7fkNSGZXkOzMdvm7XK6hd8iD01fyLHY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=v+0AUmYMb5+xvWsE3EdxsCAixH05A2p4sIhOh69cFKYOIfUyZBsJceTgkuYLOoP+4 vTb+oRbOLz8vO7EKUnV+kTjXQmDBqqL4Jio33snPEKoW+7taxmwagYJex2ql/w4JUe q8+6V7Hq3jzrfPLAspeuSNNrx7q57Ux8zFRIPBkQ= Date: Fri, 4 May 2018 13:42:13 +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: <20180504114213.3xlzqxe74n55tk5s@earth.universe> 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> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="fr6vxnvn3axa4j5k" Content-Disposition: inline In-Reply-To: <44A0BC7C-67C7-4116-849F-90FF7CF2B1F0@goldelico.com> User-Agent: NeoMutt/20180323 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --fr6vxnvn3axa4j5k Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable [+cc Tony] Hi, On Fri, May 04, 2018 at 07:16:00AM +0200, H. Nikolaus Schaller wrote: > > Am 03.05.2018 um 20:50 schrieb Andreas Kemnade : > > On Thu, 3 May 2018 11:35:21 +0200 > > H. Nikolaus Schaller wrote: > >=20 > >> I have realized that the w2sg0004 is an exception (although a Sirf chi= p) > >> that it does not provide a WAKEUP signal. And another significant > >> difference is that we have to keep the serdev UART enabled even if the= re > >> is no user-space client. Otherwise we are not able to detect unexpected > >> activity. So we unfortunately can't move serdev open/close into the .o= pen > >> and .close ops but need to open it in probe. > >>=20 > > how much power does it use to keep the uart enabled? Or should it > > better be reprogrammed as gpio? >=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). > > 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. 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): $ 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>; }; 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. 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). -- Sebastian --fr6vxnvn3axa4j5k Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE72YNB0Y/i3JqeVQT2O7X88g7+poFAlrsRw8ACgkQ2O7X88g7 +pqGdg//elQzv9AQMj6Bh2X1IMnncHM5o8P+66xvaTfO3HsdYPKnMchK3CaThTSg g3pGreNXkWqbj9YFiAWeyIAXs2WNjQ3dxtz3r3LuivdCboZ4BI7vnYj/mtZ8h5rP PYS7XarMTgAB0ieZgVfxUTP7+jJTAKdOOwICpO4A+pYXJAKjeH3HORAILhYyRs9L 7Ve0fEeNcdIp0XEQ9ZNH1698KhOmaBiPC5qekcNLA0jb1mg0czpcM7vXVfldqrNX 9pb9XDZNW2VmDUqISbf5oO2p25p34d02ffv0ccdXt0foGzb6Km/a6SufjcTtIcy7 Labmo1XNSQWuPxIM6o1FZFrfEE404k3zDdWN0H3QwNZ8EylWZBOVT0eZtmmr99Js AD7l1KzD+k1sVL1yJyAm4qr3armQkymDVraLi3QxU0iouhHNr++OP1eNx7Esbc4W zF07J0cuGdc2zQR+NkWKNc2K4UF0F6MjGd9n2jiHrMpyKy4ZgVkFH+qkGJcIG0tD QQpmoLrNlu9+nDjy8doACRd1+LZd2F5GqDfT7IGawNOo/qqvIjwKB7CbNhKymrow Yu/MgfOU0d+53VCU4uVruvdSKL1+c7fsf32fgfc1eqG1W01LQQmxTdIbH7vZlFab +ECGmzbz6wV5ePpRh5Uk5UepE7dLbgyDYB/RXxTtwQ/tQGytgEg= =bbq8 -----END PGP SIGNATURE----- --fr6vxnvn3axa4j5k--