diff options
author | Johan Hovold <johan@kernel.org> | 2018-06-01 10:22:59 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-06-28 20:32:51 +0900 |
commit | 10f146639fee5ffaf7cf0081c1af518f7d0c533c (patch) | |
tree | 1fdc31ab3bf22339c89db3b7ba134c6aad9579cf /drivers/gnss/sirf.c | |
parent | d2efbbd18b1e26ac79401841089e4a4b97d745c3 (diff) |
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 'drivers/gnss/sirf.c')
-rw-r--r-- | drivers/gnss/sirf.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gnss/sirf.c b/drivers/gnss/sirf.c index 5fb0f730db48..79cb98950013 100644 --- a/drivers/gnss/sirf.c +++ b/drivers/gnss/sirf.c @@ -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); |