Skip to contentSkip to conversation

gnss: add new GNSS subsystem

PATCH In review Johan Hovold 5 participants 29 messages Jun 1, 2018 – Jul 3, 2018

Subsystems (2)
lore
Share & tools
lore

Johan Hovold

author maintainer
#0 lore raw

v3 cover gnss: add new GNSS subsystem

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).

This will still allow for better platform integration by allowing GNSS devices and their resources (e.g. regulators and enable-gpios) to be described by firmware and managed by kernel drivers rather than platform-specific scripts and services.

While the current interface is kept minimal, it could be extended using IOCTLs, sysfs or uevents as needs and proper abstraction levels are identified and determined (e.g. for device and feature identification).

Another possible extension is to add generic 1PPS support.

I decided to go with a custom character-device interface rather than pretend that these abstract GNSS devices are still TTY devices (e.g. /dev/ttyGNSS0). Obviously, modifying line settings or reading modem control signals does not make any sense for a device using, say, a USB (not USB-serial) or iomem interface. This also means, however, that user space would no longer be able to set the line speed to match a new port configuration that can be set using the various GNSS protocols when the underlying interface is indeed a UART; instead this would need to be taken care of by the driver.

Also note that writes are always synchronous instead of requiring user space to call tcdrain() after every command.

This all seems to work well-enough (e.g. with gpsd), but please let me know if I've overlooked something which would indeed require a TTY interface instead.

