From 5473a51342dcf5094705723b3978d9dfa6563d6e Mon Sep 17 00:00:00 2001 From: SPRESENSE <41312067+SPRESENSE@users.noreply.github.com> Date: Mon, 20 May 2024 12:25:29 +0900 Subject: [PATCH] boards: cxd56xx: Fix read position in cxd5610 gnss driver Add process to reset read position after read is complete to fix NMEA output with DC report. --- boards/arm/cxd56xx/drivers/sensors/cxd5610_gnss.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/boards/arm/cxd56xx/drivers/sensors/cxd5610_gnss.c b/boards/arm/cxd56xx/drivers/sensors/cxd5610_gnss.c index d75c3fd770948..2b0dabcddf92d 100644 --- a/boards/arm/cxd56xx/drivers/sensors/cxd5610_gnss.c +++ b/boards/arm/cxd56xx/drivers/sensors/cxd5610_gnss.c @@ -1905,6 +1905,10 @@ static ssize_t cxd5610_gnss_read(struct file *filep, char *buffer, cxd5610_gnss_buffer_unlock(priv); + /* Reset read position after read is complete */ + + filep->f_pos = 0; + cxd5610_gnss_device_unlock(priv); return len; }