From a3565ae7c6046cafc0fd1361a711c1f8468d0eec Mon Sep 17 00:00:00 2001 From: Aaron Durbin Date: Thu, 14 May 2015 14:46:59 -0500 Subject: spi_flash: document expected return values The spi_flash API did not have any of its callbacks documented. Do that so that people don't have to go into the guts of an implementation to figure out the proper expectations. Change-Id: I55a0515445cab3697813d88373ee413f30b557b5 Signed-off-by: Aaron Durbin Reviewed-on: http://review.coreboot.org/10206 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel Reviewed-by: Stefan Reinauer --- src/include/spi_flash.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/include') diff --git a/src/include/spi_flash.h b/src/include/spi_flash.h index 3865a53dcc..19df269cb0 100644 --- a/src/include/spi_flash.h +++ b/src/include/spi_flash.h @@ -42,6 +42,7 @@ struct spi_flash { u8 status_cmd; + /* All callbacks return 0 on success and != 0 on error. */ int (*read)(struct spi_flash *flash, u32 offset, size_t len, void *buf); int (*write)(struct spi_flash *flash, u32 offset, -- cgit v1.2.3