From 8bc61e2b518b4efc88ccceb21b621ef60d3094fc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Krzysztof=20Chru=C5=9Bci=C5=84ski?=
 <krzysztof.chruscinski@nordicsemi.no>
Date: Fri, 19 Jan 2024 09:22:39 +0100
Subject: [PATCH] drivers: spi: Add missing retval to spi_read calls
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

spi_transceive returns number of received frames for slave mode.
This information was missing for spi_read type of functions.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
---
 include/zephyr/drivers/spi.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/zephyr/drivers/spi.h b/include/zephyr/drivers/spi.h
index 44863f49acd1..7042c73be0a6 100644
--- a/include/zephyr/drivers/spi.h
+++ b/include/zephyr/drivers/spi.h
@@ -799,6 +799,7 @@ static inline int spi_transceive_dt(const struct spi_dt_spec *spec,
  *        previous operations.
  * @param rx_bufs Buffer array where data to be read will be written to.
  *
+ * @retval frames Positive number of frames received in slave mode.
  * @retval 0 If successful.
  * @retval -errno Negative errno code on failure.
  */
@@ -987,6 +988,7 @@ __deprecated static inline int spi_transceive_async(const struct device *dev,
  *        notify the end of the transaction, and whether it went
  *        successfully or not).
  *
+ * @retval frames Positive number of frames received in slave mode.
  * @retval 0 If successful
  * @retval -errno Negative errno code on failure.
  */