diff --git a/boards/arm/cxd56xx/spresense/include/cxd56_isx012.h b/boards/arm/cxd56xx/spresense/include/cxd56_isx012.h index 639bf9842ad..f11da1b1fb1 100644 --- a/boards/arm/cxd56xx/spresense/include/cxd56_isx012.h +++ b/boards/arm/cxd56xx/spresense/include/cxd56_isx012.h @@ -41,6 +41,8 @@ ****************************************************************************/ #include +#include +#include /**************************************************************************** * Public Types diff --git a/boards/arm/cxd56xx/spresense/src/cxd56_bringup.c b/boards/arm/cxd56xx/spresense/src/cxd56_bringup.c index 3d9e9105e5b..a7b94eb4fad 100644 --- a/boards/arm/cxd56xx/spresense/src/cxd56_bringup.c +++ b/boards/arm/cxd56xx/spresense/src/cxd56_bringup.c @@ -47,6 +47,7 @@ #include #include +#include #include #ifdef CONFIG_RNDIS @@ -326,6 +327,21 @@ int cxd56_bringup(void) } #endif +#ifdef CONFIG_VIDEO_ISX012 + ret = board_isx012_initialize(IMAGER_I2C); + if (ret < 0) + { + _err("ERROR: Failed to initialize ISX012 board. %d\n", errno); + } + + g_video_devops = isx012_initialize(); + if (g_video_devops == NULL) + { + _err("ERROR: Failed to populate ISX012 devops. %d\n", errno); + ret = ERROR; + } +#endif /* CONFIG_VIDEO_ISX012 */ + /* In order to prevent Hi-Z from being input to the SD Card controller, * Initialize SDIO pins to GPIO low output with internal pull-down. */ diff --git a/drivers/video/video.c b/drivers/video/video.c index f8e1845b39f..228e1d44d94 100644 --- a/drivers/video/video.c +++ b/drivers/video/video.c @@ -236,8 +236,6 @@ static const struct file_operations g_video_fops = 0 /* unlink */ }; -static FAR const struct video_devops_s *g_video_devops; - static bool is_initialized = false; /**************************************************************************** diff --git a/include/nuttx/video/video.h b/include/nuttx/video/video.h index 2123112c4ae..006699e00b9 100644 --- a/include/nuttx/video/video.h +++ b/include/nuttx/video/video.h @@ -618,6 +618,8 @@ struct v4l2_ext_controls struct v4l2_ext_control *controls; /* each control information */ }; +FAR const struct video_devops_s *g_video_devops; + /**************************************************************************** * Public Function Prototypes ****************************************************************************/