From 2e2e6d8cacbc80f2da0ce8f1afca5ed24020b331 Mon Sep 17 00:00:00 2001 From: Patrick Delaunay Date: Mon, 15 Nov 2021 16:32:20 +0100 Subject: video: Add video_is_active function Add the helper function video_is_active() to test if one video device is active. This function can be used in board code to execute operation only when the display is probed / really used. Signed-off-by: Patrick Delaunay Reviewed-by: Patrice Chotard --- include/video.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include') diff --git a/include/video.h b/include/video.h index f14fb15f84f..5ac1387a395 100644 --- a/include/video.h +++ b/include/video.h @@ -276,6 +276,13 @@ static inline int video_sync_copy_all(struct udevice *dev) #endif +/** + * video_is_active() - Test if one video device it active + * + * @return true if at least one video device is active, else false. + */ +bool video_is_active(void); + #ifndef CONFIG_DM_VIDEO /* Video functions */ -- cgit v1.2.3