Camera KMD ISP学习笔记(3)-component应用

 
KMD Camera ISP子系统入口接口及文件
驱动文件入口:drivers/camera_init.c
整个camera KMD驱动的入口接口:module_init(camera_init);
 
重要数据结构:
 struct camera_submodule_component {
         int (*init)(void);
         void (*exit)(void);
 };
 
  struct camera_submodule {
         char *name;                // 模块名称
         uint num_component;        // 组件个数,比如camera_base组件包括了camera sync、crm等模块
         const struct camera_submodule_component *component;    // 组件函数,包含init和exit函数
 };

 static const struct camera_submodule_component camera_base[] = {
         {&cam_req_mgr_init, &cam_req_mgr_exit},
         {&cam_sync_init, &cam_sync_exit},
         {&cam_smmu_init_module, &cam_smmu_exit_module},
         {&cam_cpas_dev_init_module, &cam_cpas_dev_exit_module},
         {&cam_cdm_intf_init_module, &cam_cdm_intf_exit_module},
         {&cam_hw_cdm_init_module, &cam_hw_cdm_exit_module},
 };

 static const struct camera_submodule submodule_table[] = {
         {
                 .name = "Camera BASE",
                 .num_component = ARRAY_SIZE(camera_base),
                 .component = camera_base,
         },
         {
                 .name = "Camera TFE",
                 .num_component = ARRAY_SIZE(camera_tfe),
                 .component = camera_tfe,
         },
         {
                 .name = "Camera ISP",
                 .num_component = ARRAY_SIZE(camera_isp),
                 .component = camera_isp,
         },
         {
                 .name = "Camera SENSOR",
                 .num_component = ARRAY_SIZE(camera_sensor),
                 .component = camera_sensor
         },
         {
                 .name = "Camera ICP",
                 .num_component = ARRAY_SIZE(camera_icp),
                 .component = camera_icp,
         },
         {
                 .name = "Camera OPE",
                 .num_component = ARRAY_SIZE(camera_ope),
                 .component = camera_ope,
         },
         {
                 .name = "Camera JPEG",
                 .num_component = ARRAY_SIZE(camera_jpeg),
                 .component = camera_jpeg,
         },
         {
                 .name = "Camera FD",
                 .num_component = ARRAY_SIZE(camera_fd),
                 .component = camera_fd,
         },
         {
                 .name = "Camera LRME",
                 .num_component = ARRAY_SIZE(camera_lrme),
                 .component = camera_lrme,
         },
         {
                 .name = "Camera CRE",
                 .num_component = ARRAY_SIZE(camera_cre),
                 .component = camera_cre,
         },
         {
                 .name = "Camera CUSTOM",
                 .num_component = ARRAY_SIZE(camera_custom),
                 .component = camera_custom,
         },
         {
                 .name = "Camera Presil",
                 .num_component = ARRAY_SIZE(camera_presil),
                 .component = camera_presil,
         }
 };

 

 
0
 
CRM为master设备:
0
 static struct platform_driver *const cam_component_platform_drivers[] = {
 /* BASE */
         &cam_sync_driver,
         &cam_smmu_driver,
         &cam_cpas_driver,
         &cam_cdm_intf_driver,
         &cam_hw_cdm_driver,
 #ifdef CONFIG_SPECTRA_TFE
         &cam_csid_ppi100_driver,
         &cam_tfe_driver,
         &cam_tfe_csid_driver,
 #endif
 #ifdef CONFIG_SPECTRA_ISP
         &cam_ife_csid_driver,
         &cam_ife_csid_lite_driver,
         &cam_vfe_driver,
         &cam_sfe_driver,
         &isp_driver,
... ...
};

 

cam_sync为component设备:
0
 
 
CRM为master设备,cam_sync、cam_smmu等设备均为component设备
0
 
 
 
 
posted @ 2024-04-06 01:35  lethe1203  阅读(82)  评论(0编辑  收藏  举报