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>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
d2efbbd18b
commit
10f146639f
@@ -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;
|
||||
|
Reference in New Issue
Block a user