summaryrefslogtreecommitdiffstats
path: root/drivers/gnss/serial.c
Commit message (Collapse)AuthorAgeFilesLines
* gnss: drop stray semicolonsJohan Hovold2021-11-151-1/+1
| | | | | | | Drop semicolons after function definitions that have managed to sneak in and get reproduced. Signed-off-by: Johan Hovold <johan@kernel.org>
* serdev: make synchronous write return bytes writtenJohan Hovold2018-11-271-1/+1
| | | | | | | | | | | | | | | Make the synchronous serdev_device_write() helper behave analogous to the asynchronous serdev_device_write_buf() by returning the number of bytes written (or rather buffered) also on timeout. This will allow drivers to distinguish the case where data was partially written from the case where no data was written. Also update the only two users that checked the return value. Signed-off-by: Johan Hovold <johan@kernel.org> Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* gnss: serial: fix synchronous write timeoutJohan Hovold2018-11-141-1/+2
| | | | | | | | | | | 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: 37768b054f20 ("gnss: add generic serial driver") Cc: stable <stable@vger.kernel.org> # 4.19 Signed-off-by: Johan Hovold <johan@kernel.org>
* gnss: add generic serial driverJohan Hovold2018-06-281-0/+275
Add a generic serial GNSS driver (library) which provides a common implementation for the gnss interface and power management (runtime and system suspend). This allows GNSS drivers for specific chip to be implemented by simply providing a set_power() callback to handle three states: ACTIVE, STANDBY and OFF. Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>