Received: by 10.213.65.68 with SMTP id h4csp490369imn; Tue, 20 Mar 2018 08:06:38 -0700 (PDT) X-Google-Smtp-Source: AG47ELtvb5XfCCXNE2mCHEUh9nNgxYHlW4WKEiM6PMdQGAILaezZf0C7D7dHN0GA9ZOBTzw/IXCo X-Received: by 10.98.4.196 with SMTP id 187mr9113246pfe.203.1521558398886; Tue, 20 Mar 2018 08:06:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521558398; cv=none; d=google.com; s=arc-20160816; b=PXmkAfvIQWL1HjCpflQq7ZMfLnD1OIU1lyZhGblvjkGrBuHTp2WMjiFXKeTMRG9/go UV4CxZmmZ1Vcg4F3uJFcugb9NEj9QrbPuauvsCR9tVLlwt4bSx6WVnLzFjrUjkudmeWe r8JcEZ/zLWHmA/HGAp1iKxJ05cch/5HOcu/10A/26kMqzPcll7MM5cDu88UhWYan48tj 8wzUxTec53gyjEhNIgCRuqCFEKEAQKyDh57kpZ0fXiyyXGaP0JTuT8squm957JPA7fox Rop9attRp7JVuwAlZFOdwYVpY1w4HBslzh/KURBi4WD92/1BEgy/O3GFo9ZZuWk+/liX UwmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:dkim-signature:arc-authentication-results; bh=R8rcqy9nQJGOelQ0T1uj14nSAEDz0dTjOLKedbaq+3w=; b=YzEjTL/dAN8Lh/aAbOr/M+3gw6s6B+qzSYsFM+W0qPKMLShKCWAbSxWU1JdlztbsHX RfGfrXMITn4HGoSQ4GYjEpoemUmMXIOUf1WycH36zkfmXotWHrM/BAiV+D4kh+JK2r/r dOjqOVdjeN8/ZKP/VWCzQFACqZHrByhsmPWrTGdeMoHPxMIy+i2FQaC+Ua9x+DbpLNqs GFQeIZvop+0Ltx3AHqWsdZ941c33oDb5C3g8MA9hZ0zKxJPNr0dNKmvE0/tGIF6GaOM0 eKXYfbCM0VNy77aXBemzvaL0vDvEAZmsJHtoXsqGM1shdo31OuQ2yWb75XkrDfbvPu5W dhdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@goldelico.com header.s=strato-dkim-0002 header.b=YAz6Pg7P; 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 g17-v6si1742537plo.486.2018.03.20.08.06.23; Tue, 20 Mar 2018 08:06:38 -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=@goldelico.com header.s=strato-dkim-0002 header.b=YAz6Pg7P; 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 S1751915AbeCTPB7 (ORCPT + 99 others); Tue, 20 Mar 2018 11:01:59 -0400 Received: from mo4-p00-ob.smtp.rzone.de ([81.169.146.220]:18455 "EHLO mo4-p00-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751348AbeCTPBk (ORCPT ); Tue, 20 Mar 2018 11:01:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1521558098; s=strato-dkim-0002; d=goldelico.com; h=To:References:Message-Id:Content-Transfer-Encoding:Cc:Date: In-Reply-To:From:Subject:Content-Type:X-RZG-CLASS-ID:X-RZG-AUTH; bh=R8rcqy9nQJGOelQ0T1uj14nSAEDz0dTjOLKedbaq+3w=; b=YAz6Pg7P9YwiNwIZmbOXIOHrUpeWd3owzX5K0hnCYsEL8Fs7r+5gFR6C2qko5XZ6Kj TYFjm3q6cUloDGXteDQKjbRudiO9myzS7mta44vStzoZSV851iu8yucY89vmALCjw1sa tcLnKA57UeAzoWtNLPO+WrV+b/O2a0lu3S/jxl0Oaa45w0N42vVrx6Yzv8aOXpA8h2ol 4ZH6kpgIyr4eEaEMhC+ds2j6xqHB6Pas8Iau3hdUg7BIU0HOMwpDCSXBNJ3nTC1r73HL 9qrSa3d9Gh31zCYDDz/OUoKCxgf/91EQMi2wc0V1VhP/8C6gTNZdz17rxc+4MfwcSyN6 Hcjw== X-RZG-AUTH: :JGIXVUS7cutRB/49FwqZ7WcJeFKiMgPgp8VKxflSZ1P34KBj4Qpw87Wiuc9qETrzvA== X-RZG-CLASS-ID: mo00 Received: from [192.168.2.107] (p57AE0C92.dip0.t-ipconnect.de [87.174.12.146]) by smtp.strato.de (RZmta 42.18 DYNA|AUTH) with ESMTPSA id L0b6e6u2KEnYsQb (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (curve secp521r1 with 521 ECDH bits, eq. 15360 bits RSA)) (Client did not present a certificate); Tue, 20 Mar 2018 15:49:34 +0100 (CET) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: [Letux-kernel] [PATCH v5 3/5] misc serdev: Add w2sg0004 (gps receiver) power control driver From: "H. Nikolaus Schaller" In-Reply-To: <20180319135418.GL18359@localhost> Date: Tue, 20 Mar 2018 15:49:33 +0100 Cc: Mark Rutland , DTML , Discussions about the Letux Kernel , =?utf-8?Q?Beno=C3=AEt_Cousson?= , Arnd Bergmann , Tony Lindgren , Greg Kroah-Hartman , kernel@pyra-handheld.com, Russell King , Linux Kernel Mailing List , linux-omap , Rob Herring , Linux ARM , Pavel Machek , Kevin Hilman , Thierry Reding , =?utf-8?Q?Andreas_F=C3=A4rber?= , Jonathan Cameron Content-Transfer-Encoding: quoted-printable Message-Id: References: <5494ad34b39a6c62601e3747440268dfb3be7d5a.1512114576.git.hns@goldelico.com> <20171222124427.GI3374@localhost> <91850CC3-B280-4701-9D07-96AFF3A79A6F@goldelico.com> <90F9A8E4-035A-4A9E-8AAB-757491D63E69@goldelico.com> <20180112153903.GB5992@localhost> <20180212152618.GC13962@amd> <20180227070415.GB18666@localhost> <22A8F5FE-C8B9-46EB-B98D-A94EA4170131@goldelico.com> <20180319135418.GL18359@localhost> To: Johan Hovold X-Mailer: Apple Mail (2.3124) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Johan, > Am 19.03.2018 um 14:54 schrieb Johan Hovold : >=20 > On Tue, Feb 27, 2018 at 08:32:50AM +0100, H. Nikolaus Schaller wrote: >> Hi Johan, >>=20 >>> Am 27.02.2018 um 08:04 schrieb Johan Hovold : >>>=20 >>> On Mon, Feb 12, 2018 at 04:26:18PM +0100, Pavel Machek wrote: >>>> Hi! >>>>=20 >>>>>> Let's restart this discussion and focus on the main roadblock = (others >>>>>> are minor details which can be sorted out later). >>>>>>=20 >>>>>> If it feels like a hack, the key issue seems to me to be the = choice of >>>>>> the API to present the GPS data to user space. Right? >>>>>=20 >>>>> Or even more fundamentally, does this belong in the kernel at all? >>>>=20 >>>> Yes, it does. >>=20 >> Thanks, Pavel for supporting our view. >>=20 >>>=20 >>> But not necessarily in its current form. >>=20 >> Is this a "yes after some code fixes"? >=20 > No, we need some kind of at least rudimentary gps framework even if we > allow for a raw (NMEA) interface for the time being (possibly > indefinitely). Ok, that would be fine if we can get that! For a minimal set of API I think something like this (following hci_dev) = would suffice: struct gps_dev { ... int (*open)(struct gps_dev *gdev); int (*close)(struct gps_dev *gdev); int (*send)(struct gps_dev *gdev, char *data, int length); }; int gps_register_dev(struct gps_dev *gdev); void gps_unregister_dev(struct gps_dev *gdev); int gps_recv_nmea_chars(struct gps_dev *gdev, char *data, int length); If that would wrap all creation of some /dev/ttyGPS0 (or however it is = called), it would fit our needs for a driver and user-space for our system. And I would be happy to get rid of creating and registering a = /dev/ttyGPS0 in the w2sg0004 driver. Then, the driver will not need to be touched if the GPS framework is = improved in some far future (e.g. to provide some additional ioctl for getting = kalman-filtered position+heading by doing sensor fusion with some iio-based = accelerometer/gyro).=20 So I am looking forward to some framework for review and integration = testing. BR and thanks, Nikolaus=