aboutsummaryrefslogtreecommitdiff
path: root/include/cedit.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2023-08-14 16:40:33 -0600
committerTom Rini <trini@konsulko.com>2023-08-25 13:54:33 -0400
commit2dee81fe5f4a6427ba48fe17ff017930ddf3b4e4 (patch)
tree5c5b7430be7aebda1bef1dfec42dfea806ee48e8 /include/cedit.h
parent6e648fa781eea9ae0c5e130217ffeabbd45d9385 (diff)
downloadu-boot-2dee81fe5f4a6427ba48fe17ff017930ddf3b4e4.zip
u-boot-2dee81fe5f4a6427ba48fe17ff017930ddf3b4e4.tar.gz
u-boot-2dee81fe5f4a6427ba48fe17ff017930ddf3b4e4.tar.bz2
expo: cedit: Support writing settings to a file
Support writing settings from an expo into a file in FDT format. It consists of a single node with a two properties for each sceneitem, one with tag ID chosen by the user and another for its text value. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/cedit.h')
-rw-r--r--include/cedit.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/include/cedit.h b/include/cedit.h
index 851d8e8..6086e30 100644
--- a/include/cedit.h
+++ b/include/cedit.h
@@ -7,10 +7,21 @@
#ifndef __CEDIT_H
#define __CEDIT_H
+struct abuf;
struct expo;
struct scene;
struct video_priv;
+enum {
+ /* size increment for writing FDT */
+ CEDIT_SIZE_INC = 1024,
+};
+
+/* Name of the cedit node in the devicetree */
+#define CEDIT_NODE_NAME "cedit-values"
+
+extern struct expo *cur_exp;
+
/**
* cedit_arange() - Arrange objects in a configuration-editor scene
*
@@ -45,4 +56,15 @@ int cedit_run(struct expo *exp);
int cedit_prepare(struct expo *exp, struct video_priv **vid_privp,
struct scene **scnp);
+/**
+ * cedit_write_settings() - Write settings in FDT format
+ *
+ * Sets up an FDT with the settings
+ *
+ * @exp: Expo to write settings from
+ * @buf: Returns abuf containing the settings FDT (inited by this function)
+ * Return: 0 if OK, -ve on error
+ */
+int cedit_write_settings(struct expo *exp, struct abuf *buf);
+
#endif /* __CEDIT_H */