I have implemented drivers for receivers based on two common GNSS chipsets; SiRFstar and u-blox. Due to lack of hardware, the sirf driver has been tested using a mockup device and a USB-serial-based SiRFstar IV GPS (using out-of-tree USB-serial code). [ Let me know if you've got any evaluation kits to spare. ] The ubx driver has been tested using a u-blox 8 GNSS evaluation kit (thanks u-blox!).

Finally, note that documentation (including kerneldoc) remains to be written, but hopefully this will not hinder review given that the current interfaces are fairly self-describing.

Johan

Changes in v3
- dt-bindings
- clarify that "u-blox,extint-gpios" is connected to a device input pin (Rob)
- fix space-before-tab whitespace issues (Rob)
- use "receiver" instead of "device" in the receiver type documentation for better consistency with the rest of the series

Changes in v2
- add device type support (new patch 8/8)
- fix one unprotected access to ops->write_raw
- add support for optional v_bckp supply to ubx driver
- drop unnecessary dev_dbgs (Greg)
- simplify open() error path (Greg)
- indent function parameters further
- use gserial->drvdata to access variable length data
- dt-bindings
- document required reg property for I2C, SPI and USB bindings (Rob)
- use "pin name:" prefix when referring to datasheet names (Rob)
- add vendor prefix to sirf gpios (Rob)
- add optional u-blox v-bckp supply (Rob)
- add optional u-blox extint gpio
- minor clean ups
- add Rob's Reviewed-by tag (patches 2/8 and 6/8)

Johan Hovold (8):
gnss: add GNSS receiver subsystem
dt-bindings: add generic gnss binding
gnss: add generic serial driver
dt-bindings: gnss: add u-blox binding
gnss: add driver for u-blox receivers
dt-bindings: gnss: add sirfstar binding
gnss: add driver for sirfstar-based receivers
gnss: add receiver type support

 Documentation/ABI/testing/sysfs-class-gnss    |  15 +
 .../devicetree/bindings/gnss/gnss.txt         |  36 ++
 .../devicetree/bindings/gnss/sirfstar.txt     |  45 ++
 .../devicetree/bindings/gnss/u-blox.txt       |  44 ++
 .../devicetree/bindings/vendor-prefixes.txt   |   4 +
 MAINTAINERS                                   |   8 +
 drivers/Kconfig                               |   2 +
 drivers/Makefile                              |   1 +
 drivers/gnss/Kconfig                          |  43 ++
 drivers/gnss/Makefile                         |  16 +
 drivers/gnss/core.c                           | 420 ++++++++++++++++++
 drivers/gnss/serial.c                         | 275 ++++++++++++
 drivers/gnss/serial.h                         |  47 ++
 drivers/gnss/sirf.c                           | 408 +++++++++++++++++
 drivers/gnss/ubx.c                            | 153 +++++++
 include/linux/gnss.h                          |  75 ++++
 16 files changed, 1592 insertions(+)
 create mode 100644 Documentation/ABI/testing/sysfs-class-gnss
 create mode 100644 Documentation/devicetree/bindings/gnss/gnss.txt
 create mode 100644 Documentation/devicetree/bindings/gnss/sirfstar.txt
 create mode 100644 Documentation/devicetree/bindings/gnss/u-blox.txt
 create mode 100644 drivers/gnss/Kconfig
 create mode 100644 drivers/gnss/Makefile
 create mode 100644 drivers/gnss/core.c
 create mode 100644 drivers/gnss/serial.c
 create mode 100644 drivers/gnss/serial.h
 create mode 100644 drivers/gnss/sirf.c
 create mode 100644 drivers/gnss/ubx.c
 create mode 100644 include/linux/gnss.h
Signature · 1 line
2.17.1
author maintainer
#1 lore raw

PATCH v3 1/8 gnss: add GNSS receiver subsystem

Add a new subsystem for GNSS (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.

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).

This will still allow for better platform integration by allowing GNSS devices and their resources (e.g. regulators and enable-gpios) to be described by firmware and managed by kernel drivers rather than platform-specific scripts and services.

While the current interface is kept minimal, it could be extended using IOCTLs, sysfs or uevents as needs and proper abstraction levels are identified and determined (e.g. for device and feature identification).

---
 MAINTAINERS           |   6 +
 drivers/Kconfig       |   2 +
 drivers/Makefile      |   1 +
 drivers/gnss/Kconfig  |  11 ++
 drivers/gnss/Makefile |   7 +
 drivers/gnss/core.c   | 371 ++++++++++++++++++++++++++++++++++++++++++
 include/linux/gnss.h  |  66 ++++++++
 7 files changed, 464 insertions(+)
 create mode 100644 drivers/gnss/Kconfig
 create mode 100644 drivers/gnss/Makefile
 create mode 100644 drivers/gnss/core.c
 create mode 100644 include/linux/gnss.h
MAINTAINERS +6 -0
index 0a1410d5a621..dc3df211c1a7 100644
@@ -5962,6 +5962,12 @@ F:	Documentation/isdn/README.gigaset
 F:	drivers/isdn/gigaset/
 F:	include/uapi/linux/gigaset_dev.h
 
+GNSS SUBSYSTEM
+M:	Johan Hovold <[email protected]>
+S:	Maintained
+F:	drivers/gnss/
+F:	include/linux/gnss.h
+
 GO7007 MPEG CODEC
 M:	Hans Verkuil <[email protected]>
 L:	[email protected]
drivers/Kconfig +2 -0
index 95b9ccc08165..ab4d43923c4d 100644
@@ -9,6 +9,8 @@ source "drivers/bus/Kconfig"
 
 source "drivers/connector/Kconfig"
 
+source "drivers/gnss/Kconfig"
+
 source "drivers/mtd/Kconfig"
 
 source "drivers/of/Kconfig"
drivers/Makefile +1 -0
index 24cd47014657..cc9a7c5f7d2c 100644
@@ -185,3 +185,4 @@ obj-$(CONFIG_TEE)		+= tee/
 obj-$(CONFIG_MULTIPLEXER)	+= mux/
 obj-$(CONFIG_UNISYS_VISORBUS)	+= visorbus/
 obj-$(CONFIG_SIOX)		+= siox/
+obj-$(CONFIG_GNSS)		+= gnss/
drivers/gnss/Kconfig new file +11 -0
new file mode 100644
index 000000000000..103fcc70992e
@@ -0,0 +1,11 @@
+#
+# GNSS receiver configuration
+#
+
+menuconfig GNSS
+	tristate "GNSS receiver support"
+	---help---
+	  Say Y here if you have a GNSS receiver (e.g. a GPS receiver).
+
+	  To compile this driver as a module, choose M here: the module will
+	  be called gnss.
drivers/gnss/Makefile new file +7 -0
new file mode 100644
index 000000000000..1f7a7baab1d9
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: GPL-2.0
+#
+# Makefile for the GNSS subsystem.
+#
+
+obj-$(CONFIG_GNSS)			+= gnss.o
+gnss-y := core.o
drivers/gnss/core.c new file +371 -0

371 lines not on this page · raw message

include/linux/gnss.h new file +66 -0

66 lines not on this page · raw message

Signature · 1 line
2.17.1
author maintainer
#2 lore raw

PATCH v3 2/8 dt-bindings: add generic gnss binding

In reply to Johan Hovold

Describe generic properties for GNSS receivers.

---
 .../devicetree/bindings/gnss/gnss.txt         | 36 +++++++++++++++++++
 MAINTAINERS                                   |  1 +
 2 files changed, 37 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/gnss/gnss.txt
Documentation/devicetree/bindings/gnss/gnss.txt new file +36 -0
new file mode 100644
index 000000000000..f1e4a2ff47c5
@@ -0,0 +1,36 @@
+GNSS Receiver DT binding
+
+This documents the binding structure and common properties for GNSS receiver
+devices.
+
+A GNSS receiver node is a node named "gnss" and typically resides on a serial
+bus (e.g. UART, I2C or SPI).
+
+Please refer to the following documents for generic properties:
+
+	Documentation/devicetree/bindings/serial/slave-device.txt
+	Documentation/devicetree/bindings/spi/spi-bus.txt
+
+Required properties:
+
+- compatible	: A string reflecting the vendor and specific device the node
+		  represents
+
+Optional properties:
+- enable-gpios	: GPIO used to enable the device
+- timepulse-gpios	: Time pulse GPIO
+
+Example:
+
+serial@1234 {
+	compatible = "ns16550a";
+
+	gnss {
+		compatible = "u-blox,neo-8";
+
+		vcc-supply = <&gnss_reg>;
+		timepulse-gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>;
+
+		current-speed = <4800>;
+	};
+};
MAINTAINERS +1 -0
index dc3df211c1a7..fa219e80a1f8 100644
@@ -5965,6 +5965,7 @@ F:	include/uapi/linux/gigaset_dev.h
 GNSS SUBSYSTEM
 M:	Johan Hovold <[email protected]>
 S:	Maintained
+F:	Documentation/devicetree/bindings/gnss/
 F:	drivers/gnss/
 F:	include/linux/gnss.h
 
Signature · 1 line
2.17.1
author maintainer
#3 lore raw

PATCH v3 3/8 gnss: add generic serial driver

In reply to Johan Hovold

Add a generic serial GNSS driver (library) which provides a common implementation for the gnss interface and power management (runtime and system suspend). This allows GNSS drivers for specific chip to be implemented by simply providing a set_power() callback to handle three
states: ACTIVE, STANDBY and OFF.

---
 drivers/gnss/Kconfig  |   7 ++
 drivers/gnss/Makefile |   3 +
 drivers/gnss/serial.c | 275 ++++++++++++++++++++++++++++++++++++++++++
 drivers/gnss/serial.h |  47 ++++++++
 4 files changed, 332 insertions(+)
 create mode 100644 drivers/gnss/serial.c
 create mode 100644 drivers/gnss/serial.h
drivers/gnss/Kconfig +7 -0
index 103fcc70992e..f8ee54f99a8d 100644
@@ -9,3 +9,10 @@ menuconfig GNSS
 
 	  To compile this driver as a module, choose M here: the module will
 	  be called gnss.
+
+if GNSS
+
+config GNSS_SERIAL
+	tristate
+
+endif # GNSS
drivers/gnss/Makefile +3 -0
index 1f7a7baab1d9..171aba71684d 100644
@@ -5,3 +5,6 @@
 
 obj-$(CONFIG_GNSS)			+= gnss.o
 gnss-y := core.o
+
+obj-$(CONFIG_GNSS_SERIAL)		+= gnss-serial.o
+gnss-serial-y := serial.o
drivers/gnss/serial.c new file +275 -0

275 lines not on this page · raw message

drivers/gnss/serial.h new file +47 -0

47 lines not on this page · raw message

Signature · 1 line
2.17.1
author maintainer
#4 lore raw

PATCH v3 4/8 dt-bindings: gnss: add u-blox binding

In reply to Johan Hovold

Add binding for u-blox GNSS receivers.

Note that the u-blox product names encodes form factor (e.g. "neo"), chipset (e.g. "8") and variant (e.g. "q"), but that only formfactor and chipset is used for the compatible strings (for now).

---
 .../devicetree/bindings/gnss/u-blox.txt       | 44 +++++++++++++++++++
 .../devicetree/bindings/vendor-prefixes.txt   |  1 +
 2 files changed, 45 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/gnss/u-blox.txt
Documentation/devicetree/bindings/gnss/u-blox.txt new file +44 -0
new file mode 100644
index 000000000000..e475659cb85f
@@ -0,0 +1,44 @@
+u-blox GNSS Receiver DT binding
+
+The u-blox GNSS receivers can use UART, DDC (I2C), SPI and USB interfaces.
+
+Please see Documentation/devicetree/bindings/gnss/gnss.txt for generic
+properties.
+
+Required properties:
+
+- compatible	: Must be one of
+
+			"u-blox,neo-8"
+			"u-blox,neo-m8"
+
+- vcc-supply	: Main voltage regulator
+
+Required properties (DDC):
+- reg		: DDC (I2C) slave address
+
+Required properties (SPI):
+- reg		: SPI chip select address
+
+Required properties (USB):
+- reg		: Number of the USB hub port or the USB host-controller port
+                  to which this device is attached
+
+Optional properties:
+
+- timepulse-gpios	: Time pulse GPIO
+- u-blox,extint-gpios	: GPIO connected to the "external interrupt" input pin
+- v-bckp-supply	: Backup voltage regulator
+
+Example:
+
+serial@1234 {
+	compatible = "ns16550a";
+
+	gnss {
+		compatible = "u-blox,neo-8";
+
+		v-bckp-supply = <&gnss_v_bckp_reg>;
+		vcc-supply = <&gnss_vcc_reg>;
+	};
+};
Documentation/devicetree/bindings/vendor-prefixes.txt +1 -0
index b5f978a4cac6..2128dfdf73f1 100644
@@ -374,6 +374,7 @@ tronsmart	Tronsmart
 truly	Truly Semiconductors Limited
 tsd	Theobroma Systems Design und Consulting GmbH
 tyan	Tyan Computer Corporation
+u-blox	u-blox
 ucrobotics	uCRobotics
 ubnt	Ubiquiti Networks
 udoo	Udoo
Signature · 1 line
2.17.1
Reviewed-by on v3 4/8
#5 lore raw

Re: [PATCH v3 4/8] dt-bindings: gnss: add u-blox binding

Quoted 6 lines · Johan Hovold

Add binding for u-blox GNSS receivers.

Note that the u-blox product names encodes form factor (e.g. "neo"), chipset (e.g. "8") and variant (e.g. "q"), but that only formfactor and chipset is used for the compatible strings (for now).

Quoted 6 lines
---
 .../devicetree/bindings/gnss/u-blox.txt       | 44 +++++++++++++++++++
 .../devicetree/bindings/vendor-prefixes.txt   |  1 +
 2 files changed, 45 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/gnss/u-blox.txt
author maintainer
#6 lore raw

PATCH v3 5/8 gnss: add driver for u-blox receivers

In reply to Johan Hovold

Add driver for serial-connected u-blox GNSS receivers.

Note that the driver uses the generic GNSS serial implementation and therefore essentially only manages power abstracted into three power
states: ACTIVE, STANDBY, and OFF.

For u-blox receivers with a main supply and no enable-gpios, this simply means that the main supply is disabled in STANDBY and OFF (the optional backup supply is kept enabled while the driver is bound).

Note that timepulse-support is not yet implemented.

---
 drivers/gnss/Kconfig  |  13 ++++
 drivers/gnss/Makefile |   3 +
 drivers/gnss/ubx.c    | 151 ++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 167 insertions(+)
 create mode 100644 drivers/gnss/ubx.c
drivers/gnss/Kconfig +13 -0
index f8ee54f99a8d..784b8c0367d9 100644
@@ -15,4 +15,17 @@ if GNSS
 config GNSS_SERIAL
 	tristate
 
+config GNSS_UBX_SERIAL
+	tristate "u-blox GNSS receiver support"
+	depends on SERIAL_DEV_BUS
+	select GNSS_SERIAL
+	---help---
+	  Say Y here if you have a u-blox GNSS receiver which uses a serial
+	  interface.
+
+	  To compile this driver as a module, choose M here: the module will
+	  be called gnss-ubx.
+
+	  If unsure, say N.
+
 endif # GNSS
drivers/gnss/Makefile +3 -0
index 171aba71684d..d9295b20b7bc 100644
@@ -8,3 +8,6 @@ gnss-y := core.o
 
 obj-$(CONFIG_GNSS_SERIAL)		+= gnss-serial.o
 gnss-serial-y := serial.o
+
+obj-$(CONFIG_GNSS_UBX_SERIAL)		+= gnss-ubx.o
+gnss-ubx-y := ubx.o
drivers/gnss/ubx.c new file +151 -0

151 lines not on this page · raw message

Signature · 1 line
2.17.1
author maintainer
#7 lore raw

PATCH v3 6/8 dt-bindings: gnss: add sirfstar binding

In reply to Johan Hovold

Add binding for SiRFstar-based GNSS receivers.

Note that while four compatible-strings are initially added representing devices which differ in which I/O interfaces they support, they otherwise essentially share the same feature set.

Pin and supply names vary slightly, as do some recommended timings.

Note that the wakeup gpio is not intended to be used as a wakeup source, but rather to detect the current power state of the device (active or hibernate).

---
 .../devicetree/bindings/gnss/sirfstar.txt     | 45 +++++++++++++++++++
 .../devicetree/bindings/vendor-prefixes.txt   |  3 ++
 2 files changed, 48 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/gnss/sirfstar.txt
Documentation/devicetree/bindings/gnss/sirfstar.txt new file +45 -0
new file mode 100644
index 000000000000..648d183cdb77
@@ -0,0 +1,45 @@
+SiRFstar-based GNSS Receiver DT binding
+
+SiRFstar chipsets are used in GNSS-receiver modules produced by several
+vendors and can use UART, SPI or I2C interfaces.
+
+Please see Documentation/devicetree/bindings/gnss/gnss.txt for generic
+properties.
+
+Required properties:
+
+- compatible	: Must be one of
+
+			"fastrax,uc430"
+			"linx,r4"
+			"wi2wi,w2sg0008i"
+			"wi2wi,w2sg0084i"
+
+- vcc-supply	: Main voltage regulator (pin name: 3V3_IN, VCC, VDD)
+
+Required properties (I2C):
+- reg		: I2C slave address
+
+Required properties (SPI):
+- reg		: SPI chip select address
+
+Optional properties:
+
+- sirf,onoff-gpios	: GPIO used to power on and off device (pin name: ON_OFF)
+- sirf,wakeup-gpios	: GPIO used to determine device power state
+			  (pin name: RFPWRUP, WAKEUP)
+- timepulse-gpios	: Time pulse GPIO (pin name: 1PPS, TM)
+
+Example:
+
+serial@1234 {
+	compatible = "ns16550a";
+
+	gnss {
+		compatible = "wi2wi,w2sg0084i";
+
+		vcc-supply = <&gnss_reg>;
+		sirf,onoff-gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>;
+		sirf,wakeup-gpios = <&gpio0 17 GPIO_ACTIVE_HIGH>;
+	};
+};
Documentation/devicetree/bindings/vendor-prefixes.txt +3 -0
index 2128dfdf73f1..61db9d2391c4 100644
@@ -120,6 +120,7 @@ excito	Excito
 ezchip	EZchip Semiconductor
 fairphone	Fairphone B.V.
 faraday	Faraday Technology Corporation
+fastrax	Fastrax Oy
 fcs	Fairchild Semiconductor
 firefly	Firefly
 focaltech	FocalTech Systems Co.,Ltd
@@ -197,6 +198,7 @@ licheepi	Lichee Pi
 linaro	Linaro Limited
 linksys	Belkin International, Inc. (Linksys)
 linux	Linux-specific binding
+linx	Linx Technologies
 lltc	Linear Technology Corporation
 lsi	LSI Corp. (LSI Logic)
 lwn	Liebherr-Werk Nenzing GmbH
@@ -393,6 +395,7 @@ vot	Vision Optical Technology Co., Ltd.
 wd	Western Digital Corp.
 wetek	WeTek Electronics, limited.
 wexler	Wexler
+wi2wi	Wi2Wi, Inc.
 winbond Winbond Electronics corp.
 winstar	Winstar Display Corp.
 wlf	Wolfson Microelectronics
Signature · 1 line
2.17.1
author maintainer
#8 lore raw

PATCH v3 7/8 gnss: add driver for sirfstar-based receivers

In reply to Johan Hovold

Add driver for serial-connected SiRFstar-based GNSS receivers.

These devices typically boot into hibernate mode from which they can be woken using a pulse on the ON_OFF input pin. Once active, a pulse on the same ON_OFF pin is used to put the device back into hibernate mode. The current state can be determined by sampling the WAKEUP output.

Hardware configurations where WAKEUP has been connected to ON_OFF (and where an initial WAKEUP pulse during boot is sufficient to have the device boot into active mode) are also supported. In this case, device power is managed using the main-supply regulator only.

Note that configurations where WAKEUP is left not connected, so that the device power state can only indirectly be determined using the I/O interface, is currently not supported. It should be fairly straight-forward to extend the current implementation with such support however (and this this is the main reason for not using the generic serial implementation for this driver).

Note that timepulse-support is left unimplemented.

---
 drivers/gnss/Kconfig  |  12 ++
 drivers/gnss/Makefile |   3 +
 drivers/gnss/sirf.c   | 407 ++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 422 insertions(+)
 create mode 100644 drivers/gnss/sirf.c
drivers/gnss/Kconfig +12 -0
index 784b8c0367d9..6abc88514512 100644
@@ -15,6 +15,18 @@ if GNSS
 config GNSS_SERIAL
 	tristate
 
+config GNSS_SIRF_SERIAL
+	tristate "SiRFstar GNSS receiver support"
+	depends on SERIAL_DEV_BUS
+	---help---
+	  Say Y here if you have a SiRFstar-based GNSS receiver which uses a
+	  serial interface.
+
+	  To compile this driver as a module, choose M here: the module will
+	  be called gnss-sirf.
+
+	  If unsure, say N.
+
 config GNSS_UBX_SERIAL
 	tristate "u-blox GNSS receiver support"
 	depends on SERIAL_DEV_BUS
drivers/gnss/Makefile +3 -0
index d9295b20b7bc..5cf0ebe0330a 100644
@@ -9,5 +9,8 @@ gnss-y := core.o
 obj-$(CONFIG_GNSS_SERIAL)		+= gnss-serial.o
 gnss-serial-y := serial.o
 
+obj-$(CONFIG_GNSS_SIRF_SERIAL)		+= gnss-sirf.o
+gnss-sirf-y := sirf.o
+
 obj-$(CONFIG_GNSS_UBX_SERIAL)		+= gnss-ubx.o
 gnss-ubx-y := ubx.o
drivers/gnss/sirf.c new file +407 -0

407 lines not on this page · raw message

Signature · 1 line
2.17.1
author maintainer
#9 lore raw

PATCH v3 8/8 gnss: add receiver type support

In reply to Johan Hovold

Add a "type" device attribute and a "GNSS_TYPE" uevent variable which can be used to determine the type of a GNSS receiver. The currently identified types reflect the protocol(s) supported by a receiver:

	"NMEA"	NMEA 0183
	"SiRF"	SiRF Binary
	"UBX"	UBX

Note that both SiRF and UBX type receivers typically support a subset of NMEA 0183 with vendor extensions (e.g. to allow switching to the vendor protocol).

---
 Documentation/ABI/testing/sysfs-class-gnss | 15 +++++++
 MAINTAINERS                                |  1 +
 drivers/gnss/core.c                        | 49 ++++++++++++++++++++++
 drivers/gnss/sirf.c                        |  1 +
 drivers/gnss/ubx.c                         |  2 +
 include/linux/gnss.h                       |  9 ++++
 6 files changed, 77 insertions(+)
 create mode 100644 Documentation/ABI/testing/sysfs-class-gnss
Documentation/ABI/testing/sysfs-class-gnss new file +15 -0
new file mode 100644
index 000000000000..2467b6900eae
@@ -0,0 +1,15 @@
+What:		/sys/class/gnss/gnssN/type
+Date:		May 2018
+KernelVersion:	4.18
+Contact:	Johan Hovold <[email protected]>
+Description:
+		The GNSS receiver type. The currently identified types reflect
+		the protocol(s) supported by the receiver:
+
+			"NMEA"		NMEA 0183
+			"SiRF"		SiRF Binary
+			"UBX"		UBX
+
+		Note that also non-"NMEA" type receivers typically support a
+		subset of NMEA 0183 with vendor extensions (e.g. to allow
+		switching to a vendor protocol).
MAINTAINERS +1 -0
index fa219e80a1f8..e666bc28a102 100644
@@ -5965,6 +5965,7 @@ F:	include/uapi/linux/gigaset_dev.h
 GNSS SUBSYSTEM
 M:	Johan Hovold <[email protected]>
 S:	Maintained
+F:	Documentation/ABI/testing/sysfs-class-gnss
 F:	Documentation/devicetree/bindings/gnss/
 F:	drivers/gnss/
 F:	include/linux/gnss.h
drivers/gnss/core.c +49 -0

61 lines not on this page · raw message

drivers/gnss/sirf.c +1 -0
index 5fb0f730db48..79cb98950013 100644
@@ -267,6 +267,7 @@ static int sirf_probe(struct serdev_device *serdev)
 	if (!gdev)
 		return -ENOMEM;
 
+	gdev->type = GNSS_TYPE_SIRF;
 	gdev->ops = &sirf_gnss_ops;
 	gnss_set_drvdata(gdev, data);
 
drivers/gnss/ubx.c +2 -0
index ecddfb362a6f..902b6854b7db 100644
@@ -77,6 +77,8 @@ static int ubx_probe(struct serdev_device *serdev)
 
 	gserial->ops = &ubx_gserial_ops;
 
+	gserial->gdev->type = GNSS_TYPE_UBX;
+
 	data = gnss_serial_get_drvdata(gserial);
 
 	data->vcc = devm_regulator_get(&serdev->dev, "vcc");
include/linux/gnss.h +9 -0
index e26aeac1e0e2..43546977098c 100644
@@ -18,6 +18,14 @@
 
 struct gnss_device;
 
+enum gnss_type {
+	GNSS_TYPE_NMEA = 0,
+	GNSS_TYPE_SIRF,
+	GNSS_TYPE_UBX,
+
+	GNSS_TYPE_COUNT
+};
+
 struct gnss_operations {
 	int (*open)(struct gnss_device *gdev);
 	void (*close)(struct gnss_device *gdev);
@@ -30,6 +38,7 @@ struct gnss_device {
 	struct cdev cdev;
 	int id;
 
+	enum gnss_type type;
 	unsigned long flags;
 
 	struct rw_semaphore rwsem;
Signature · 1 line
2.17.1
#10 lore raw
In reply to Johan Hovold

Hi!

Quoted 15 lines

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.

Quoted 5 lines

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.

This will never handle devices like Nokia N900, where GPS is connected over netlink.

Quoted 1 line

Another possible extension is to add generic 1PPS support.

And there's nothing GNSS specific in the patches.

Best regards,

Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
author maintainer
#11 lore raw
Quoted 23 lines · Pavel Machek

Hi!

Quoted 15 lines

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.

Quoted 5 lines

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).

Quoted 7 lines

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.

Quoted 2 lines

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.

Quoted 3 lines
Quoted 1 line

Another possible extension is to add generic 1PPS support.

And there's nothing GNSS specific in the patches.

I disagree.

Johan

#12 lore raw
Quoted 28 lines · Johan Hovold
Quoted 27 lines · Pavel Machek

Hi!

Quoted 15 lines

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.

Quoted 5 lines

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.

Quoted 5 lines
Quoted 3 lines

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.

I don't remember useful discussion.

Quoted 7 lines

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.

So you have serial line + pm + protocol type. Nothing GNSS specific really, it would be useful to (for example) say this is modem with AT commands. Or this is QMI modem.

Quoted 3 lines

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.

Or maybe it will need to manager power in the same way. How would the AT modem be different?

Quoted 3 lines

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.

Ok, true. It is "we pass tty-like data across". Again, it would be useful for AT commands, too, and yes, they go over serials and usbs and more, too.

Quoted 7 lines
Quoted 2 lines

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.

Yes, and ugnss would be at wrong layer for N900. First, lets take a look at N900 gps driver:
https://github.com/postmarketOS/gps-nokia-n900

Got it? I'll eventually like to see it in the kernel, but your "GNSS" subsystem is unsuitable for it, as it does not talk well-known protocol.

I'd like to see "datapipe" devices (what you currently call GNSS) and "gps" devices, which would have common interface to the userland.

N900 would not have any datapipe devices, but would have /dev/gps0 exposing common GPS interface.

Droid4 would have /dev/datapipe0 (usb, AT protocol), /dev/datapipe1 (usb, QMI protocol), /dev/datapipe2 (gsmtty over serial, custom AT protocol), /dev/datapipe3 (gsmtty over serial, NMEA wrapped in AT protocol) (and more, it is complex hardware). And if we really wanted, we'd have /dev/gps0, too, exposing common GPS interface.

Your devices would have /dev/datapipe0 with sirf or ublox or nmea protocol. In we really wanted, we'd have /dev/gps0, too, again, exposing common GPS interface.

I believe we really want to use your code for AT commands, too. And we really should keep GNSS/GPS names for future layer that actually provides single interface for userland.

Best regards,

Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
author maintainer
#13 lore raw
Quoted 7 lines · Pavel Machek
Quoted 6 lines · Johan Hovold

On Fri, Jun 01, 2018 at 11:33:11AM +0200, Pavel Machek wrote:

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.

Quoted 7 lines
Quoted 3 lines

Furthermore, (since v2) we export a GNSS receiver type, which allows further protocol detection hacks to be dropped, something which is also GNSS specific.

So you have serial line + pm + protocol type. Nothing GNSS specific really, it would be useful to (for example) say this is modem with AT commands. Or this is QMI modem.

It's a matter of finding the right abstraction level. A user space location service will now have easy access to the class of devices it cares about, without having to go through a list of other random devices which happen to use a similar underlying interface (e.g. a modem or whatever).

Quoted 6 lines
Quoted 3 lines

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.

Or maybe it will need to manager power in the same way. How would the AT modem be different?

Point is, you can't write a subsystem for everything. If it later turns out some part of the code can be shared internally, fine.

Quoted 7 lines
Quoted 3 lines

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.

Ok, true. It is "we pass tty-like data across". Again, it would be useful for AT commands, too, and yes, they go over serials and usbs and more, too.

Modems and GNSS devices would have different characteristics for buffers and throughput for starters.

The GNSS interface uses a synchronous writes for commands to the receiver, something which may not be appropriate for an outgoing data channel, for example.

As mentioned in the cover letter, we may eventually want to add support for some kinds of configuration from within the kernel (e.g. protocol and line speed changes).

Quoted 8 lines
Quoted 7 lines
Quoted 2 lines

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.

Quoted 7 lines

Yes, and ugnss would be at wrong layer for N900. First, lets take a look at N900 gps driver:
https://github.com/postmarketOS/gps-nokia-n900

Got it? I'll eventually like to see it in the kernel, but your "GNSS" subsystem is unsuitable for it, as it does not talk well-known protocol.

Seriously? If you can't be arsed to summarise your use case, why would I bother reading your random user space code?

Quoted 2 lines

I'd like to see "datapipe" devices (what you currently call GNSS) and "gps" devices, which would have common interface to the userland.

You keep talking about this "gps" interface, which based on your earlier comments I assume you mean a NMEA 0183 interface? Again, converting a vendor-specific binary protocol may not be feasible. Please try to be more be specific.

Quoted 9 lines

N900 would not have any datapipe devices, but would have /dev/gps0 exposing common GPS interface.

Droid4 would have /dev/datapipe0 (usb, AT protocol), /dev/datapipe1 (usb, QMI protocol), /dev/datapipe2 (gsmtty over serial, custom AT protocol), /dev/datapipe3 (gsmtty over serial, NMEA wrapped in AT protocol) (and more, it is complex hardware). And if we really wanted, we'd have /dev/gps0, too, exposing common GPS interface.

Quoted 3 lines

Your devices would have /dev/datapipe0 with sirf or ublox or nmea protocol. In we really wanted, we'd have /dev/gps0, too, again, exposing common GPS interface.

This does not seem like the right abstraction level and doesn't appear to provide much more than what we currently have with ttys.

Quoted 3 lines

I believe we really want to use your code for AT commands, too. And we really should keep GNSS/GPS names for future layer that actually provides single interface for userland.

Specifics, please. What would such an interface look like? I'm pretty sure, we do not want to move every GNSS middleware protocol handler into the kernel.

Johan

#14 lore raw

Hi!

Quoted 9 lines
Quoted 3 lines

So you have serial line + pm + protocol type. Nothing GNSS specific really, it would be useful to (for example) say this is modem with AT commands. Or this is QMI modem.

It's a matter of finding the right abstraction level. A user space location service will now have easy access to the class of devices it cares about, without having to go through a list of other random devices which happen to use a similar underlying interface (e.g. a modem or whatever).

udev solves device discovery pretty well; I don't think that's good thing to optimize for.

(And.. I'd really prefer /dev/nmeaX and /dev/sirfX in that situation; and yes that makes it _even easier_ for location service to find right devices).

Quoted 2 lines

Point is, you can't write a subsystem for everything. If it later turns out some part of the code can be shared internally, fine.

True. But you can pick reasonable name for the subsystem :-).

Quoted 8 lines
Quoted 7 lines
Quoted 3 lines

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.

Ok, true. It is "we pass tty-like data across". Again, it would be useful for AT commands, too, and yes, they go over serials and usbs and more, too.

Quoted 6 lines

Modems and GNSS devices would have different characteristics for buffers and throughput for starters.

The GNSS interface uses a synchronous writes for commands to the receiver, something which may not be appropriate for an outgoing data channel, for example.

Well, these days AT modems really have separate channels for commands and data.

Quoted 3 lines

As mentioned in the cover letter, we may eventually want to add support for some kinds of configuration from within the kernel (e.g. protocol and line speed changes).

I believe we'll eventually want "real" GPS drivers, with common interface. input was in this situation before...

Quoted 13 lines
Quoted 13 lines
Quoted 8 lines
Quoted 3 lines

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.

Yes, and ugnss would be at wrong layer for N900. First, lets take a look at N900 gps driver:
https://github.com/postmarketOS/gps-nokia-n900

Quoted 6 lines
Quoted 3 lines

Got it? I'll eventually like to see it in the kernel, but your "GNSS" subsystem is unsuitable for it, as it does not talk well-known protocol.

Seriously? If you can't be arsed to summarise your use case, why would I bother reading your random user space code?

You are trying to push subsystem to kernel. I believe asking you to do little research is not unexpected.

Anyway, it is trivial binary protocol over packets that are used for modem communication. Handling it is like 40? lines of code.

Quoted 7 lines
Quoted 2 lines

I'd like to see "datapipe" devices (what you currently call GNSS) and "gps" devices, which would have common interface to the userland.

You keep talking about this "gps" interface, which based on your earlier comments I assume you mean a NMEA 0183 interface? Again, converting a vendor-specific binary protocol may not be feasible. Please try to be more be specific.

I'm pretty sure we should have one protocol for communicating position data to userland. I don't want to go into details at the moment, as they are not important at the moment (and we could spend lot of time discussing details).

NMEA would not be my first choice, really. I'd propose something very similar to existing /dev/input/eventX, but with wider data types.

Quoted 9 lines
Quoted 9 lines

N900 would not have any datapipe devices, but would have /dev/gps0 exposing common GPS interface.

Droid4 would have /dev/datapipe0 (usb, AT protocol), /dev/datapipe1 (usb, QMI protocol), /dev/datapipe2 (gsmtty over serial, custom AT protocol), /dev/datapipe3 (gsmtty over serial, NMEA wrapped in AT protocol) (and more, it is complex hardware). And if we really wanted, we'd have /dev/gps0, too, exposing common GPS interface.

Quoted 6 lines
Quoted 3 lines

Your devices would have /dev/datapipe0 with sirf or ublox or nmea protocol. In we really wanted, we'd have /dev/gps0, too, again, exposing common GPS interface.

This does not seem like the right abstraction level and doesn't appear to provide much more than what we currently have with ttys.

I don't see what you are saying here. I've described your proposal but replaced /dev/gnss0 with /dev/datapipe0.

Quoted 7 lines
Quoted 3 lines

I believe we really want to use your code for AT commands, too. And we really should keep GNSS/GPS names for future layer that actually provides single interface for userland.

Specifics, please. What would such an interface look like? I'm pretty sure, we do not want to move every GNSS middleware protocol handler into the kernel.

Maybe we don't want to move _every_ GNSS protocol handler into kernel, but I'm pretty sure we need to move _some_ of them there. It is certainly best place for Nokia N900's protocol.

And I'm trying to make sure we have suitable names available when that happens.

Thanks,
Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#15 lore raw

Hi Pavel,

Quoted 4 lines

Am 01.06.2018 um 18:26 schrieb Pavel Machek <[email protected]>:

NMEA would not be my first choice, really. I'd propose something very similar to existing /dev/input/eventX, but with wider data types.

Since even Rome wasn't built in a day, my first choice is NMEA, but I am open to anything on higher level to come second.

What about iio?

It is quite flexible and extensible and GNSS coordinates are a not very different from accelerometer, gyroscope or compass data as all of them describe the position and orientation, maybe speed of the device these things are built into (at least for mobile devices).

--hns

#16 lore raw
Quoted 10 lines · H. Nikolaus Schaller

Hi Pavel,

Quoted 4 lines

Am 01.06.2018 um 18:26 schrieb Pavel Machek <[email protected]>:

NMEA would not be my first choice, really. I'd propose something very similar to existing /dev/input/eventX, but with wider data types.

Since even Rome wasn't built in a day, my first choice is NMEA, but I am open to anything on higher level to come second.

Quoted 6 lines

What about iio?

It is quite flexible and extensible and GNSS coordinates are a not very different from accelerometer, gyroscope or compass data as all of them describe the position and orientation, maybe speed of the device these things are built into (at least for mobile devices).

As I said, I do not want to have that discussion at the moment. Transfering position and orientation is easy, transfering some other data (such as sattelites used for fix) might be trickier. Anyway, I'm pretty sure reasonable solution exists; and yes we could use NMEA.

Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
author maintainer
#17 lore raw
In reply to Pavel Machek
Quoted 6 lines · Pavel Machek

Hi!

Quoted 4 lines
Quoted 3 lines

So you have serial line + pm + protocol type. Nothing GNSS specific really, it would be useful to (for example) say this is modem with AT commands. Or this is QMI modem.

Quoted 8 lines
Quoted 5 lines

It's a matter of finding the right abstraction level. A user space location service will now have easy access to the class of devices it cares about, without having to go through a list of other random devices which happen to use a similar underlying interface (e.g. a modem or whatever).

udev solves device discovery pretty well; I don't think that's good thing to optimize for.

It's about grouping related devices together, devices which share some common functionality. In this case, providing location data from some satellite system. I really don't understand how you can find having a class type named "gnss" for this to be controversial in any way.

Quoted 3 lines

(And.. I'd really prefer /dev/nmeaX and /dev/sirfX in that situation; and yes that makes it _even easier_ for location service to find right devices).

As I've already explained, you may not know which protocol is currently active when the device start and you typically switch from NMEA to a vendor protocol during runtime (e.g. for configuration or to access raw GNSS data).

Trying to encode the GNSS protocol in the character-device node name is just a bad idea.

Quoted 4 lines
Quoted 2 lines

Point is, you can't write a subsystem for everything. If it later turns out some part of the code can be shared internally, fine.

True. But you can pick reasonable name for the subsystem :-).

I find naming a subsystem for GNSS receivers "gnss" to be very reasonable. ;)

Quoted 18 lines
Quoted 8 lines
Quoted 7 lines
Quoted 3 lines

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.

Ok, true. It is "we pass tty-like data across". Again, it would be useful for AT commands, too, and yes, they go over serials and usbs and more, too.

Quoted 6 lines

Modems and GNSS devices would have different characteristics for buffers and throughput for starters.

The GNSS interface uses a synchronous writes for commands to the receiver, something which may not be appropriate for an outgoing data channel, for example.

Well, these days AT modems really have separate channels for commands and data.

Quoted 6 lines
Quoted 3 lines

As mentioned in the cover letter, we may eventually want to add support for some kinds of configuration from within the kernel (e.g. protocol and line speed changes).

I believe we'll eventually want "real" GPS drivers, with common interface. input was in this situation before...

As we also already discussed, there's nothing preventing you from trying to move gpsd into the kernel later. I doubt this is something we want, and it may turn out not to be feasible for other reasons.

And as you already acknowledged, this series does solve a problem we have today.

Quoted 16 lines
Quoted 16 lines
Quoted 15 lines
Quoted 7 lines
Quoted 2 lines

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.

Yes, and ugnss would be at wrong layer for N900. First, lets take a look at N900 gps driver:
https://github.com/postmarketOS/gps-nokia-n900

Got it? I'll eventually like to see it in the kernel, but your "GNSS" subsystem is unsuitable for it, as it does not talk well-known protocol.

Quoted 5 lines
Quoted 2 lines

Seriously? If you can't be arsed to summarise your use case, why would I bother reading your random user space code?

You are trying to push subsystem to kernel. I believe asking you to do little research is not unexpected.

Waving your hands, saying this will never work, and pointing to some 600 lines of user-space code for an old phone isn't an argument. That is, at best, just you being lazy.

Quoted 2 lines

Anyway, it is trivial binary protocol over packets that are used for modem communication. Handling it is like 40? lines of code.

Ok, so I did read the damn thing along with the overview of the N900 GPS hardware and reverse-engineered protocol (why didn't you point me to those instead?) and I'm still not sure what the point you're trying to make is.

The n900 service you link to above, parses phonet data, does some *floating point* calculations and generates NMEA sentences which it feeds to a pseudo terminal whose slave side is opened by gpsd.

That NMEA data could just as easily be fed through a different kernel subsystem, namely gnss instead of tty, where it could be accessed through a common interface (for now, a raw gnss interface, with some associated meta data). [ And from what I can tell, ugnss would also allow you to get rid of some hacks related to finding out when the GNSS is opened and needs to be powered on. ]

So the ugnss interface looks like it will work for N900 just as it will for other phones.

Quoted 8 lines
Quoted 7 lines
Quoted 2 lines

I'd like to see "datapipe" devices (what you currently call GNSS) and "gps" devices, which would have common interface to the userland.

You keep talking about this "gps" interface, which based on your earlier comments I assume you mean a NMEA 0183 interface? Again, converting a vendor-specific binary protocol may not be feasible. Please try to be more be specific.

Quoted 7 lines

I'm pretty sure we should have one protocol for communicating position data to userland. I don't want to go into details at the moment, as they are not important at the moment (and we could spend lot of time discussing details).

NMEA would not be my first choice, really. I'd propose something very similar to existing /dev/input/eventX, but with wider data types.

Fine, you pursue that idea if you want then. I can see many problems with trying to so, but the point is, this series doesn't prevent you from doing so.

If you think you'll one day be able to parse and repackage the various vendor protocols within the kernel, you can consider the raw gnss interface as an intermediate step (which may continue to exist in parallel just as say hidraw).

As I've already mentioned, I considered naming the device nodes /dev/gnssraw0 partly because it would leave /dev/gnss namespace free for any such future development. I ultimately found that idea to be too implausible for it to be worth the potential confusion arising from the fact that "raw" GNSS data is already has an established meaning.

But in the end, this is just name bike shedding.

Quoted 13 lines
Quoted 13 lines
Quoted 12 lines

N900 would not have any datapipe devices, but would have /dev/gps0 exposing common GPS interface.

Droid4 would have /dev/datapipe0 (usb, AT protocol), /dev/datapipe1 (usb, QMI protocol), /dev/datapipe2 (gsmtty over serial, custom AT protocol), /dev/datapipe3 (gsmtty over serial, NMEA wrapped in AT protocol) (and more, it is complex hardware). And if we really wanted, we'd have /dev/gps0, too, exposing common GPS interface.

Your devices would have /dev/datapipe0 with sirf or ublox or nmea protocol. In we really wanted, we'd have /dev/gps0, too, again, exposing common GPS interface.

Quoted 5 lines
Quoted 2 lines

This does not seem like the right abstraction level and doesn't appear to provide much more than what we currently have with ttys.

I don't see what you are saying here. I've described your proposal but replaced /dev/gnss0 with /dev/datapipe0.

You're grouping unrelated devices into a new class with the descriptive name "datapipe" (sarcasm).

Maybe one day we'll have a QMI subsystem, for example, but until someone determines what that may end up looking like, I think we should stick with the character device and tty abstractions we already have.

Quoted 8 lines
Quoted 7 lines
Quoted 3 lines

I believe we really want to use your code for AT commands, too. And we really should keep GNSS/GPS names for future layer that actually provides single interface for userland.

Specifics, please. What would such an interface look like? I'm pretty sure, we do not want to move every GNSS middleware protocol handler into the kernel.

Quoted 6 lines

Maybe we don't want to move _every_ GNSS protocol handler into kernel, but I'm pretty sure we need to move _some_ of them there. It is certainly best place for Nokia N900's protocol.

And I'm trying to make sure we have suitable names available when that happens.

If that's the concern, we could reconsider naming the raw protocol interface /dev/gnnsraw0 as mentioned above.

Thanks,
Johan

#18 lore raw

Hi!

Quoted 7 lines
Quoted 2 lines

udev solves device discovery pretty well; I don't think that's good thing to optimize for.

It's about grouping related devices together, devices which share some common functionality. In this case, providing location data from some satellite system. I really don't understand how you can find having a class type named "gnss" for this to be controversial in any way.

We normally group devices by interface, not by functionality.

Quoted 11 lines
Quoted 3 lines

(And.. I'd really prefer /dev/nmeaX and /dev/sirfX in that situation; and yes that makes it _even easier_ for location service to find right devices).

As I've already explained, you may not know which protocol is currently active when the device start and you typically switch from NMEA to a vendor protocol during runtime (e.g. for configuration or to access raw GNSS data).

Trying to encode the GNSS protocol in the character-device node name is just a bad idea.

I thought idea was to switch to the "best" protocol in kernel.

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

Point is, you can't write a subsystem for everything. If it later turns out some part of the code can be shared internally, fine.

True. But you can pick reasonable name for the subsystem :-).

I find naming a subsystem for GNSS receivers "gnss" to be very reasonable. ;)

I don't. I'll explain why below.

Quoted 7 lines
Quoted 7 lines

Well, these days AT modems really have separate channels for commands and data.

Quoted 3 lines

As mentioned in the cover letter, we may eventually want to add support for some kinds of configuration from within the kernel (e.g. protocol and line speed changes).

Quoted 6 lines
Quoted 2 lines

I believe we'll eventually want "real" GPS drivers, with common interface. input was in this situation before...

As we also already discussed, there's nothing preventing you from trying to move gpsd into the kernel later. I doubt this is something we want, and it may turn out not to be feasible for other reasons.

Well -- I believe we want "gpsd in kernel". If you take /dev/gnss0 and drivers/gnss now, where do I put them?

Quoted 2 lines

And as you already acknowledged, this series does solve a problem we have today.

Yes. I'm not disputing that.

Quoted 7 lines
Quoted 2 lines

Anyway, it is trivial binary protocol over packets that are used for modem communication. Handling it is like 40? lines of code.

Ok, so I did read the damn thing along with the overview of the N900 GPS hardware and reverse-engineered protocol (why didn't you point me to those instead?) and I'm still not sure what the point you're trying to make is.

Umm. Where did you find the hardware overview/protocol overview?

Quoted 11 lines

The n900 service you link to above, parses phonet data, does some *floating point* calculations and generates NMEA sentences which it feeds to a pseudo terminal whose slave side is opened by gpsd.

That NMEA data could just as easily be fed through a different kernel subsystem, namely gnss instead of tty, where it could be accessed through a common interface (for now, a raw gnss interface, with some associated meta data). [ And from what I can tell, ugnss would also allow you to get rid of some hacks related to finding out when the GNSS is opened and needs to be powered on. ]

Quoted 2 lines

So the ugnss interface looks like it will work for N900 just as it will for other phones.

Not NMEA please. First, NMEA has strange format of latitude/longitude -- that's those calculations IIRC. NMEA has other problems, too -- like not atomically providing speeds and accuracies. Plus it is crazy text protoco with CRCs.

Quoted 12 lines
Quoted 2 lines

NMEA would not be my first choice, really. I'd propose something very similar to existing /dev/input/eventX, but with wider data types.

Fine, you pursue that idea if you want then. I can see many problems with trying to so, but the point is, this series doesn't prevent you from doing so.

If you think you'll one day be able to parse and repackage the various vendor protocols within the kernel, you can consider the raw gnss interface as an intermediate step (which may continue to exist in parallel just as say hidraw).

Quoted 7 lines

As I've already mentioned, I considered naming the device nodes /dev/gnssraw0 partly because it would leave /dev/gnss namespace free for any such future development. I ultimately found that idea to be too implausible for it to be worth the potential confusion arising from the fact that "raw" GNSS data is already has an established meaning.

But in the end, this is just name bike shedding.

So I agree /dev/gnssraw is not great. But /dev/gnss is even worse. And yes, it is "just" a naming, but it will be impossible to fix later.

/dev/serdev? /dev/gnssproto?

Quoted 9 lines
Quoted 6 lines

Maybe we don't want to move _every_ GNSS protocol handler into kernel, but I'm pretty sure we need to move _some_ of them there. It is certainly best place for Nokia N900's protocol.

And I'm trying to make sure we have suitable names available when that happens.

If that's the concern, we could reconsider naming the raw protocol interface /dev/gnnsraw0 as mentioned above.

I prfer /dev/gnssraw0 to /dev/gnss0.

Thanks,
Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
author maintainer
#19 lore raw
Quoted 11 lines · Pavel Machek

Hi!

Quoted 7 lines
Quoted 2 lines

udev solves device discovery pretty well; I don't think that's good thing to optimize for.

It's about grouping related devices together, devices which share some common functionality. In this case, providing location data from some satellite system. I really don't understand how you can find having a class type named "gnss" for this to be controversial in any way.

We normally group devices by interface, not by functionality.

And interfaces also tend to reflect functionality.

Quoted 9 lines
Quoted 9 lines
Quoted 3 lines

(And.. I'd really prefer /dev/nmeaX and /dev/sirfX in that situation; and yes that makes it _even easier_ for location service to find right devices).

As I've already explained, you may not know which protocol is currently active when the device start and you typically switch from NMEA to a vendor protocol during runtime (e.g. for configuration or to access raw GNSS data).

Quoted 4 lines
Quoted 2 lines

Trying to encode the GNSS protocol in the character-device node name is just a bad idea.

I thought idea was to switch to the "best" protocol in kernel.

I'm afraid it's not that simple; the vendor protocols are not always supersets of the data and commands provided by the NMEA modes. Apparently, some data is only available in NMEA mode for SiRF devices, for example, so we need to provide some flexibility here.

Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
Quoted 3 lines

As mentioned in the cover letter, we may eventually want to add support for some kinds of configuration from within the kernel (e.g. protocol and line speed changes).

I believe we'll eventually want "real" GPS drivers, with common interface. input was in this situation before...

Quoted 6 lines
Quoted 3 lines

As we also already discussed, there's nothing preventing you from trying to move gpsd into the kernel later. I doubt this is something we want, and it may turn out not to be feasible for other reasons.

Well -- I believe we want "gpsd in kernel". If you take /dev/gnss0 and drivers/gnss now, where do I put them?

The subsystem would still live under drivers/gnss. If there's ever going to be an in-kernel gpsd, then maybe /dev/gnss0 could have been used for it instead (if a character device is even the right interface).

I started off with separating the gnss device itself from the raw interface (cf. hid) to allow for something like that, but the more I looked into this the more it seems I was just over-engineering for something that would never be realised.

Take a look at some of the papers on the gpsd site about GNSS protocols and the problem of finding a common representation for all the various devices out there. gpsd itself has already gone through three revisions of its internal representation over the past decades. This does not seem like an exercise we want to repeat in the kernel with its rules about backwards compatibility etc.

So at least for the time being, I'm convinced that a raw gnss interface is the right one.

Quoted 6 lines
Quoted 4 lines

Ok, so I did read the damn thing along with the overview of the N900 GPS hardware and reverse-engineered protocol (why didn't you point me to those instead?) and I'm still not sure what the point you're trying to make is.

Umm. Where did you find the hardware overview/protocol overview?

It looks like Sebastian (and others) once put something together here:

	https://wiki.maemo.org/N900_Hardware_GPS
	https://wiki.maemo.org/N900_GPS_Reverse_Engineering
Quoted 11 lines
Quoted 11 lines

The n900 service you link to above, parses phonet data, does some *floating point* calculations and generates NMEA sentences which it feeds to a pseudo terminal whose slave side is opened by gpsd.

That NMEA data could just as easily be fed through a different kernel subsystem, namely gnss instead of tty, where it could be accessed through a common interface (for now, a raw gnss interface, with some associated meta data). [ And from what I can tell, ugnss would also allow you to get rid of some hacks related to finding out when the GNSS is opened and needs to be powered on. ]

Quoted 7 lines
Quoted 2 lines

So the ugnss interface looks like it will work for N900 just as it will for other phones.

Not NMEA please. First, NMEA has strange format of latitude/longitude -- that's those calculations IIRC. NMEA has other problems, too -- like not atomically providing speeds and accuracies. Plus it is crazy text protoco with CRCs.

Then of course you also have the issue that all of user space would need to be taught to understand this yet-to-be-conceived generic protocol.

Quoted 18 lines
Quoted 18 lines
Quoted 2 lines

NMEA would not be my first choice, really. I'd propose something very similar to existing /dev/input/eventX, but with wider data types.

Fine, you pursue that idea if you want then. I can see many problems with trying to so, but the point is, this series doesn't prevent you from doing so.

If you think you'll one day be able to parse and repackage the various vendor protocols within the kernel, you can consider the raw gnss interface as an intermediate step (which may continue to exist in parallel just as say hidraw).

As I've already mentioned, I considered naming the device nodes /dev/gnssraw0 partly because it would leave /dev/gnss namespace free for any such future development. I ultimately found that idea to be too implausible for it to be worth the potential confusion arising from the fact that "raw" GNSS data is already has an established meaning.

Quoted 6 lines
Quoted 1 line

But in the end, this is just name bike shedding.

So I agree /dev/gnssraw is not great. But /dev/gnss is even worse. And yes, it is "just" a naming, but it will be impossible to fix later.

/dev/serdev? /dev/gnssproto?

Again, the gnss subsystem is transport agnostic so /dev/serdev is not an option.

gpsd uses the term "raw" for its raw access to the device protocol. Probably best to use "gnssraw" in case this needs to be changed at all.

Thanks,
Johan

#20 lore raw
In reply to Johan Hovold
Quoted 56 lines · Johan Hovold

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).

This will still allow for better platform integration by allowing GNSS devices and their resources (e.g. regulators and enable-gpios) to be described by firmware and managed by kernel drivers rather than platform-specific scripts and services.

While the current interface is kept minimal, it could be extended using IOCTLs, sysfs or uevents as needs and proper abstraction levels are identified and determined (e.g. for device and feature identification).

Another possible extension is to add generic 1PPS support.

I decided to go with a custom character-device interface rather than pretend that these abstract GNSS devices are still TTY devices (e.g. /dev/ttyGNSS0). Obviously, modifying line settings or reading modem control signals does not make any sense for a device using, say, a USB (not USB-serial) or iomem interface. This also means, however, that user space would no longer be able to set the line speed to match a new port configuration that can be set using the various GNSS protocols when the underlying interface is indeed a UART; instead this would need to be taken care of by the driver.

Also note that writes are always synchronous instead of requiring user space to call tcdrain() after every command.

This all seems to work well-enough (e.g. with gpsd), but please let me know if I've overlooked something which would indeed require a TTY interface instead.

I have implemented drivers for receivers based on two common GNSS chipsets; SiRFstar and u-blox. Due to lack of hardware, the sirf driver has been tested using a mockup device and a USB-serial-based SiRFstar IV GPS (using out-of-tree USB-serial code). [ Let me know if you've got any evaluation kits to spare. ] The ubx driver has been tested using a u-blox 8 GNSS evaluation kit (thanks u-blox!).

Quoted 3 lines

Finally, note that documentation (including kerneldoc) remains to be written, but hopefully this will not hinder review given that the current interfaces are fairly self-describing.

This all looks great. Thanks for doing this work and adding a new subsystem for something that has been asked for for many years.

All now merged in my tree, nice job!

greg k-h

#21 lore raw
Quoted 9 lines
Quoted 4 lines

Finally, note that documentation (including kerneldoc) remains to be written, but hopefully this will not hinder review given that the current interfaces are fairly self-describing.

This all looks great. Thanks for doing this work and adding a new subsystem for something that has been asked for for many years.

All now merged in my tree, nice job!

I don't think discussion was finished on this one.

In particular, we agreed that /dev/gnssrawX would be better device name, so that we still have place where to put proper abstraction layer in future.

Best regards,
Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
author maintainer
#22 lore raw
Quoted 8 lines · Pavel Machek
Quoted 8 lines
Quoted 4 lines

Finally, note that documentation (including kerneldoc) remains to be written, but hopefully this will not hinder review given that the current interfaces are fairly self-describing.

This all looks great. Thanks for doing this work and adding a new subsystem for something that has been asked for for many years.

Quoted 7 lines
Quoted 1 line

All now merged in my tree, nice job!

I don't think discussion was finished on this one.

In particular, we agreed that /dev/gnssrawX would be better device name, so that we still have place where to put proper abstraction layer in future.

I did not agree with you on that. I said we could consider that name if this was to be changed at all, which I do not think is necessary for the reasons spelled out in this thread.

Johan

#23 lore raw
Quoted 13 lines · Johan Hovold
Quoted 12 lines · Pavel Machek
Quoted 9 lines
Quoted 4 lines

Finally, note that documentation (including kerneldoc) remains to be written, but hopefully this will not hinder review given that the current interfaces are fairly self-describing.

This all looks great. Thanks for doing this work and adding a new subsystem for something that has been asked for for many years.

All now merged in my tree, nice job!

I don't think discussion was finished on this one.

Quoted 7 lines
Quoted 3 lines

In particular, we agreed that /dev/gnssrawX would be better device name, so that we still have place where to put proper abstraction layer in future.

I did not agree with you on that. I said we could consider that name if this was to be changed at all, which I do not think is necessary for the reasons spelled out in this thread.

So, again: there's nothing gnss specific in those patches. It does not know about the format of the data passed around. (Best you can claim that somehow data flow characteristics are unique to gnss.) And this takes namespace needed for real gnss subsystem. Please don't do it.

Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
author maintainer
#24 lore raw
Quoted 18 lines · Pavel Machek
Quoted 17 lines · Johan Hovold
Quoted 15 lines · Pavel Machek
Quoted 9 lines
Quoted 4 lines

Finally, note that documentation (including kerneldoc) remains to be written, but hopefully this will not hinder review given that the current interfaces are fairly self-describing.

This all looks great. Thanks for doing this work and adding a new subsystem for something that has been asked for for many years.

All now merged in my tree, nice job!

I don't think discussion was finished on this one.

In particular, we agreed that /dev/gnssrawX would be better device name, so that we still have place where to put proper abstraction layer in future.

Quoted 8 lines
Quoted 3 lines

I did not agree with you on that. I said we could consider that name if this was to be changed at all, which I do not think is necessary for the reasons spelled out in this thread.

So, again: there's nothing gnss specific in those patches. It does not know about the format of the data passed around. (Best you can claim that somehow data flow characteristics are unique to gnss.) And this takes namespace needed for real gnss subsystem. Please don't do it.

This is the real gnss subsystem. Get over it.

Johan

#25 lore raw
Quoted 23 lines · Johan Hovold
Quoted 22 lines · Pavel Machek
Quoted 20 lines · Johan Hovold
Quoted 8 lines · Pavel Machek
Quoted 8 lines
Quoted 4 lines

Finally, note that documentation (including kerneldoc) remains to be written, but hopefully this will not hinder review given that the current interfaces are fairly self-describing.

This all looks great. Thanks for doing this work and adding a new subsystem for something that has been asked for for many years.

Quoted 7 lines
Quoted 1 line

All now merged in my tree, nice job!

I don't think discussion was finished on this one.

In particular, we agreed that /dev/gnssrawX would be better device name, so that we still have place where to put proper abstraction layer in future.

I did not agree with you on that. I said we could consider that name if this was to be changed at all, which I do not think is necessary for the reasons spelled out in this thread.

Quoted 6 lines
Quoted 4 lines

So, again: there's nothing gnss specific in those patches. It does not know about the format of the data passed around. (Best you can claim that somehow data flow characteristics are unique to gnss.) And this takes namespace needed for real gnss subsystem. Please don't do it.

This is the real gnss subsystem. Get over it.

Congratulations. You have created gnss subsystem that has 0 lines of code that are gnss-specific.

This is not real gnss subsystem. This is pipe that passes data, similar to /dev/psaux or mouse on /dev/ttyS0. Sooner or later, real gnss subsystem (with unified interface) will be needed, as it was for input, and this "pipe and gpio" thing should not hog required namespace.

Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
author maintainer
#26 lore raw
Quoted 29 lines · Pavel Machek
Quoted 28 lines · Johan Hovold
Quoted 26 lines · Pavel Machek
Quoted 13 lines · Johan Hovold
Quoted 12 lines · Pavel Machek
Quoted 9 lines
Quoted 4 lines

Finally, note that documentation (including kerneldoc) remains to be written, but hopefully this will not hinder review given that the current interfaces are fairly self-describing.

This all looks great. Thanks for doing this work and adding a new subsystem for something that has been asked for for many years.

All now merged in my tree, nice job!

I don't think discussion was finished on this one.

Quoted 7 lines
Quoted 3 lines

In particular, we agreed that /dev/gnssrawX would be better device name, so that we still have place where to put proper abstraction layer in future.

I did not agree with you on that. I said we could consider that name if this was to be changed at all, which I do not think is necessary for the reasons spelled out in this thread.

So, again: there's nothing gnss specific in those patches. It does not know about the format of the data passed around. (Best you can claim that somehow data flow characteristics are unique to gnss.) And this takes namespace needed for real gnss subsystem. Please don't do it.

Quoted 4 lines
Quoted 1 line

This is the real gnss subsystem. Get over it.

Congratulations. You have created gnss subsystem that has 0 lines of code that are gnss-specific.

We have been through this already.

Quoted 5 lines

This is not real gnss subsystem. This is pipe that passes data, similar to /dev/psaux or mouse on /dev/ttyS0. Sooner or later, real gnss subsystem (with unified interface) will be needed, as it was for input, and this "pipe and gpio" thing should not hog required namespace.

It is still the gnss subsystem with a raw interface to the underlying protocols. As I've said repeatedly, *if* someone ever comes up with a way of abstracting these protocols, and can make the case this is really something we want to handle in the kernel, we would still be using the same drivers for managing power and I/O. Get it? It's the same subsystem, you'd just be adding a second higher-level interface (cf. hiddev and hidraw).

So again, all that this comes down to is bike shedding about the device node name.

Johan

#27 lore raw
In reply to Pavel Machek
Quoted 11 lines · Pavel Machek
Quoted 9 lines
Quoted 4 lines

Finally, note that documentation (including kerneldoc) remains to be written, but hopefully this will not hinder review given that the current interfaces are fairly self-describing.

This all looks great. Thanks for doing this work and adding a new subsystem for something that has been asked for for many years.

All now merged in my tree, nice job!

I don't think discussion was finished on this one.

It looked done to me as there was only a single set of patches, with no other working patches submitted from anyone else.

If this turns out to be a "bad" api, then we can deal with it then, but for now let's try this out.

thanks,

greg k-h

#28 lore raw
Quoted 9 lines · Greg Kroah-Hartman
Quoted 8 lines · Pavel Machek
Quoted 8 lines
Quoted 4 lines

Finally, note that documentation (including kerneldoc) remains to be written, but hopefully this will not hinder review given that the current interfaces are fairly self-describing.

This all looks great. Thanks for doing this work and adding a new subsystem for something that has been asked for for many years.

Quoted 6 lines
Quoted 3 lines
Quoted 1 line

All now merged in my tree, nice job!

I don't think discussion was finished on this one.

It looked done to me as there was only a single set of patches, with no other working patches submitted from anyone else.

Is "noone submitted patches on top" sufficient reason to apply the patch?

Quoted 2 lines

If this turns out to be a "bad" api, then we can deal with it then, but for now let's try this out.

Series uses /dev/gnss0 , without providing hardware abstraction, blocking place for proper gnss layer. Suggested fix is to to make it "/dev/gnssraw0". How do you propose to fix this after it is merged?

Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html