static struct atomisp_camera_caps *m10mo_get_camera_caps(void) { m10mo_camera_caps.sensor_num = 1; m10mo_camera_caps.sensor[0].stream_num = 2; if (m10mo_platform_identify_fw() == M10MO_FW_TYPE_2) { m10mo_camera_caps.sensor_num = 2; m10mo_camera_caps.sensor[1].stream_num = 2; } return &m10mo_camera_caps; }
void __init camera_init_device(void) { struct camera_device_table *table = NULL; int entry_num = 0; #ifndef CONFIG_VIDEO_PIXTER if (INTEL_MID_BOARD(1, TABLET, BYT)) { if (spid.hardware_id == BYT_TABLET_BLK_8PR0 || spid.hardware_id == BYT_TABLET_BLK_8PR1) { table = byt_ffrd8_cam_table; entry_num = ARRAY_SIZE(byt_ffrd8_cam_table); } else if (spid.hardware_id == BYT_TABLET_BLK_CRV2) { table = byt_crv2_cam_table; entry_num = ARRAY_SIZE(byt_crv2_cam_table); } else { table = byt_ffrd10_cam_table; entry_num = ARRAY_SIZE(byt_ffrd10_cam_table); } } else if (INTEL_MID_BOARD(1, TABLET, CHT) || INTEL_MID_BOARD(1, PHONE, CHT)) { int fw_type = m10mo_platform_identify_fw(); if (fw_type != -1) { table = cht_somc_cam_table; entry_num = ARRAY_SIZE(cht_somc_cam_table); pr_info("M10MO for SOMC is detected.\n"); } else { if (spid.hardware_id == CHT_TABLET_RVP1 || spid.hardware_id == CHT_TABLET_RVP2 || spid.hardware_id == CHT_TABLET_RVP3 || spid.hardware_id == CHT_TABLET_FRD_PR0 || spid.hardware_id == CHT_TABLET_FRD_PR1 || spid.hardware_id == CHT_TABLET_FRD_PR2) { table = cht_ffd_cam_table; entry_num = ARRAY_SIZE(cht_ffd_cam_table); } else pr_warn("unknown CHT platform variant.\n"); } } #else table = pixter_cam_table; entry_num = ARRAY_SIZE(pixter_cam_table); #endif atomisp_register_device_table(entry_num, table); }