From mboxrd@z Thu Jan 1 00:00:00 1970 From: Johan Hovold Subject: Re: [Letux-kernel] [PATCH v5 3/5] misc serdev: Add w2sg0004 (gps receiver) power control driver Date: Tue, 27 Feb 2018 08:04:15 +0100 Message-ID: <20180227070415.GB18666@localhost> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20180212152618.GC13962@amd> Sender: linux-kernel-owner@vger.kernel.org To: Pavel Machek Cc: Johan Hovold , "H. Nikolaus Schaller" , Mark Rutland , DTML , Thierry Reding , Jonathan Cameron , Arnd Bergmann , Tony Lindgren , Greg Kroah-Hartman , Russell King , Linux Kernel Mailing List , Rob Herring , Kevin Hilman , =?iso-8859-1?Q?Beno=EEt?= Cousson , kernel@pyra-handheld.com, Discussions about the Letux Kernel , linux-omap , Andreas =?iso-8859-1?Q?F=E4rber?= List-Id: devicetree@vger.kernel.org On Mon, Feb 12, 2018 at 04:26:18PM +0100, Pavel Machek wrote: > Hi! > > > > Let's restart this discussion and focus on the main roadblock (others > > > are minor details which can be sorted out later). > > > > > > 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? > > > > Or even more fundamentally, does this belong in the kernel at all? > > Yes, it does. But not necessarily in its current form. > > Now, if we'd ever have a proper GPS framework that handled everything in > > kernel space (i.e. no more gpsd) then we would be able to write kernel > > drivers that also take care of PM. But perhaps that's unlikely to ever > > be realised given the state of things (proprietary protocols, numerous > > quirky implementations, etc). > > That is what needs to happen. > > > The kernel is probably not the place to be working around issues like > > that, even if serdev at least allows for such hacks to be fairly > > isolated in drivers (unlike some of the earlier proposals touching core > > code). > > Oh, kernel is indeed right place to provide hardware abstraction -- > and that includes bug workarounds. Right, at least when such hacks can be confined to a driver and not be spread all over the place. Johan