include: zephyr: nvmem: Add retval doxygen to read/write functions
Document the return values for the read/write NVMEM functions.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
diff --git a/include/zephyr/nvmem.h b/include/zephyr/nvmem.h
index ae422bc..1e7774e 100644
--- a/include/zephyr/nvmem.h
+++ b/include/zephyr/nvmem.h
@@ -316,7 +316,9 @@
*
* @kconfig_dep{CONFIG_NVMEM}
*
- * @return 0 on success, negative errno code on failure.
+ * @retval -EINVAL Invalid offset or length arguments.
+ * @retval -ENXIO No runtime device API available.
+ * @return the result of the underlying device API call.
*/
int nvmem_cell_read(const struct nvmem_cell *cell, void *data, off_t off, size_t len);
@@ -330,7 +332,10 @@
*
* @kconfig_dep{CONFIG_NVMEM}
*
- * @return 0 on success, negative errno code on failure.
+ * @retval -EINVAL Invalid offset or length arguments.
+ * @retval -EROFS Writing to a read-only NVMEM Cell.
+ * @retval -ENXIO No runtime device API available.
+ * @return the result of the underlying device API call.
*/
int nvmem_cell_write(const struct nvmem_cell *cell, const void *data, off_t off, size_t len);