summaryrefslogtreecommitdiffstats
path: root/include/linux/gnss.h
diff options
context:
space:
mode:
authorJohan Hovold <johan@kernel.org>2018-06-01 10:22:59 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-06-28 20:32:51 +0900
commit10f146639fee5ffaf7cf0081c1af518f7d0c533c (patch)
tree1fdc31ab3bf22339c89db3b7ba134c6aad9579cf /include/linux/gnss.h
parentd2efbbd18b1e26ac79401841089e4a4b97d745c3 (diff)
downloadlinux-10f146639fee5ffaf7cf0081c1af518f7d0c533c.tar.gz
linux-10f146639fee5ffaf7cf0081c1af518f7d0c533c.tar.bz2
linux-10f146639fee5ffaf7cf0081c1af518f7d0c533c.zip
gnss: add receiver type support
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). Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/gnss.h')
-rw-r--r--include/linux/gnss.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/gnss.h b/include/linux/gnss.h
index e26aeac1e0e2..43546977098c 100644
--- a/include/linux/gnss.h
+++ b/include/linux/gnss.h
@@ -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;