* Re: [PATCH v2 0/9] Serial slave device bus [not found] <20170116225436.17505-1-robh@kernel.org> @ 2017-01-20 13:55 ` Linus Walleij 2017-01-20 14:14 ` Marcel Holtmann 2017-01-20 14:22 ` GPS drivers (was Re: [PATCH v2 0/9] Serial slave device bus) Pavel Machek 0 siblings, 2 replies; 8+ messages in thread From: Linus Walleij @ 2017-01-20 13:55 UTC (permalink / raw) To: Rob Herring, linux-iio@vger.kernel.org, Jonathan Cameron Cc: Greg Kroah-Hartman, Marcel Holtmann, Jiri Slaby, Sebastian Reichel, Arnd Bergmann, Dr . H . Nikolaus Schaller, Peter Hurley, Andy Shevchenko, Alan Cox, Loic Poulain, Pavel Machek, NeilBrown, linux-bluetooth@vger.kernel.org, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org On Mon, Jan 16, 2017 at 11:54 PM, Rob Herring <robh@kernel.org> wrote: > There's still some discussion about what to do with devices that pass thr= u > data to userspace unmodified like GPS and could still use tty device for > the data path. IMO, we should treat this as a separate problem following > this series. Drivers we want to convert to serdev and already in the > kernel don't need this functionality. In my simple opinion GPSes shound live in drivers/iio/gps simply by usecase association: streaming out a series of accelerometer readings periodically through IIOs chardevs and other data about the physical world is not any different from the GPS usecase that give you a stream of coordinates on where on this planet you are. The fact that vendors like to defer GPS processing to userspace because it is considered "secret sauce" is not the concern of the kernel community, though problems like that in general is the great tragedy of our time. It would be fun to see a pure, reverse-engineered GPS driver in IIO. Just my =E2=82=AC0.01 (And by the way: awesome work on this series.) Yours, Linus Walleij ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2 0/9] Serial slave device bus 2017-01-20 13:55 ` [PATCH v2 0/9] Serial slave device bus Linus Walleij @ 2017-01-20 14:14 ` Marcel Holtmann 2017-01-20 14:23 ` H. Nikolaus Schaller 2017-01-20 14:22 ` GPS drivers (was Re: [PATCH v2 0/9] Serial slave device bus) Pavel Machek 1 sibling, 1 reply; 8+ messages in thread From: Marcel Holtmann @ 2017-01-20 14:14 UTC (permalink / raw) To: Linus Walleij Cc: Rob Herring, linux-iio@vger.kernel.org, Jonathan Cameron, Greg Kroah-Hartman, Jiri Slaby, Sebastian Reichel, Arnd Bergmann, Dr . H . Nikolaus Schaller, Peter Hurley, Andy Shevchenko, Alan Cox, Loic Poulain, Pavel Machek, NeilBrown, linux-bluetooth@vger.kernel.org, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org Hi Linus, >> There's still some discussion about what to do with devices that pass thru >> data to userspace unmodified like GPS and could still use tty device for >> the data path. IMO, we should treat this as a separate problem following >> this series. Drivers we want to convert to serdev and already in the >> kernel don't need this functionality. > > In my simple opinion GPSes shound live in drivers/iio/gps simply by > usecase association: streaming out a series of accelerometer readings > periodically through IIOs chardevs and other data about the physical > world is not any different from the GPS usecase that give you a stream > of coordinates on where on this planet you are. > > The fact that vendors like to defer GPS processing to userspace because > it is considered "secret sauce" is not the concern of the kernel community, > though problems like that in general is the great tragedy of our time. > > It would be fun to see a pure, reverse-engineered GPS driver in IIO. except for the pure NMEA devices. Which are pretty much defined as terminal devices using RS422 and 4800 baud. For anything non-NMEA, I would agree that using IIO might be a good option. So instead of a GPS subsystem, might just have a GPS class / type in the IIO subsystem. Regards Marcel ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2 0/9] Serial slave device bus 2017-01-20 14:14 ` Marcel Holtmann @ 2017-01-20 14:23 ` H. Nikolaus Schaller 0 siblings, 0 replies; 8+ messages in thread From: H. Nikolaus Schaller @ 2017-01-20 14:23 UTC (permalink / raw) To: Marcel Holtmann, Linus Walleij Cc: Rob Herring, linux-iio@vger.kernel.org, Jonathan Cameron, Greg Kroah-Hartman, Jiri Slaby, Sebastian Reichel, Arnd Bergmann, Peter Hurley, Andy Shevchenko, Alan Cox, Loic Poulain, Pavel Machek, NeilBrown, linux-bluetooth@vger.kernel.org, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org > Am 20.01.2017 um 15:14 schrieb Marcel Holtmann <marcel@holtmann.org>: >=20 > Hi Linus, >=20 >>> There's still some discussion about what to do with devices that = pass thru >>> data to userspace unmodified like GPS and could still use tty device = for >>> the data path. IMO, we should treat this as a separate problem = following >>> this series. Drivers we want to convert to serdev and already in the >>> kernel don't need this functionality. >>=20 >> In my simple opinion GPSes shound live in drivers/iio/gps simply by >> usecase association: streaming out a series of accelerometer readings >> periodically through IIOs chardevs and other data about the physical >> world is not any different from the GPS usecase that give you a = stream >> of coordinates on where on this planet you are. >>=20 >> The fact that vendors like to defer GPS processing to userspace = because >> it is considered "secret sauce" is not the concern of the kernel = community, >> though problems like that in general is the great tragedy of our = time. >>=20 >> It would be fun to see a pure, reverse-engineered GPS driver in IIO. >=20 > except for the pure NMEA devices. Which are pretty much defined as = terminal devices using RS422 and 4800 baud. For anything non-NMEA, I = would agree that using IIO might be a good option. So instead of a GPS = subsystem, might just have a GPS class / type in the IIO subsystem. Well, we could implement a default NMEA parser in the iio subsystem to translate satellite time, geolocation, orientation, speed, and satellite signal strengths to iio channels. On the other hand we have to wait until all user-space GPS applications use it and appear in wider use in distribution. Let's say in 3-4 years? Therefore, I'd like to see NMEA records passed to user space and not shielded completely. And some GPS devices send extensions to the core set of NEMA records, which might give other useful information. Having this needs some extensibility to the iio translation or side-channels. BR, Nikolaus ^ permalink raw reply [flat|nested] 8+ messages in thread
* GPS drivers (was Re: [PATCH v2 0/9] Serial slave device bus) 2017-01-20 13:55 ` [PATCH v2 0/9] Serial slave device bus Linus Walleij 2017-01-20 14:14 ` Marcel Holtmann @ 2017-01-20 14:22 ` Pavel Machek 2017-01-20 15:26 ` Linus Walleij 1 sibling, 1 reply; 8+ messages in thread From: Pavel Machek @ 2017-01-20 14:22 UTC (permalink / raw) To: Linus Walleij Cc: Rob Herring, linux-iio@vger.kernel.org, Jonathan Cameron, Greg Kroah-Hartman, Marcel Holtmann, Jiri Slaby, Sebastian Reichel, Arnd Bergmann, Dr . H . Nikolaus Schaller, Peter Hurley, Andy Shevchenko, Alan Cox, Loic Poulain, NeilBrown, linux-bluetooth@vger.kernel.org, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org [-- Attachment #1: Type: text/plain, Size: 1885 bytes --] Hi! Switched subject: Rob's work is great for GPS and bluetooth, but this goes beyond it. > On Mon, Jan 16, 2017 at 11:54 PM, Rob Herring <robh@kernel.org> wrote: > > > There's still some discussion about what to do with devices that pass thru > > data to userspace unmodified like GPS and could still use tty device for > > the data path. IMO, we should treat this as a separate problem following > > this series. Drivers we want to convert to serdev and already in the > > kernel don't need this functionality. > > In my simple opinion GPSes shound live in drivers/iio/gps simply by > usecase association: streaming out a series of accelerometer readings > periodically through IIOs chardevs and other data about the physical > world is not any different from the GPS usecase that give you a stream > of coordinates on where on this planet you are. That is... not quite how GPSes work. What interface would you propose? It would be good to support error estimates in position/velocities and AGPS data upload. Now, NMEA knows about some of the complexity (not AGPS), but gets the details wrong. In particular, it would be good to have error estimates and velocities from the same moment you get position estimates. > The fact that vendors like to defer GPS processing to userspace because > it is considered "secret sauce" is not the concern of the kernel community, > though problems like that in general is the great tragedy of our time. > > It would be fun to see a pure, reverse-engineered GPS driver in IIO. Well, many GPSes simply produce NMEA, and we have drivers for some other. Here's example driver: https://gitlab.com/tui/tui/blob/master/ofone/gps3.c Best regards, Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 181 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: GPS drivers (was Re: [PATCH v2 0/9] Serial slave device bus) 2017-01-20 14:22 ` GPS drivers (was Re: [PATCH v2 0/9] Serial slave device bus) Pavel Machek @ 2017-01-20 15:26 ` Linus Walleij 2017-01-20 16:16 ` Andy Shevchenko 2017-01-20 20:23 ` Pavel Machek 0 siblings, 2 replies; 8+ messages in thread From: Linus Walleij @ 2017-01-20 15:26 UTC (permalink / raw) To: Pavel Machek Cc: Rob Herring, linux-iio@vger.kernel.org, Jonathan Cameron, Greg Kroah-Hartman, Marcel Holtmann, Jiri Slaby, Sebastian Reichel, Arnd Bergmann, Dr . H . Nikolaus Schaller, Peter Hurley, Andy Shevchenko, Alan Cox, Loic Poulain, NeilBrown, linux-bluetooth@vger.kernel.org, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org oOn Fri, Jan 20, 2017 at 3:22 PM, Pavel Machek <pavel@ucw.cz> wrote: > Switched subject: Rob's work is great for GPS and bluetooth, but this > goes beyond it. Sure why not talk around a bit. >> In my simple opinion GPSes shound live in drivers/iio/gps simply by >> usecase association: streaming out a series of accelerometer readings >> periodically through IIOs chardevs and other data about the physical >> world is not any different from the GPS usecase that give you a stream >> of coordinates on where on this planet you are. > > That is... not quite how GPSes work. What interface would you propose? > It would be good to support error estimates in position/velocities and > AGPS data upload. Sorry for my ignorance. I have not had the opportunity to work directly with a GPS hardware. > Now, NMEA knows about some of the complexity (not AGPS), but gets the > details wrong. In particular, it would be good to have error estimates > and velocities from the same moment you get position estimates. NMEA if it is this: https://en.wikipedia.org/wiki/NMEA_0183 Seems to be a high-level format such as XML or CSV or any other $FAVOURITE_ASCII_TRANSPORT format. What we want to push into the ring buffer is of course the raw data that is produced by the GPS hardware, whatever that may be. If what we have is this text format we should not reverse-translate it back any more than modem AT commands, it doesn't make sense I guess. So NMEA processing would be in userspace. And if the GPS is just streaming this text data over to the client, like Marcel says, it is more reasonable to just feed that up to userspace (no policy in the kernel). I am however aware of certain hardware such as the ST Microelectronis STA2062 produced for Garmin, which is *not* connected to any external chip, and is not talking over serial to any RSx port, and does not have an embedded firmware running on another SoC in any special GPS chip. And it is unassisted. Maybe that is an oddity. In the mobile phone business I guess it could be more common to have a separate SoC that by way of standards just stream NMEA data. Fusing that with other sensor data (accelerometer, compass, etc) is again indeed a userspace task. I hope NMEA includes very good timestamps. Thanks, Linus Walleij ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: GPS drivers (was Re: [PATCH v2 0/9] Serial slave device bus) 2017-01-20 15:26 ` Linus Walleij @ 2017-01-20 16:16 ` Andy Shevchenko 2017-01-27 20:02 ` Pavel Machek 2017-01-20 20:23 ` Pavel Machek 1 sibling, 1 reply; 8+ messages in thread From: Andy Shevchenko @ 2017-01-20 16:16 UTC (permalink / raw) To: Linus Walleij, Pavel Machek Cc: Rob Herring, linux-iio@vger.kernel.org, Jonathan Cameron, Greg Kroah-Hartman, Marcel Holtmann, Jiri Slaby, Sebastian Reichel, Arnd Bergmann, Dr . H . Nikolaus Schaller, Peter Hurley, Alan Cox, Loic Poulain, NeilBrown, linux-bluetooth@vger.kernel.org, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org On Fri, 2017-01-20 at 16:26 +0100, Linus Walleij wrote: > > Now, NMEA knows about some of the complexity (not AGPS), but gets > > the > > details wrong. In particular, it would be good to have error > > estimates > > and velocities from the same moment you get position estimates. > > NMEA if it is this: > https://en.wikipedia.org/wiki/NMEA_0183 > > Seems to be a high-level format such as XML or CSV or any other > $FAVOURITE_ASCII_TRANSPORT format. Not exactly. It depends on device settings. Old GPS I used to play with have AT command to switch between ASCII and binary format. Some of the devices might use non-standard binary protocols (however, representable as NMEA), etc. -- Andy Shevchenko <andriy.shevchenko@linux.intel.com> Intel Finland Oy ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: GPS drivers (was Re: [PATCH v2 0/9] Serial slave device bus) 2017-01-20 16:16 ` Andy Shevchenko @ 2017-01-27 20:02 ` Pavel Machek 0 siblings, 0 replies; 8+ messages in thread From: Pavel Machek @ 2017-01-27 20:02 UTC (permalink / raw) To: Andy Shevchenko Cc: Linus Walleij, Rob Herring, linux-iio@vger.kernel.org, Jonathan Cameron, Greg Kroah-Hartman, Marcel Holtmann, Jiri Slaby, Sebastian Reichel, Arnd Bergmann, Dr . H . Nikolaus Schaller, Peter Hurley, Alan Cox, Loic Poulain, NeilBrown, linux-bluetooth@vger.kernel.org, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org [-- Attachment #1: Type: text/plain, Size: 1042 bytes --] On Fri 2017-01-20 18:16:11, Andy Shevchenko wrote: > On Fri, 2017-01-20 at 16:26 +0100, Linus Walleij wrote: > > > > Now, NMEA knows about some of the complexity (not AGPS), but gets > > > the > > > details wrong. In particular, it would be good to have error > > > estimates > > > and velocities from the same moment you get position estimates. > > > > NMEA if it is this: > > https://en.wikipedia.org/wiki/NMEA_0183 > > > > Seems to be a high-level format such as XML or CSV or any other > > $FAVOURITE_ASCII_TRANSPORT format. > > Not exactly. It depends on device settings. > Old GPS I used to play with have AT command to switch between ASCII and > binary format. Some of the devices might use non-standard binary > protocols (however, representable as NMEA), etc. Apparently NMEA has some serious limitations. gpsd authors have some good docs about that. Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 181 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: GPS drivers (was Re: [PATCH v2 0/9] Serial slave device bus) 2017-01-20 15:26 ` Linus Walleij 2017-01-20 16:16 ` Andy Shevchenko @ 2017-01-20 20:23 ` Pavel Machek 1 sibling, 0 replies; 8+ messages in thread From: Pavel Machek @ 2017-01-20 20:23 UTC (permalink / raw) To: Linus Walleij Cc: Rob Herring, linux-iio@vger.kernel.org, Jonathan Cameron, Greg Kroah-Hartman, Marcel Holtmann, Jiri Slaby, Sebastian Reichel, Arnd Bergmann, Dr . H . Nikolaus Schaller, Peter Hurley, Andy Shevchenko, Alan Cox, Loic Poulain, NeilBrown, linux-bluetooth@vger.kernel.org, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org [-- Attachment #1: Type: text/plain, Size: 3037 bytes --] Hi! > >> In my simple opinion GPSes shound live in drivers/iio/gps simply by > >> usecase association: streaming out a series of accelerometer readings > >> periodically through IIOs chardevs and other data about the physical > >> world is not any different from the GPS usecase that give you a stream > >> of coordinates on where on this planet you are. > > > > That is... not quite how GPSes work. What interface would you propose? > > It would be good to support error estimates in position/velocities and > > AGPS data upload. > > Sorry for my ignorance. I have not had the opportunity to work > directly with a GPS hardware. Few people have. It is CDMA corelators at the low level. > > Now, NMEA knows about some of the complexity (not AGPS), but gets the > > details wrong. In particular, it would be good to have error estimates > > and velocities from the same moment you get position estimates. > > NMEA if it is this: > https://en.wikipedia.org/wiki/NMEA_0183 Yes. > Seems to be a high-level format such as XML or CSV or any other > $FAVOURITE_ASCII_TRANSPORT format. > > What we want to push into the ring buffer is of course the raw data > that is produced by the GPS hardware, whatever that may be. > If what we have is this text format we should not reverse-translate > it back any more than modem AT commands, it doesn't make sense > I guess. Umm. Its hairy. Each GPS talks slightly different version of NMEA :-(. But yes, we have userland driver called 'gpsd' that understands most of them. Many GPSes have additional, non-NMEA protocol you can switch them to. > So NMEA processing would be in userspace. And if the GPS is just > streaming this text data over to the client, like Marcel says, it is > more reasonable to just feed that up to userspace (no policy in the > kernel). Well -- we normally do hardware abstraction in the kernel :-). > I am however aware of certain hardware such as the ST > Microelectronis STA2062 produced for Garmin, which is *not* > connected to any external chip, and is not talking over serial > to any RSx port, and does not have an embedded firmware running > on another SoC in any special GPS chip. And it is unassisted. I googled STA2062 but it does not make much sense to me. Yes, not everything talks NMEA. Nokia N900 is an example, and it has in-tree driver. > Maybe that is an oddity. In the mobile phone business I guess it > could be more common to have a separate SoC that by way > of standards just stream NMEA data. Sorry, I don't understand. Yes, in mobile phones GPSes that produce something else than NMEA are pretty common. > Fusing that with other sensor data (accelerometer, compass, etc) > is again indeed a userspace task. I hope NMEA includes very good > timestamps. Umm. Timestamps are quite hard to do over serial :-(. Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 181 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2017-01-27 20:04 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20170116225436.17505-1-robh@kernel.org>
2017-01-20 13:55 ` [PATCH v2 0/9] Serial slave device bus Linus Walleij
2017-01-20 14:14 ` Marcel Holtmann
2017-01-20 14:23 ` H. Nikolaus Schaller
2017-01-20 14:22 ` GPS drivers (was Re: [PATCH v2 0/9] Serial slave device bus) Pavel Machek
2017-01-20 15:26 ` Linus Walleij
2017-01-20 16:16 ` Andy Shevchenko
2017-01-27 20:02 ` Pavel Machek
2017-01-20 20:23 ` Pavel Machek
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).