aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gnss/ubx.c
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 /drivers/gnss/ubx.c
parentgnss: add driver for sirfstar-based receivers (diff)
downloadlinux-dev-10f146639fee5ffaf7cf0081c1af518f7d0c533c.tar.xz
linux-dev-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 'drivers/gnss/ubx.c')
-rw-r--r--drivers/gnss/ubx.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gnss/ubx.c b/drivers/gnss/ubx.c
index ecddfb362a6f..902b6854b7db 100644
--- a/drivers/gnss/ubx.c
+++ b/drivers/gnss/ubx.c
@@ -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");