diff mbox series

[01/19] image: Add a prototype for fit_image_get_phase()

Message ID 20240829145802.1827952-2-sjg@chromium.org
State Changes Requested
Delegated to: Tom Rini
Headers show
Series vbe: Series part E | expand

Commit Message

Simon Glass Aug. 29, 2024, 2:57 p.m. UTC
This function exists but is not exported. Add a prototype so it can be
used elsewhere.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 include/image.h | 12 ++++++++++++
 1 file changed, 12 insertions(+)
diff mbox series

Patch

diff --git a/include/image.h b/include/image.h
index dd4042d1bd9..dbf8d0e7ba9 100644
--- a/include/image.h
+++ b/include/image.h
@@ -1183,6 +1183,18 @@  int fit_image_get_data_size_unciphered(const void *fit, int noffset,
 int fit_image_get_data_and_size(const void *fit, int noffset,
 				const void **data, size_t *size);
 
+/**
+ * fit_image_get_phase() - Get the phase from a FIT image
+ *
+ * @fit: FIT to read from
+ * @offset: offset node to read
+ * @phasep: Returns phase, if any
+ * Return: 0 if read OK and *phasep is value, -ENOENT if there was no phase
+ * property in the node, other -ve value on other error
+ */
+int fit_image_get_phase(const void *fit, int offset,
+			enum image_phase_t *phasep);
+
 /**
  * fit_get_data_node() - Get verified image data for an image
  * @fit: Pointer to the FIT format image header