msm: camera: common: Partial Camera Support
This change creates a sysfs entry(subparts_info) which has info about number of IFEs, IFE-LITEs, SFEs & CUSTOM, whose values are populated in their respective drivers. Also, validates whether a particular IFE, SFE and CUSTOM is supported or not. Based on this, probe of IFE, SFE and CUSTOM drivers will happen accordingly. CRs-Fixed: 3482745 Change-Id: Iff6e79a7793b14b1f368f215020617f10dbd4bb5 Signed-off-by: Karthik Dillibabu <quic_kard@quicinc.com>
这个提交包含在:

提交者
Camera Software Integration

父节点
0aa784b1d9
当前提交
f910aa0b4f
@@ -10,6 +10,7 @@
|
||||
#include <linux/slab.h>
|
||||
|
||||
#include <soc/qcom/rpmh.h>
|
||||
#include <soc/qcom/socinfo.h>
|
||||
|
||||
#include "cam_compat.h"
|
||||
#include "cam_debug_util.h"
|
||||
@@ -819,3 +820,33 @@ bool cam_secure_get_vfe_fd_port_config(void)
|
||||
#endif
|
||||
}
|
||||
|
||||
#if KERNEL_VERSION(5, 10, 0) <= LINUX_VERSION_CODE
|
||||
int cam_get_subpart_info(uint32_t *part_info, uint32_t max_num_cam)
|
||||
{
|
||||
int rc = 0;
|
||||
int num_cam;
|
||||
|
||||
num_cam = socinfo_get_part_count(PART_CAMERA);
|
||||
if (num_cam != max_num_cam) {
|
||||
CAM_ERR(CAM_CPAS, "Unsupported number of parts: %d", num_cam);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/*
|
||||
* If bit value in part_info is "0" then HW is available.
|
||||
* If bit value in part_info is "1" then HW is unavailable.
|
||||
*/
|
||||
rc = socinfo_get_subpart_info(PART_CAMERA, part_info, num_cam);
|
||||
if (rc) {
|
||||
CAM_ERR(CAM_CPAS, "Failed while getting subpart_info, rc = %d.", rc);
|
||||
return rc;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
int cam_get_subpart_info(uint32_t *part_info, uint32_t max_num_cam)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
在新工单中引用
屏蔽一个用户