547d2167 | 20-Dec-2021 |
Johan Hovold <johan@kernel.org> |
gnss: usb: add support for Sierra Wireless XM1210
Add support for the USB interface of the Sierra Wireless XM1210 receiver.
Note that the device only supports NMEA.
Bus 002 Device 003: ID 1199:b00
gnss: usb: add support for Sierra Wireless XM1210
Add support for the USB interface of the Sierra Wireless XM1210 receiver.
Note that the device only supports NMEA.
Bus 002 Device 003: ID 1199:b000 Sierra Wireless, Inc. Sierra Wireless_GNSS Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 1.00 bDeviceClass 0 bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 64 idVendor 0x1199 Sierra Wireless, Inc. idProduct 0xb000 bcdDevice 0.01 iManufacturer 1 Sierra-wireless iProduct 2 Sierra Wireless_GNSS iSerial 0 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 0x0020 bNumInterfaces 1 bConfigurationValue 1 iConfiguration 0 bmAttributes 0xc0 Self Powered MaxPower 50mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 0 bInterfaceSubClass 0 bInterfaceProtocol 0 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 255 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x01 EP 1 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 255 can't get debug descriptor: Resource temporarily unavailable Device Status: 0x0001 Self Powered
Reported-by: Marc Ferland <ferlandm@amotus.ca> Link: https://lore.kernel.org/r/20211027200223.72701-1-ferlandm@amotus.ca Link: https://lore.kernel.org/r/20211220111901.23206-3-johan@kernel.org Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Tested-by: Marc Ferland <ferlandm@amotus.ca> Signed-off-by: Johan Hovold <johan@kernel.org>
show more ...
|
ee4736e5 | 20-Dec-2021 |
Johan Hovold <johan@kernel.org> |
gnss: add USB support
Add a generic driver for GNSS receivers with a USB interface with two bulk endpoints.
The driver currently assumes that the device protocol is NMEA (only) but this can be gene
gnss: add USB support
Add a generic driver for GNSS receivers with a USB interface with two bulk endpoints.
The driver currently assumes that the device protocol is NMEA (only) but this can be generalised later as needed.
Link: https://lore.kernel.org/r/20211220111901.23206-2-johan@kernel.org Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Tested-by: Marc Ferland <ferlandm@amotus.ca> Signed-off-by: Johan Hovold <johan@kernel.org>
show more ...
|
9b5816b5 | 07-May-2020 |
Gustavo A. R. Silva <gustavoars@kernel.org> |
gnss: replace zero-length array with flexible-array
The current codebase makes use of the zero-length array language extension to the C90 standard, but the preferred mechanism to declare variable-le
gnss: replace zero-length array with flexible-array
The current codebase makes use of the zero-length array language extension to the C90 standard, but the preferred mechanism to declare variable-length types such as these ones is a flexible array member[1][2], introduced in C99:
struct foo { int stuff; struct boo array[]; };
By making use of the mechanism above, we will get a compiler warning in case the flexible array does not occur last in the structure, which will help us prevent some kind of undefined behavior bugs from being inadvertently introduced[3] to the codebase from now on.
Also, notice that, dynamic memory allocations won't be affected by this change:
"Flexible array members have incomplete type, and so the sizeof operator may not be applied. As a quirk of the original implementation of zero-length arrays, sizeof evaluates to zero."[1]
sizeof(flexible-array-member) triggers a warning because flexible array members have incomplete type[1]. There are some instances of code in which the sizeof operator is being incorrectly/erroneously applied to zero-length arrays and the result is zero. Such instances may be hiding some bugs. So, this work (flexible-array member conversions) will also help to get completely rid of those sorts of issues.
This issue was found with the help of Coccinelle.
[1] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html [2] https://github.com/KSPP/linux/issues/21 [3] commit 76497732932f ("cxgb3/l2t: Fix undefined behaviour")
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> Signed-off-by: Johan Hovold <johan@kernel.org>
show more ...
|
d4584bbf | 13-Feb-2019 |
Loys Ollivier <lollivier@baylibre.com> |
gnss: add driver for mediatek receivers
Add driver for serial-connected Mediatek-based GNSS receivers.
These devices typically boot transmitting vendor specific NMEA output sequences. The serial po
gnss: add driver for mediatek receivers
Add driver for serial-connected Mediatek-based GNSS receivers.
These devices typically boot transmitting vendor specific NMEA output sequences. The serial port bit rate is read from the device tree "current-speed".
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 mediatek 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 the timepulse-support is left unimplemented.
Signed-off-by: Loys Ollivier <lollivier@baylibre.com> [ johan: rename backup supply ] Signed-off-by: Johan Hovold <johan@kernel.org>
show more ...
|
8fafef42 | 24-Jan-2019 |
Andreas Kemnade <andreas@kemnade.info> |
gnss: sirf: add a separate supply for a lna
Devices might have a separate lna between antenna input of the gps chip and the antenna which might have a separate supply.
Signed-off-by: Andreas Kemnad
gnss: sirf: add a separate supply for a lna
Devices might have a separate lna between antenna input of the gps chip and the antenna which might have a separate supply.
Signed-off-by: Andreas Kemnade <andreas@kemnade.info> Signed-off-by: Johan Hovold <johan@kernel.org>
show more ...
|
ccd0e496 | 24-Jan-2019 |
Andreas Kemnade <andreas@kemnade.info> |
gnss: sirf: add support for configurations without wakeup signal
Some Wi2Wi devices do not have a wakeup output, so device state can only be indirectly detected by looking whether there is communica
gnss: sirf: add support for configurations without wakeup signal
Some Wi2Wi devices do not have a wakeup output, so device state can only be indirectly detected by looking whether there is communication over the serial lines. This approach requires a report cycle set to a value less than 2 seconds to be reliable.
Signed-off-by: Andreas Kemnade <andreas@kemnade.info> [ johan: simplify sirf_set_active(), style changes ] Signed-off-by: Johan Hovold <johan@kernel.org>
show more ...
|
196d9184 | 24-Jan-2019 |
Andreas Kemnade <andreas@kemnade.info> |
gnss: sirf: write data to gnss only when the gnss device is open
The api forbids writing data there otherwise. Prepare for the serdev_open()/close() being a part of sirf_set_active.
Signed-off-by:
gnss: sirf: write data to gnss only when the gnss device is open
The api forbids writing data there otherwise. Prepare for the serdev_open()/close() being a part of sirf_set_active.
Signed-off-by: Andreas Kemnade <andreas@kemnade.info> Signed-off-by: Johan Hovold <johan@kernel.org>
show more ...
|
4ceda5f6 | 22-Jan-2019 |
Johan Hovold <johan@kernel.org> |
gnss: sirf: force hibernate mode on probe
Make sure to put the receiver in hibernate mode in case it is already active during probe in order to avoid wasting power until first open or suspend.
This
gnss: sirf: force hibernate mode on probe
Make sure to put the receiver in hibernate mode in case it is already active during probe in order to avoid wasting power until first open or suspend.
This can happen, for example, after a reset or non-clean shutdown, and possibly also due to glitches during power-on.
Reported-by: Andreas Kemnade <andreas@kemnade.info> Signed-off-by: Johan Hovold <johan@kernel.org>
show more ...
|
1decef37 | 14-Nov-2018 |
Johan Hovold <johan@kernel.org> |
gnss: sirf: fix synchronous write timeout
Passing a timeout of zero to the synchronous serdev_device_write() helper does currently not imply to wait forever (unlike passing zero to serdev_device_wai
gnss: sirf: fix synchronous write timeout
Passing a timeout of zero to the synchronous serdev_device_write() helper does currently not imply to wait forever (unlike passing zero to serdev_device_wait_until_sent()). Instead, if there's insufficient room in the write buffer, we'd end up with an incomplete write.
Fixes: d2efbbd18b1e ("gnss: add driver for sirfstar-based receivers") Cc: stable <stable@vger.kernel.org> # 4.19 Signed-off-by: Johan Hovold <johan@kernel.org>
show more ...
|