Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp393178imm; Fri, 1 Jun 2018 02:50:52 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKNQa/c6uyGGNLGTXnxeBgIjsstA3ZvGyGuzZc7Np+hxMKXJF6VY8sMWk3MIW2y5QzoLMwQ X-Received: by 2002:a17:902:f83:: with SMTP id 3-v6mr10358637plz.336.1527846652703; Fri, 01 Jun 2018 02:50:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527846652; cv=none; d=google.com; s=arc-20160816; b=pNbsdpVpB7xPz1JR/KP4iHqle4b8ijxmY4bQIlQQ/DJZreAM/Tm4696o87Y5+ir3Gc 52aXgFQSIq2YdJMIkuDH6bhu3z62wUXoVxz1QkAiAIm5W7YfsnA3HQNXggMoZmSJ67a9 pRmLWvRboyOiKZ2S6XaH9Qw2L6fkjSJi53vbWy4ppMgfgGJ66Q1E97ni+CiaqCKODTlS r4cg8Y0HRu0BQH6yVpnbDrjP4o/7AS/Pcl6iJVzpq2uNCoLnf6ECPAmLTKS2hW9HQrvz vFuEtypmmE6osiFDwSuwRWdJ/xmoEBoAsvwcbQ3JjjT/qZaBZ16DRauewug2iStSm71o eAxw== 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=ljWJQ21G0wL95DeL5KYmi1oH5xRRHGOj8tAvytaII34=; b=e5SSKh3XESyR5wRZkUgaLhuOe3LphqnAPPhNbZ7qz8Gtvk2H0iLCU3V4mf73pdD0Fk MAUzrsHS8Z6FS2wOr+7zR+eX3z8+zyTeTyA0flx/8OyVFm07BgGvt9gHMupCXWDpORCg MS3TrC54ek2tc742v3pqa9oTfgQ3nybpOfbSFYtZ4k7tyNxu1pNF+PWVmiQq2RPnURrC m9TERi4dYG/8QIBtnJO3CUoc7t9Y/Md7KK3655+bfLMgooC+JQrHkTnJSEs8cniI8z/z jqrpRsbhOnnClK89ZsrwejLVlyvkZruKujdc9WP75StA5QXu8uo70LW5E6zkwNj8bOhk CYZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=kG08is6M; 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=fail (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 f3-v6si38682001pld.513.2018.06.01.02.50.37; Fri, 01 Jun 2018 02:50:52 -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=@gmail.com header.s=20161025 header.b=kG08is6M; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750852AbeFAJuJ (ORCPT + 99 others); Fri, 1 Jun 2018 05:50:09 -0400 Received: from mail-lf0-f65.google.com ([209.85.215.65]:44314 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750766AbeFAJuH (ORCPT ); Fri, 1 Jun 2018 05:50:07 -0400 Received: by mail-lf0-f65.google.com with SMTP id 36-v6so11993324lfr.11; Fri, 01 Jun 2018 02:50:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=ljWJQ21G0wL95DeL5KYmi1oH5xRRHGOj8tAvytaII34=; b=kG08is6Md0JaNSW0l+FsMGFPPb9mxjlTNu/+eMGpfQsnQLqhnf9crN0JDg51FNO6HB VEAx1Wfl2AF7hLuMLZeW8Ra3vxmTLCu/V+B4hQOWI9YECs8153+pb7WAOaJ00HjthzNi NEKlD6feGmJaO0VV2bB4WWgkqGSwQnbfn02HqADu04C4X7YjdxEhbqNbzdTT5t4zmCO+ 5TfY2E8Cy3Rw3vbYy+upt/UhB8wPDI6tIEfj3lB7vRZAaFQF0HzuKHMi74FjCDFwxs9a qkCFc1FTbcZw6qxlSFJQb/hruCweanKcilRS7emQ+BAvM9QvDlxqAA+H/ZeHcWXW/2/O edTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=ljWJQ21G0wL95DeL5KYmi1oH5xRRHGOj8tAvytaII34=; b=cQZbIiV0MiVZ6YodaXk8mGsqqAd4fkT01v0mkkU2laElhyKcIuA7yfKYomfp+XV2OX qQuF8+T1JqYrzUhrtoFy3asx4zL5y+GaDIOUFfkpmXatP+GbUM2t8OTt0sfdqoCiDTOE 0bVVF5zkNNaOwdiGo0Uw2tkaIzOhmsTMyvMTpFJqz3n3jjD+jVKIUvtM/3FcfwLJAro8 TsdOalHJFr9ewx9MwP0qr8xFgf4P7k7MsI8iy6liYfr3XsqLUFtJvvpAYlWVoHqcwqiW gycdb4txsprU7dDfECBRU6+nhe/EXfjMmwSvelJNiDFSGnKF4zZYAIkTALMgNZaGrMqw aewQ== X-Gm-Message-State: ALKqPwd9drP4m7kok4zdrDAdN3sYgZY/PMyuBRmdTJs8cuaQbaV9Ouat +H4JW1/9I1vjrz+JiVbCQ69jOdxH X-Received: by 2002:a2e:8993:: with SMTP id c19-v6mr7824118lji.123.1527846605868; Fri, 01 Jun 2018 02:50:05 -0700 (PDT) Received: from xi.terra (c-8bb2e655.07-184-6d6c6d4.bbcust.telenor.se. [85.230.178.139]) by smtp.gmail.com with ESMTPSA id x24-v6sm8123742ljj.54.2018.06.01.02.50.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 01 Jun 2018 02:50:05 -0700 (PDT) Received: from johan by xi.terra with local (Exim 4.90_1) (envelope-from ) id 1fOgh5-0003eE-Mc; Fri, 01 Jun 2018 11:49:59 +0200 Date: Fri, 1 Jun 2018 11:49:59 +0200 From: Johan Hovold To: Pavel Machek Cc: Johan Hovold , Greg Kroah-Hartman , Rob Herring , Mark Rutland , Andreas Kemnade , Arnd Bergmann , "H . Nikolaus Schaller" , 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: <20180601094959.GA13775@localhost> References: <20180601082259.17563-1-johan@kernel.org> <20180601093311.GA31639@amd> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180601093311.GA31639@amd> 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 11:33:11AM +0200, Pavel Machek wrote: > Hi! > > > 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). > > So.. while you did good work on serial power management, this is > grossly misnamed. There's nothing GNSS specific in the code, and you > are not presenting consistent interface to the userland. > > This is _not_ GNSS subsystem. This is serial power management > subsystem, or something like that. GPS/GNSS subsystem will need to be > built on top of this. I thought we had this discussion already. This series adds an abstraction for GNSS receivers so that they can be detected by userspace without resorting to probing hacks. That is GNSS specific. Furthermore, (since v2) we export a GNSS receiver type, which allows further protocol detection hacks to be dropped, something which is also GNSS specific. The two drivers and library added are for GNSS devices and their specific power management needs, while a random serial-connected device may need to manage power differently. Also GNSS specific. Finally, the GNSS subsystem is clearly not serial (as in UART) specific and works just as fine with I2C, SPI, USB, iomem, rproc or whatever interface the GNSS uses. > This will never handle devices like Nokia N900, where GPS is connected > over netlink. Marcel already suggested adding a ugnss interface, which would allow feeding GNSS data through the generic GNSS interface from user space for use cases where it's not (yet) feasible to implement a kernel driver. > > Another possible extension is to add generic 1PPS support. > > And there's nothing GNSS specific in the patches. I disagree. Johan