Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp7748819imm; Thu, 28 Jun 2018 08:46:46 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfz1ciJYDX0MOrIEVkZ5kQYRNnK+l8a5+PHf1IbKfAjkFMr0UtDupalwhQVEShr7fujjqxl X-Received: by 2002:a62:ae08:: with SMTP id q8-v6mr10045209pff.126.1530200806793; Thu, 28 Jun 2018 08:46:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530200806; cv=none; d=google.com; s=arc-20160816; b=uKo3RAiVpJHXyBztJOqr516oLNgoKuLoEGOKtlqInEcRfqAogsq55ibEbh+U7x+7Sx 6y8ZetySHcwrWhrPtOxOO4o88pVyuIZnMTDPu8VMPLBaisPglioT4n/k+ATTgnd/fNVr 8e3vAIRzw88iNVAgSNj1XwPCIrzGa3fxJ+1z4OlaLR0PgoIOVN2t8okspOeruhf2MzHD cvKr2+EvnPLdkeT+cZJK4sfFNfr+WY3ecpqjkwufpgkkU97sBC6vJpxNvkVcEXMMGuFx Dxnaex58pWm0Qii4lrFotA6zxbIdIMjkNHcYU2ChlGREOo4g4hlN9aM9Alpaea5Up6sI 5CNg== 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=MLlVdvx9tWnmL8E9xd2TgtiqxmHHDvtiNejYs/Y7dXg=; b=TbIrzmJHo4DO7M9JJmXeP9jgEHeUMX7gctgBHvjbHJ6xt3kIRFlCor647UEscwRgQQ BTTWSufCwW9tI2afgZzwfMwnHuM4BBxwNAG+/IZgmoImbyxBB3P4yUhs3VeKnrtPNBu3 fhn39na+3B60eo29Ocjl45a1+LN2KFIMxr3OaqI4wYoT24gfO/cBeRmbaxRgKuk9ush7 wG/3C5MMiN9Ah+11JWIoaZY+bNjo/nyB0l5+381VTWQ9PWb3jg4aBwfqCD98E/MnkhiS /IOBNfK7A5wuh2YT0KPXhtyFj0Ec6smAen3MBsgu4z1ZrMbN3O8JPU84axmss8o8W5Bf c87w== 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 b18-v6si5976084pgs.417.2018.06.28.08.46.32; Thu, 28 Jun 2018 08:46:46 -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 S934571AbeF1MHt (ORCPT + 99 others); Thu, 28 Jun 2018 08:07:49 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:36098 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934421AbeF1MHs (ORCPT ); Thu, 28 Jun 2018 08:07:48 -0400 Received: from localhost (unknown [104.153.224.166]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id CE1DECC9; Thu, 28 Jun 2018 12:07:29 +0000 (UTC) Date: Thu, 28 Jun 2018 21:01:03 +0900 From: Greg Kroah-Hartman To: Johan Hovold Cc: Rob Herring , Mark Rutland , Andreas Kemnade , Arnd Bergmann , "H . Nikolaus Schaller" , Pavel Machek , Marcel Holtmann , Sebastian Reichel , Tony Lindgren , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: Re: [PATCH v3 0/8] gnss: add new GNSS subsystem Message-ID: <20180628120103.GA28131@kroah.com> References: <20180601082259.17563-1-johan@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180601082259.17563-1-johan@kernel.org> User-Agent: Mutt/1.10.0 (2018-05-17) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 01, 2018 at 10:22:51AM +0200, Johan Hovold wrote: > This series adds a new subsystem for GNSS receivers (e.g. GPS > receivers). > > While GNSS receivers are typically accessed using a UART interface they > often also support other I/O interfaces such as I2C, SPI and USB, while > yet other devices use iomem or even some form of remote-processor > messaging (rpmsg). > > The new GNSS subsystem abstracts the underlying interface and provides a > new "gnss" class type, which exposes a character-device interface (e.g. > /dev/gnss0) to user space. This allows GNSS receivers to have a > representation in the Linux device model, something which is important > not least for power management purposes and which also allows for easy > detection and identification of GNSS devices. > > Note that the character-device interface provides raw access to whatever > protocol the receiver is (currently) using, such as NMEA 0183, UBX or > SiRF Binary. These protocols are expected to be continued to be handled > by user space for the time being, even if some hybrid solutions are also > conceivable (e.g. to have kernel drivers issue management commands). > > This will still allow for better platform integration by allowing GNSS > devices and their resources (e.g. regulators and enable-gpios) to be > described by firmware and managed by kernel drivers rather than > platform-specific scripts and services. > > While the current interface is kept minimal, it could be extended using > IOCTLs, sysfs or uevents as needs and proper abstraction levels are > identified and determined (e.g. for device and feature identification). > > Another possible extension is to add generic 1PPS support. > > I decided to go with a custom character-device interface rather than > pretend that these abstract GNSS devices are still TTY devices (e.g. > /dev/ttyGNSS0). Obviously, modifying line settings or reading modem > control signals does not make any sense for a device using, say, a > USB (not USB-serial) or iomem interface. This also means, however, that > user space would no longer be able to set the line speed to match a new > port configuration that can be set using the various GNSS protocols when > the underlying interface is indeed a UART; instead this would need to be > taken care of by the driver. > > Also note that writes are always synchronous instead of requiring user > space to call tcdrain() after every command. > > This all seems to work well-enough (e.g. with gpsd), but please let me > know if I've overlooked something which would indeed require a TTY > interface instead. > > I have implemented drivers for receivers based on two common GNSS > chipsets; SiRFstar and u-blox. Due to lack of hardware, the sirf driver > has been tested using a mockup device and a USB-serial-based SiRFstar IV > GPS (using out-of-tree USB-serial code). [ Let me know if you've got any > evaluation kits to spare. ] The ubx driver has been tested using a > u-blox 8 GNSS evaluation kit (thanks u-blox!). > > Finally, note that documentation (including kerneldoc) remains to be > written, but hopefully this will not hinder review given that the > current interfaces are fairly self-describing. This all looks great. Thanks for doing this work and adding a new subsystem for something that has been asked for for many years. All now merged in my tree, nice job! greg k-h