expo: Add a function to prepare a cedit

Split out the code which prepares the cedit for use, so we can call it
from a test.

Add a log category while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2023-08-14 16:40:27 -06:00
committed by Tom Rini
parent f80ebb2fe1
commit 8d0f890a0b
2 changed files with 41 additions and 6 deletions

View File

@@ -8,6 +8,7 @@
#define __CEDIT_H
struct expo;
struct scene;
struct video_priv;
/**
@@ -30,4 +31,18 @@ int cedit_arange(struct expo *exp, struct video_priv *vid_priv, uint scene_id);
*/
int cedit_run(struct expo *exp);
/**
* cedit_prepare() - Prepare to run a cedit
*
* Set up the video device, select the first scene and highlight the first item.
* This ensures that all menus have a selected item.
*
* @exp: Expo to use
* @vid_privp: Set to private data for the video device
* @scnp: Set to the first scene
* Return: scene ID of first scene if OK, -ve on error
*/
int cedit_prepare(struct expo *exp, struct video_priv **vid_privp,
struct scene **scnp);
#endif /* __CEDIT_H */