Received: by 10.192.165.148 with SMTP id m20csp2908466imm; Mon, 7 May 2018 03:21:35 -0700 (PDT) X-Google-Smtp-Source: AB8JxZr77w7a5J2+1+F29Qn7FdxWOAlA+jb9S+PQibRMcLkApfad5Va3YUY5fGj6HBNkraCmrbKV X-Received: by 2002:a63:3811:: with SMTP id f17-v6mr29846822pga.70.1525688495808; Mon, 07 May 2018 03:21:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525688495; cv=none; d=google.com; s=arc-20160816; b=giX0TObU0C+EnAMb/xoG+isRTQ72YxBPo6unrzK3mOEaz/FBo8zKPt4aWuFwnIcWbX xS9UR5rNKwTppGr3dl5JoUWeowcoHXrGloS+eDiLPHb2Y9BIINjm5EZUs6NFa5d9Bs25 snh2BnkXD17CbgdTtWNsKQlQhF4KmlxeleAUk+Vthyg/2S6zue5HAc+6mGZTssfONq9g /21HcCO/8i0p0pzmXOYWnmt4BW63JuXXuowrGBxZsvsQmiC3a3wy0sFEhw5jE/lTUGwL MUtwftAVZHwyaLDyoEucgbZ6XYf6cd8dKRqqbv6eKQgcOUeElXkDdN20jTNmzp6+o6bS kRbg== 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=j1WqSkgg5qsE4dq8bYgUdpxDHufXN3CxgJMGETrol4E=; b=FmZFGKSv93PNujIiwRTKTHrYvY9pDK9BzJaGv8Nb8wtc2vV4Zv2NVRbFitlHzCG95e ggFJ2J4Z1qUOH/xdw/WtFPYh/LOaTpkAt784qxJ8LMSm+LVTSQ88PjxguaQ/mLgOXlOJ IBDrkkcEtYO3inV2gY+IwiSilZg85QftfY4V2VoDSh0BlnX4l5P8NPC2aoF4fnh8Sool zjh/QY6INjzRNqa5Ji2yjQ8NO/7EXIprk9ktrhtdHRY/GVBgI9drNqZ7Wu1yGTXqfpB1 sxLPl5pu3z03PpmBJwrTskojUhz/zeXxJxxt3IoywrTqAOW3wcWzixAG4yuDtD1aX+NF RYCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=j0vy1NQv; 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 r59-v6si8659687plb.314.2018.05.07.03.21.21; Mon, 07 May 2018 03:21:35 -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=j0vy1NQv; 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 S1752048AbeEGKVB (ORCPT + 99 others); Mon, 7 May 2018 06:21:01 -0400 Received: from mail-lf0-f47.google.com ([209.85.215.47]:44987 "EHLO mail-lf0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751889AbeEGKU7 (ORCPT ); Mon, 7 May 2018 06:20:59 -0400 Received: by mail-lf0-f47.google.com with SMTP id h197-v6so39742066lfg.11; Mon, 07 May 2018 03:20:58 -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=j1WqSkgg5qsE4dq8bYgUdpxDHufXN3CxgJMGETrol4E=; b=j0vy1NQvK3Dxp3b4dZqJIPbXysbbFlsf+cSymzizdo1VOctFtelwR3r2NzYjlp65an ysReihRk4NtvFlZU7U6DtIpl39lZIIKuzfqkwKsu04AdVctvE7UyuN0FdO9LLA8MHLg0 b3IKUgzvYivwpsN4hdhTkhIq9Qz4LySCISJ4PNytLKsEo6aKe2uQWhym187bzkOzkiTf doB6HKTLSlojSdAZ+h+Z+RTtTFg/ZbJedDz2UXZ+xpbg4RG6taAFSdf+jyBTHpnJaV59 SGBzwEfFnABc3T90vPo0Bd6kLXowapyNbFzIyaamqVoOKpMznGzTgLfMYvhhLGYtAYWx nAFQ== 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=j1WqSkgg5qsE4dq8bYgUdpxDHufXN3CxgJMGETrol4E=; b=SSjo27kywKnZYIAJPoJ+nLMP0XOYokwOQ0cuU1SgeuneZrPaC9Eo0KlmrPxilkB1sj 6Vw0Rh+MFnLcHk8uIVVKtREW6VZmAL1ZTtW2hLH+5shH1L7XuRfCOHX+5CFOW2eI6IVn piHemSwO/0QTvQS6plgO8wYsy5abp2xb8KRodAcIXVbmBu4l2ZQXWoJ2EU8seEvyjeox PZljKyqmlpAu9Bfvis8b32i05tMYHOiGMII6g/AM4206wvb7Lm3vaVkdIzmHRVHVUXKY yWmAfi1TeeulDLLDCPnKHtbvml1VNaLY1JUcC1xNQ38wJJ7HiWWOKnlghfBH7zepCikL LleA== X-Gm-Message-State: ALQs6tDh8nTOzPMJE52a0STwaRHKDb9XVy3ehOYz0bCz1WRdxU6lymnU 4TcrLHROuX1MyFQaahrq4XE= X-Received: by 2002:a2e:804c:: with SMTP id p12-v6mr25320868ljg.129.1525688457789; Mon, 07 May 2018 03:20:57 -0700 (PDT) Received: from xi.terra (c-8bb2e655.07-184-6d6c6d4.cust.bredbandsbolaget.se. [85.230.178.139]) by smtp.gmail.com with ESMTPSA id 77-v6sm4220608ljz.53.2018.05.07.03.20.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 07 May 2018 03:20:57 -0700 (PDT) Received: from johan by xi.terra with local (Exim 4.90_1) (envelope-from ) id 1fFdGK-0006jD-E7; Mon, 07 May 2018 12:20:56 +0200 Date: Mon, 7 May 2018 12:20:56 +0200 From: Johan Hovold To: Sebastian Reichel Cc: Johan Hovold , Greg Kroah-Hartman , Rob Herring , Mark Rutland , Andreas Kemnade , Arnd Bergmann , "H . Nikolaus Schaller" , Pavel Machek , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: Re: [PATCH 0/7] gnss: add new GNSS subsystem Message-ID: <20180507102056.GU2285@localhost> References: <20180424163458.11947-1-johan@kernel.org> <20180504132741.brn5jqv5ufjhp7ky@earth.universe> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180504132741.brn5jqv5ufjhp7ky@earth.universe> User-Agent: Mutt/1.9.5 (2018-04-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 04, 2018 at 03:27:41PM +0200, Sebastian Reichel wrote: > Hi Johan, > > On Tue, Apr 24, 2018 at 06:34:51PM +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 (eventually) 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). > Great work. I like your design decisions. I have quite a few devices > with have non-serial based GPS peripherals using binary protocols (*). > As far as I can see it should be possible to add support for those. Thanks! Yeah, the aim here was to abstract the actual I/O interface used. > I have one concern, though. While providing raw data by > default is fine generally, it is a problem with device > auto-discovery. I think there should be some IOCTL from > the start, that can be used to inform userspace about > the raw protocol being used (i.e. "NMEA"). I fear, that > userspace may start to just assume raw = NMEA without > having this (especially since all initial drivers provide > NMEA). One problem I see here would be that the driver does not necessarily know either what protocol is currently being used. Some devices have boot-pins which can be used to configure the initial protocol used (and this could perhaps be reflected in DT), but this can often later be changed (by user space) and even be made persistent using battery-backed ram or eeproms. Also note that at least u-blox devices supports having more than one protocol active on the same port... Thanks, Johan