Received: by 10.192.165.148 with SMTP id m20csp1514864imm; Sat, 5 May 2018 14:12:23 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoZssmFVDP8IivoLn4JHvUhP4jrceQs85cgp5PzaC1s6h915FNiop6cn0Mu0Lu639AdcRgz X-Received: by 10.167.128.198 with SMTP id a6mr10207672pfn.120.1525554743526; Sat, 05 May 2018 14:12:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525554743; cv=none; d=google.com; s=arc-20160816; b=AMQSDdoltIlg2/+oXYTVJnNNWha00gMOIljlZPATeIYbNUdvI9k0VyjGqRdZvvLngD jNX2p8BvnNjnpgnI8FYKD+ZRKbcR2vJ3vN1pwsAVDrLTfjPeynbPeZ75xB4vFV2DnBnK Ef+xle9dXA+UUHu3qNKLeG1pGAkbHEk8TrL565ZrgShgk/5DRSGe3w1c5mWfK4IB6Y4+ DgQhYcUfp+bVqiuk+1UPKdh9I1NQGA+chpYV+WP5mVHTXXPm5F5gBSFn3DauXpgCrF11 j0n/G5VbPfKjQs5eaL3h04L3ql4gPKheVy0vqn2ntiWBt+WTW2NSz+6wo7OGhYsjk6Fa KKQg== 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:arc-authentication-results; bh=6FM6jXIfnfDkgyouNczYV2veW5MuHgXWGwuTshGQdgs=; b=jWqMHLgoVGuzzzeI4eYFvlHW3mYKxxaG2ESbbPoLrz4vtsdzfP7WCwB7w+xRuszqGI GDoWWPt41lG3o95MM0oyz5EwMkQZgLRkqRiZXR2TSHeccOGJn+QfE1icTAoHYtqyipQ7 XVrnbbkjqJoC+KYgIIXyuWNu/UeEabSnM9i64513X8A1vSGJBoD3QZm22Va3rzdtAY/a mvxfey6Yh+VwEugag35UybGSm5Me77IiVZ/ndszpsUKw7CuVXwQwNh0y3r0350Ut8KzX Sst0NOonwU7QBw/pI/agsH5sDxj6DMtaGUt3/uFsN+Mqf2q1T6Yh+YEvrOCf5J+1kwgR 6OQw== ARC-Authentication-Results: i=1; mx.google.com; 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 w13-v6si15109570pgq.385.2018.05.05.14.12.09; Sat, 05 May 2018 14:12: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; 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 S1751893AbeEEVLh (ORCPT + 99 others); Sat, 5 May 2018 17:11:37 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:37017 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751874AbeEEVLc (ORCPT ); Sat, 5 May 2018 17:11:32 -0400 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id 0C33F8048F; Sat, 5 May 2018 23:11:29 +0200 (CEST) Date: Sat, 5 May 2018 23:11:29 +0200 From: Pavel Machek To: Sebastian Reichel Cc: Johan Hovold , Greg Kroah-Hartman , Rob Herring , Mark Rutland , Andreas Kemnade , Arnd Bergmann , "H . Nikolaus Schaller" , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: Re: [PATCH 0/7] gnss: add new GNSS subsystem Message-ID: <20180505211129.GA762@amd> References: <20180424163458.11947-1-johan@kernel.org> <20180504132741.brn5jqv5ufjhp7ky@earth.universe> <20180504200315.GA22519@amd> <20180505172847.qqpqkrfspak53sc6@earth.universe> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="2fHTh5uZTiUOsy+g" Content-Disposition: inline In-Reply-To: <20180505172847.qqpqkrfspak53sc6@earth.universe> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --2fHTh5uZTiUOsy+g Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! > > > (*) I have those in mind: > > >=20 > > > Nokia N900: The phone has GPS integrated into the modem and uses > > > ISI encapsulated data. The protocol has been reverse engineered > > > and it should be possible to write a kernel driver for handling > > > the GPS packets and dumping the raw data to /dev/gnss0. I don't > > > think this is particularly useful without a non-raw interface, > > > though. It would still require a custom userspace implementation. > >=20 > > Actually... in this case it would be nice to do the protocol > > processing in kernel and just present reasonable interface to > > userland... or maybe NMEA. >=20 > Converting a binary protocol to NMEA, which needs to be string > parsed is not very nice. I think first step would be to write a > simple driver, which exposes the binary location protocol without > ISI header. Then in a second step we can think about a reasonable > interface, that should be supported by all GNSS devices. Well, most of the userspace expects NMEA. So yes, its an ugly protocol, but .. it is not really a high-performance device. I'd suggest modeling this over input subsystem. We could use similar tag/value/sync protocol (evdev). In similar way /dev/input/mice was used for running legacy apps during transition, we'd have /dev/...//nmea. > > > Droid 4: GPS is similar to N900, but different protocol and QMI > > > encapsulated. This one also has known protocol with userspace > > > implementation. I did not yet have a detailed look, if its possible > > > to (un)wrap this in the kernel. > >=20 > > So, this is actually NMEA over QMI. I do have patches libqmi that > > provides NMEA on stdout. >=20 > Ok. So raw data is NMEA for this one. Should be reasonably easy to > write a driver exposing this via /dev/gnss device. If we have qmi implementation somewhere in kernel. Do we? > > But there seems to be another possibile interface (yes, that modem is > > crazy, and you can talk to it over few different interfaces), and > > that's NMEA over GSM07.10. That one should be feasible to decode in > > kernel and just provide NMEA to userland. >=20 > I think both should be feasible. I suggest to wait a bit more > until you and Tony figured out some more details. You've got > the libqmi patch as workaround for now and we want a stable API > later. I do have the gsm07.10 one now, too. That one is certainly simple enough (and should eat less power -- no need to keep USB running). Best regards, Pavel --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --2fHTh5uZTiUOsy+g Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlruHgEACgkQMOfwapXb+vJk1gCeMYvDY4pls3Zdi4tZvHvF5ox4 bIIAmwR23q1w4QTtHnXRq8T4qcEh3J9M =z0kI -----END PGP SIGNATURE----- --2fHTh5uZTiUOsy+g--