粗略的梳理了一下MTK平台的camera的启动流程。仅作为个人笔记,排版比较乱,读者请见谅。
首先介绍了启动流程,后面贴了分析的代码,最后是加了注释的kenrellog
部分代码如下:
c2390mipi_Sensor.c : 设备驱动层
kd_camera_hw.c : 负责上电
kd_sensorlist.c : 核心层
整理开机 camera相关的log可以知道开机过程中主要的的一些操作:
1
调用 CAMERA_HW_i2C_init()
2
注册平台设备 g_stCAMERA_HW_Driver 和 g_stCAMERA_HW_Driver2,并且匹配成功,调用CAMERA_HW_probe,在里面注册 i2c_add_driver(&CAMERA_HW_i2c_driver)
3
I2C设备匹配OK 调用 CAMERA_HW_i2c_probe(),在里面 注册字符设备
i4RetValue = RegisterCAMERA_HWCharDrv();
最后给 注册好的主摄像头字符设备 0666的权限 : sys_chmod("/dev/kd_camera_hw", (umode_t)(0666));
4 电源管理相关
5 直接调用模块驱动的 C2390MIPISensorInit(), 将核心层 SENSOR_FUNCTION_STRUCT指针 指向 驱动层 SENSOR_FUNCTION_STRUCT,绑定核心层与驱动层的 SENSOR_FUNCTION_STRUCT
6 通过内存映射访问外设获取硬件版本,从log可以知道 0x321
7 上层传递 “KDIMGSENSORIOC_X_SET_DRIVER” IOCTL 调用 kdSetDriver()
7.1
根据传递下来的参数 解析参数,该参数代表 摄像头在全局数组中的序列号,根据该序列号,可以找到目标摄像头,以及是主摄还是副摄像头,并且绑定核心层和设备层的操作集合。
7.2
调用 kdCISModulePowerOn() 进行 统一上电 , 下电
VCAMA DVDD 数字供电,主要给 ISP 供电 主要给 ISP 供电
VCAMIO VDDIO 数字 IO 电源 主要给 I2C 部分供电
VCAMD AVDD 模拟供电 主要给感光区和 ADC 部分供电
根据名称进行摄像头复位
*/
7.3
/*如此反复遍历 ACDK_KD_SENSOR_INIT_FUNCTION_STRUCT kdSensorList[MAX_NUM_OF_SUPPORT_SENSOR+1]数组中的摄像头:
pinSetIdx:0 , currSensorName: gm7150_yuv
pinSetIdx:0 , currSensorName: c2390mipiraw
pinSetIdx:0 , currSensorName: ps5250mipiraw
pinSetIdx:0 , currSensorName: gc2023mipiraw
*/
7.4
/*最后确定 gc2023mipiraw 然后不断的发送一些 IOCTL */
c2390mipi_Sensor.c
......
UINT32 C2390MIPISensorInit(PSENSOR_FUNCTION_STRUCT *pfFunc)
{
printk("[lj c2390]func= %s \n",__func__);
/* To Do : Check Sensor status here */
if (pfFunc!=NULL)
*pfFunc=&sensor_func;
return ERROR_NONE;
} /* C2390_MIPI_RAW_SensorInit */
kd_camera_hw.c
/*
CAMERA_DUAL_CAMERA_SENSOR_ENUM 类型的枚举数组 g_invokeSocketIdx ,两个成员,用于表示是 main sensor 还是 sub sensor
g_invokeSensorNameStr 保存所支持的 sensor 名称。在 kdSetDriver()中设置
true/false : on/off
#define CAMERA_HW_DRVNAME1 "kd_camera_hw"
*/
int kdCISModulePowerOn(CAMERA_DUAL_CAMERA_SENSOR_ENUM SensorIdx, char *currSensorName, bool On, char *mode_name)
{
u32 pinSetIdx = 0;/* default main sensor */
#define IDX_PS_CMRST 0
#define IDX_PS_CMPDN 4
#define IDX_PS_MODE 1
#define IDX_PS_ON 2
#define IDX_PS_OFF 3
#define VOL_2800 2800000
#define VOL_1800 1800000
#define VOL_1500 1500000
#define VOL_1200 1200000
#define VOL_1000 1000000
u32 pinSet[3][8] = {
/* for main sensor */
{/* The reset pin of main sensor uses GPIO10 of mt6306, please call mt6306 API to set */
CAMERA_CMRST_PIN,
CAMERA_CMRST_PIN_M_GPIO, /* mode */
GPIO_OUT_ONE, /* ON state */
GPIO_OUT_ZERO, /* OFF state */
CAMERA_CMPDN_PIN,
CAMERA_CMPDN_PIN_M_GPIO,
GPIO_OUT_ONE,
GPIO_OUT_ZERO,
},
/* for sub sensor */
{
CAMERA_CMRST1_PIN,
CAMERA_CMRST1_PIN_M_GPIO,
GPIO_OUT_ONE,
GPIO_OUT_ZERO,
CAMERA_CMPDN1_PIN,
CAMERA_CMPDN1_PIN_M_GPIO,
GPIO_OUT_ONE,
GPIO_OUT_ZERO,
},
/* for main_2 sensor */
{
GPIO_CAMERA_INVALID,
GPIO_CAMERA_INVALID, /* mode */
GPIO_OUT_ONE, /* ON state */
GPIO_OUT_ZERO, /* OFF state */
GPIO_CAMERA_INVALID,
GPIO_CAMERA_INVALID,
GPIO_OUT_ONE,
GPIO_OUT_ZERO,
}
};
//确认匹配的是 main 还是sub
if (DUAL_CAMERA_MAIN_SENSOR == SensorIdx)//main sensor
pinSetIdx = 0;
else if (DUAL_CAMERA_SUB_SENSOR == SensorIdx)//sub sensor
pinSetIdx = 1;
else if (DUAL_CAMERA_MAIN_2_SENSOR == SensorIdx)
pinSetIdx = 2;
/*
ISP_MCLK1_EN(1) :开 MCLK
ISP_MCLK1_EN(0) :关 MCLK
*/
if (On) {
/* 遍历了如下设备
[PowerON]pinSetIdx:0, currSensorName: gm7150_yuv
[PowerON]pinSetIdx:0, currSensorName: c2390mipiraw
[PowerON]pinSetIdx:0, currSensorName: ps5250mipiraw
[PowerON]pinSetIdx:0, currSensorName: gc2023mipiraw
*/
PK_DBG("[PowerON]pinSetIdx:%d, currSensorName: %s\n", pinSetIdx, currSensorName);
ISP_MCLK1_EN(1);//开 MCLK
/*********************************************************************/
GpioPowerCount++;
PK_DBG("kdCISModulePowerOn GpioPowerCount %d \n",GpioPowerCount);
#if 1 //统一进行上电
if(GpioPowerCount<=1){
camera_set_gpio_output(GPIO_MAIN_CAMERA_LDO_3V3, GPIO_OUT_ONE);
mdelay(10);
//VCAMA DVDD 数字供电,主要给 ISP 供电 主要给 ISP 供电
if(TRUE != _hwPowerOn(VCAMA, VOL_2800))
{
PK_DBG("[CAMERA SENSOR] Fail to enable analog power (VCAM_A), power id = %d\n", VCAMA);
goto _kdCISModulePowerOn_exit_;
}
mdelay(10);
//VCAMIO VDDIO 数字 IO 电源 主要给 I2C 部分供电
if(TRUE != _hwPowerOn(VCAMIO, VOL_1800))
{
PK_DBG("[CAMERA SENSOR] Fail to enable digital power (VCAM_IO), power id = %d \n", VCAMIO);
goto _kdCISModulePowerOn_exit_;
}
mdelay(10);
//VCAMD AVDD 模拟供电 主要给感光区和 ADC 部分供电
if(TRUE != _hwPowerOn(VCAMD, VOL_1200))
{
PK_DBG("[CAMERA SENSOR] Fail to enable digital power (VCAM_D), power id = %d \n", VCAMD);
goto _kdCISModulePowerOn_exit_;
}
mdelay(10);
camera_set_gpio_output(GPIO_SUB_CAMERA_LDO_3V3, GPIO_OUT_ONE);
}
#endif
/************************根据名称进行复位*********************************************/
if (pinSetIdx == 0 && currSensorName && (0 == strcmp(currSensorName, SENSOR_DRVNAME_C2390_MIPI_RAW))) {
// disable main sensor
if (GPIO_CAMERA_INVALID != pinSet[pinSetIdx][IDX_PS_CMRST]) {
// main or sub 复位脚标记为1
mtkcam_gpio_set(pinSetIdx, CAMRST, pinSet[pinSetIdx][IDX_PS_CMRST + IDX_PS_OFF]);
}
mdelay(10);
//enable main sensor
if (GPIO_CAMERA_INVALID != pinSet[pinSetIdx][IDX_PS_CMRST]) {
mtkcam_gpio_set(pinSetIdx, CAMRST, pinSet[pinSetIdx][IDX_PS_CMRST + IDX_PS_ON]);
}
mdelay(20);
}
else if (pinSetIdx == 0 && currSensorName && (0 == strcmp(currSensorName, SENSOR_DRVNAME_GC2023_MIPI_RAW))) {
// disable main sensor
if (GPIO_CAMERA_INVALID != pinSet[pinSetIdx][IDX_PS_CMPDN]) {
mtkcam_gpio_set(pinSetIdx, CAMPDN, pinSet[pinSetIdx][IDX_PS_CMPDN + IDX_PS_ON]);
}
if (GPIO_CAMERA_INVALID != pinSet[pinSetIdx][IDX_PS_CMRST]) {
mtkcam_gpio_set(pinSetIdx, CAMRST, pinSet[pinSetIdx][IDX_PS_CMRST + IDX_PS_OFF]);
}
mdelay(20);
//enable main sensor
if (GPIO_CAMERA_INVALID != pinSet[pinSetIdx][IDX_PS_CMPDN]) {
mtkcam_gpio_set(pinSetIdx, CAMPDN, pinSet[pinSetIdx][IDX_PS_CMPDN + IDX_PS_OFF]);
}
if (GPIO_CAMERA_INVALID != pinSet[pinSetIdx][IDX_PS_CMRST]) {
mtkcam_gpio_set(pinSetIdx, CAMRST, pinSet[pinSetIdx][IDX_PS_CMRST + IDX_PS_ON]);
}
mdelay(20);
}
} else { /* power OFF */
/*
[PowerOFF]pinSetIdx:0 , currSensorName: gm7150_yuv
[PowerOFF]pinSetIdx:0 , currSensorName: c2390mipiraw
[PowerOFF]pinSetIdx:0 , currSensorName: ps5250mipiraw
[PowerOFF]pinSetIdx:0 , currSensorName: gc2023mipiraw
*/
PK_DBG("[PowerOFF]pinSetIdx:%d , currSensorName: %s\n", pinSetIdx, currSensorName);
ISP_MCLK1_EN(0);
/*复位*/
if (pinSetIdx == 0 && currSensorName && (0 == strcmp(currSensorName, SENSOR_DRVNAME_C2390_MIPI_RAW))){
if (GPIO_CAMERA_INVALID != pinSet[pinSetIdx][IDX_PS_CMRST]) {
mtkcam_gpio_set(pinSetIdx, CAMRST, pinSet[pinSetIdx][IDX_PS_CMRST + IDX_PS_OFF]);
}
}
else if (pinSetIdx == 0 && currSensorName && (0 == strcmp(currSensorName, SENSOR_DRVNAME_GC2023_MIPI_RAW))){
if (GPIO_CAMERA_INVALID != pinSet[pinSetIdx][IDX_PS_CMRST]) {
mtkcam_gpio_set(pinSetIdx, CAMRST, pinSet[pinSetIdx][IDX_PS_CMRST + IDX_PS_OFF]);
}
if (GPIO_CAMERA_INVALID != pinSet[pinSetIdx][IDX_PS_CMPDN]) {
mtkcam_gpio_set(pinSetIdx, CAMPDN, pinSet[pinSetIdx][IDX_PS_CMPDN + IDX_PS_ON]);
}
}
#if 1 //统一下电
GpioPowerCount--;
//xc6130 gm7150 power off same time
PK_DBG("kdCISModulePowerOff GpioPowerCount %d \n",GpioPowerCount);
if(GpioPowerCount == 0){
camera_set_gpio_output(GPIO_MAIN_CAMERA_LDO_3V3, GPIO_OUT_ZERO);
//VCAMD
if(TRUE != _hwPowerDown(VCAMD))
{
PK_DBG("[CAMERA SENSOR] Fail to OFF core power (VCAM_D), power id = %d \n",VCAMD);
goto _kdCISModulePowerOn_exit_;
}
//VCAMA
if(TRUE != _hwPowerDown(VCAMA)) {
PK_DBG("[CAMERA SENSOR] Fail to OFF analog power (VCAM_A), power id= (%d) \n", VCAMA);
goto _kdCISModulePowerOn_exit_;
}
//VCAMIO
if(TRUE != _hwPowerDown(VCAMIO)) {
PK_DBG("[CAMERA SENSOR] Fail to OFF digital power (VCAM_IO), power id = %d \n", VCAMIO);
goto _kdCISModulePowerOn_exit_;
}
camera_set_gpio_output(GPIO_SUB_CAMERA_LDO_3V3, GPIO_OUT_ZERO);
}
}
return 0;
_kdCISModulePowerOn_exit_:
return -EIO;
}
kd_sensorlist.c
#include "kd_sensorlist.h"//摄像头模块头文件 供核心曾直接调用 C2390MIPISensorInit()
char mtk_ccm_name[camera_info_size] = {0};
static unsigned int gDrvIndex = 0;
#ifndef SUPPORT_I2C_BUS_NUM1
#define SUPPORT_I2C_BUS_NUM1 0
#endif
#ifndef SUPPORT_I2C_BUS_NUM2
#define SUPPORT_I2C_BUS_NUM2 2
#endif
/*
主副摄像头 字符设备名称
*/
#define CAMERA_HW_DRVNAME1 "kd_camera_hw"
#define CAMERA_HW_DRVNAME2 "kd_camera_hw_bus2"
#if 1
struct pinctrl *cmctrl = NULL;
struct pinctrl_state *cmhsync = NULL;
struct pinctrl_state *cmvsync = NULL;
struct pinctrl_state *cmdata9 = NULL;
struct pinctrl_state *cmdata8 = NULL;
struct pinctrl_state *cmdata7 = NULL;
struct pinctrl_state *cmdata6 = NULL;
struct pinctrl_state *cmdata5 = NULL;
struct pinctrl_state *cmdata4 = NULL;
struct pinctrl_state *cmdata3 = NULL;
struct pinctrl_state *cmdata2 = NULL;
struct pinctrl_state *cmclk = NULL;
/*
没有找到对应脚
*/
static int gm7150_gpio_init(struct platform_device *pdev)
{
int ret = 0;
//获取设备(设备模型中的struct device)的pin control state holder(struct pinctrl)
cmctrl = devm_pinctrl_get(&pdev->dev);
if (IS_ERR(cmctrl)) {
pr_err("Cannot find gm7150 pinctrl!");
ret = PTR_ERR(cmctrl);
}
//根据state name在pin control state holder找到对应的pin control sta
cmhsync = pinctrl_lookup_state(cmctrl, "cmhsync");
if (IS_ERR(cmhsync)) {
ret = PTR_ERR(cmhsync);
pr_err("%s : pinctrl err, cmhsync\n", __func__);
}
cmvsync = pinctrl_lookup_state(cmctrl, "cmvsync");
if (IS_ERR(cmvsync)) {
ret = PTR_ERR(cmvsync);
pr_err("%s : pinctrl err, cmvsync\n", __func__);
}
cmdata9 = pinctrl_lookup_state(cmctrl, "cmdata9");
if (IS_ERR(cmdata9)) {
ret = PTR_ERR(cmdata9);
pr_err("%s : pinctrl err, cmdata9\n", __func__);
}
cmdata8 = pinctrl_lookup_state(cmctrl, "cmdata8");
if (IS_ERR(cmdata8)) {
ret = PTR_ERR(cmdata8);
pr_err("%s : pinctrl err, cmdata8\n", __func__);
}
/*Cam1 Power/Rst Ping initialization*/
cmdata7 = pinctrl_lookup_state(cmctrl, "cmdata7");
if (IS_ERR(cmdata7)) {
ret = PTR_ERR(cmdata7);
pr_err("%s : pinctrl err, cmdata7\n", __func__);
}
cmdata6 = pinctrl_lookup_state(cmctrl, "cmdata6");
if (IS_ERR(cmdata6 )) {
ret = PTR_ERR(cmdata6 );
pr_err("%s : pinctrl err, cmdata6\n", __func__);
}
cmdata5 = pinctrl_lookup_state(cmctrl, "cmdata5");
if (IS_ERR(cmdata5)) {
ret = PTR_ERR(cmdata5);
pr_err("%s : pinctrl err, cmdata5\n", __func__);
}
cmdata4 = pinctrl_lookup_state(cmctrl, "cmdata4");
if (IS_ERR(cmdata4)) {
ret = PTR_ERR(cmdata4);
pr_err("%s : pinctrl err, cmdata4\n", __func__);
}
/*externel LDO enable */
cmdata3 = pinctrl_lookup_state(cmctrl, "cmdata3");
if (IS_ERR(cmdata3)) {
ret = PTR_ERR(cmdata3);
pr_err("%s : pinctrl err, cmdata3\n", __func__);
}
cmdata2 = pinctrl_lookup_state(cmctrl, "cmdata2");
if (IS_ERR(cmdata2)) {
ret = PTR_ERR(cmdata2);
pr_err("%s : pinctrl err, cmdata2\n", __func__);
}
cmclk = pinctrl_lookup_state(cmctrl, "cmclk");
if (IS_ERR(cmclk)) {
ret = PTR_ERR(cmclk);
pr_err("%s : pinctrl err, cmclk\n", __func__);
}
return ret;
}
/*
没有找到 返回
*/
static void gm7150cam_gpio_set(void)
{
if(IS_ERR(cmctrl) || IS_ERR(cmhsync) || IS_ERR(cmvsync)
|| IS_ERR(cmdata9) || IS_ERR(cmdata8) || IS_ERR(cmdata7)
|| IS_ERR(cmdata6) || IS_ERR(cmdata5) || IS_ERR(cmdata4)
|| IS_ERR(cmdata3) || IS_ERR(cmdata2) || IS_ERR(cmclk) ){
pr_err("%s : pin pointer is not valid\n", __func__);
return;
}
pinctrl_select_state(cmctrl, cmhsync);
pinctrl_select_state(cmctrl, cmvsync);
pinctrl_select_state(cmctrl, cmdata9);
pinctrl_select_state(cmctrl, cmdata8);
pinctrl_select_state(cmctrl, cmdata7);
pinctrl_select_state(cmctrl, cmdata6);
pinctrl_select_state(cmctrl, cmdata5);
pinctrl_select_state(cmctrl, cmdata4);
pinctrl_select_state(cmctrl, cmdata3);
pinctrl_select_state(cmctrl, cmdata2);
pinctrl_select_state(cmctrl, cmclk);
}
#endif
//add end
static struct i2c_client *g_pstI2Cclient; //主摄像头 i2c_client
static struct i2c_client *g_pstI2Cclient2;//副摄像头 i2c_client
/*
标记摄像头数量 初始化为0
SUPPORT_I2C_BUS_NUM1 = 0
*/
static u32 gI2CBusNum = SUPPORT_I2C_BUS_NUM1;
static DEFINE_MUTEX(kdCam_Mutex);
static BOOL bSesnorVsyncFlag = FALSE;
static ACDK_KD_SENSOR_SYNC_STRUCT g_NewSensorExpGain = {128, 128, 128, 128, 1000, 640, 0xFF, 0xFF, 0xFF, 0};
//proc add!
static SENSOR_FUNCTION_STRUCT *gm7150_pfFunc;//摄像头功能结构体指针
static SENSOR_FUNCTION_STRUCT *imx135_pfFunc;
static int proc_flag = 0;
static MSDK_SENSOR_REG_INFO_STRUCT proc_tempSensor;
/*
定义 extern MULTI_SENSOR_FUNCTION_STRUCT2 kd_MultiSensorFunc
MULTI_SENSOR_FUNCTION_STRUCT2 kd_MultiSensorFunc = {
kd_MultiSensorOpen,
kd_MultiSensorGetInfo,
kd_MultiSensorGetResolution,
kd_MultiSensorFeatureControl,
kd_MultiSensorControl,
kd_MultiSensorClose
};
定义 static MULTI_SENSOR_FUNCTION_STRUCT2 *g_pSensorFunc 指针指向 kd_MultiSensorFunc
*/
extern MULTI_SENSOR_FUNCTION_STRUCT2 kd_MultiSensorFunc;
static MULTI_SENSOR_FUNCTION_STRUCT2 *g_pSensorFunc = &kd_MultiSensorFunc;
/*主副摄像头状态*/
BOOL g_bEnableDriver[KDIMGSENSOR_MAX_INVOKE_DRIVERS] = {FALSE, FALSE};
/* 核心层摄像头操作结构体指针数组 即主副摄像头操作结构提指针 */
SENSOR_FUNCTION_STRUCT *g_pInvokeSensorFunc[KDIMGSENSOR_MAX_INVOKE_DRIVERS] = {NULL, NULL};
/*
此处定一个 CAMERA_DUAL_CAMERA_SENSOR_ENUM 类型的枚举数组 g_invokeSocketIdx ,两个成员,分别初始化为 0 , 区分目前正在匹配的是 main 还是 sub
CAMERA_DUAL_CAMERA_SENSOR_ENUM 是一个枚举变量
#define KDIMGSENSOR_MAX_INVOKE_DRIVERS (2)
DUAL_CAMERA_NONE_SENSOR = 0
*/
CAMERA_DUAL_CAMERA_SENSOR_ENUM g_invokeSocketIdx[KDIMGSENSOR_MAX_INVOKE_DRIVERS] = {DUAL_CAMERA_NONE_SENSOR, DUAL_CAMERA_NONE_SENSOR};
char g_invokeSensorNameStr[KDIMGSENSOR_MAX_INVOKE_DRIVERS][32] = {KDIMGSENSOR_NOSENSOR, KDIMGSENSOR_NOSENSOR};
/* static int g_SensorExistStatus[3]={0,0,0}; */
static wait_queue_head_t kd_sensor_wait_queue;
bool setExpGainDoneFlag = 0;
static unsigned int g_CurrentSensorIdx;
static unsigned int g_IsSearchSensor;
/*******************************************************************************
* i2c relative start
* migrate new style i2c driver interfaces required by Kirby 20100827
********************************************************************************/
static const struct i2c_device_id CAMERA_HW_i2c_id[] = {{CAMERA_HW_DRVNAME1, 0}, {} };
static const struct i2c_device_id CAMERA_HW_i2c_id2[] = {{CAMERA_HW_DRVNAME2, 0}, {} };
UINT32 kdGetSensorInitFuncList(ACDK_KD_SENSOR_INIT_FUNCTION_STRUCT **ppSensorList)
{
if (NULL == ppSensorList) {
PK_ERR("[kdGetSensorInitFuncList]ERROR: NULL ppSensorList\n");
return 1;
}
*ppSensorList = &kdSensorList[0];
return 0;
} /* kdGetSensorInitFuncList() */
/* */
MUINT32 kd_MultiSensorOpen(void)
{
MUINT32 ret = ERROR_NONE;
MINT32 i = 0;
KD_MULTI_FUNCTION_ENTRY();
/* from hear to tail */
/* for ( i = KDIMGSENSOR_INVOKE_DRIVER_0 ; i < KDIMGSENSOR_MAX_INVOKE_DRIVERS ; i++ ) { */
/* from tail to head. */
for (i = (KDIMGSENSOR_MAX_INVOKE_DRIVERS - 1); i >= KDIMGSENSOR_INVOKE_DRIVER_0; i--) {
if (g_bEnableDriver[i] && g_pInvokeSensorFunc[i]) {
if (0 != (g_CurrentSensorIdx & g_invokeSocketIdx[i])) {
#ifndef CONFIG_FPGA_EARLY_PORTING
/* turn on power */
ret = kdCISModulePowerOn((CAMERA_DUAL_CAMERA_SENSOR_ENUM)g_invokeSocketIdx[i], (char *)g_invokeSensorNameStr[i], true, CAMERA_HW_DRVNAME1);
#endif
if (ERROR_NONE != ret) {
PK_ERR("[%s]", __func__);
return ret;
}
/* wait for power stable */
mDELAY(10);
KD_IMGSENSOR_PROFILE("kdModulePowerOn");
#if 0
if (DUAL_CAMERA_MAIN_SENSOR == g_invokeSocketIdx[i] || DUAL_CAMERA_SUB_SENSOR == g_invokeSocketIdx[i] || DUAL_CAMERA_MAIN_2_SENSOR == g_invokeSocketIdx[i]) {
spin_lock(&kdsensor_drv_lock);
gI2CBusNum = SENSOR_I2C_BUS_NUM[g_invokeSocketIdx[i]];
spin_unlock(&kdsensor_drv_lock);
PK_XLOG_INFO("kd_MultiSensorOpen: switch I2C BUS%d\n", gI2CBusNum);
}
#else
if (DUAL_CAMERA_SUB_SENSOR == g_invokeSocketIdx[i]) {
spin_lock(&kdsensor_drv_lock);
gI2CBusNum = SUPPORT_I2C_BUS_NUM2;
spin_unlock(&kdsensor_drv_lock);
PK_XLOG_INFO("kd_MultiSensorOpen: switch I2C BUS2\n");
} else {
spin_lock(&kdsensor_drv_lock);
gI2CBusNum = SUPPORT_I2C_BUS_NUM1;
spin_unlock(&kdsensor_drv_lock);
PK_XLOG_INFO("kd_MultiSensorOpen: switch I2C BUS1\n");
}
#endif
/* */
/* set i2c slave ID */
/* KD_SET_I2C_SLAVE_ID(i,g_invokeSocketIdx[i],IMGSENSOR_SET_I2C_ID_STATE); */
/* */
ret = g_pInvokeSensorFunc[i]->SensorOpen();
if (ERROR_NONE != ret) {
#ifndef CONFIG_FPGA_EARLY_PORTING
kdCISModulePowerOn((CAMERA_DUAL_CAMERA_SENSOR_ENUM)g_invokeSocketIdx[i], (char *)g_invokeSensorNameStr[i], false, CAMERA_HW_DRVNAME1);
#endif
PK_ERR("SensorOpen");
return ret;
}
/* set i2c slave ID */
/* SensorOpen() will reset i2c slave ID */
/* KD_SET_I2C_SLAVE_ID(i,g_invokeSocketIdx[i],IMGSENSOR_SET_I2C_ID_FORCE); */
}
}
}
KD_MULTI_FUNCTION_EXIT();
return ERROR_NONE;
}
int kdSetDriver(unsigned int *pDrvIndex)
{
/*
ACDK_KD_SENSOR_INIT_FUNCTION_STRUCT 结构提定义于kd_sensorlist.h,内有系统所支持的所有摄像头信息:ID name init()
定义一个 ACDK_KD_SENSOR_INIT_FUNCTION_STRUCT 指针 为空
*/
ACDK_KD_SENSOR_INIT_FUNCTION_STRUCT *pSensorList = NULL;
/*
定义数组 drvIdx[2] = {0,0};
KDIMGSENSOR_MAX_INVOKE_DRIVERS = 2
*/
u32 drvIdx[KDIMGSENSOR_MAX_INVOKE_DRIVERS] = {0, 0};
u32 i;
/*
#define KDIMGSENSOR_INVOKE_DRIVER_0 (0)
#define KDIMGSENSOR_INVOKE_DRIVER_1 (1)
打印主副 sensor 的 信息值 0x00010000/0x00000000
*/
PK_INF("pDrvIndex:0x%08x/0x%08x\n", pDrvIndex[KDIMGSENSOR_INVOKE_DRIVER_0], pDrvIndex[KDIMGSENSOR_INVOKE_DRIVER_1]);
/*
已经定义 static unsigned int gDrvIndex = 0;
获取 pDrvIndex[0] : gDrvIndex = pDrvIndex[0];
*/
gDrvIndex = pDrvIndex[KDIMGSENSOR_INVOKE_DRIVER_0];
/*
初始化 pSensorList 指针,指向系统SENSOR全局信息列表 kd_sensorlist.h : ACDK_KD_SENSOR_INIT_FUNCTION_STRUCT kdSensorList[MAX_NUM_OF_SUPPORT_SENSOR+1]
*/
if (0 != kdGetSensorInitFuncList(&pSensorList)) {
PK_ERR("ERROR:kdGetSensorInitFuncList()\n");
return -EIO;
}
/*
KDIMGSENSOR_INVOKE_DRIVER_0 = 0
KDIMGSENSOR_MAX_INVOKE_DRIVERS = 2
*/
for (i = KDIMGSENSOR_INVOKE_DRIVER_0; i < KDIMGSENSOR_MAX_INVOKE_DRIVERS; i++) {
/*先初始化主副摄像头状态都为FLASE*/
g_bEnableDriver[i] = FALSE;
/*
1 获取 pDrvIndex[i] 高16位 并 存储到 g_invokeSocketIdx[i]中。
2 获取 pDrvIndex[i] 低16位 并 存储到 drvIdx[i]中。
已经定义了的 CAMERA_DUAL_CAMERA_SENSOR_ENUM 类型的枚举数组 g_invokeSocketIdx[2]
#define KDIMGSENSOR_DUAL_SHIFT 16
#define KDIMGSENSOR_DUAL_MASK_MSB 0xFFFF0000
#define KDIMGSENSOR_DUAL_MASK_LSB 0x0000FFFF
将传递进来的 pDrvIndex[]的信息分别 (pDrvIndex[i] & 0xFFFF0000)>>16 : 获取 pDrvIndex[i] 高16位,并右移16 取出。代表当前sensor 是 main 还是sub
将传递进来的 pDrvIndex[]的信息分别 (pDrvIndex[i] & 0x0000FFFF : 获取低16位,代表所设置好的支持的sensor个数。
*/
g_invokeSocketIdx[i] = (CAMERA_DUAL_CAMERA_SENSOR_ENUM)((pDrvIndex[i] & KDIMGSENSOR_DUAL_MASK_MSB) >> KDIMGSENSOR_DUAL_SHIFT);
drvIdx[i] = (pDrvIndex[i] & KDIMGSENSOR_DUAL_MASK_LSB);
/* 摄像头标志
DUAL_CAMERA_NONE_SENSOR = 0,//空
DUAL_CAMERA_MAIN_SENSOR = 1,//主,后
DUAL_CAMERA_SUB_SENSOR = 2,//副,前
DUAL_CAMERA_MAIN_2_SENSOR = 4,
DUAL_CAMERA_MAIN_SECOND_SENSOR = 4,
DUAL_CAMERA_SENSOR_MAX
*/
/* 判断不为空 */
if (DUAL_CAMERA_NONE_SENSOR == g_invokeSocketIdx[i]) {
continue;
}
/*
判断摄像头是前设
#define SUPPORT_I2C_BUS_NUM2 2
SUPPORT_I2C_BUS_NUM1 = 0
*/
if (DUAL_CAMERA_SUB_SENSOR == g_invokeSocketIdx[i]) {
gI2CBusNum = SUPPORT_I2C_BUS_NUM2;//设置 gI2CBusNum = 2
} else {
gI2CBusNum = SUPPORT_I2C_BUS_NUM1;//设置 gI2CBusNum = 0
}
#endif
//打印 g_invokeSocketIdx[0]=1,drvIdx[0]=0
/*
i = 0:
g_invokeSocketIdx[0] = 1; drvIdx[0] = 0; 即 pDrvIndex[0] = 0x00010000
所以前面判断都没有走,因为 g_invokeSocketIdx[0] = 1,所以 g_invokeSocketIdx[]所代表的应该是 摄像头标志位 DUAL_CAMERA_MAIN_SENSOR = 1,
*/
PK_INF("g_invokeSocketIdx[%d]=%d,drvIdx[%d]=%d\n", i, g_invokeSocketIdx[i], i, drvIdx[i]);
/*
由此句可以判断 if (NULL == pSensorList[drvIdx[i]].SensorInit
*/
if (MAX_NUM_OF_SUPPORT_SENSOR > drvIdx[i]) {
/*
由此句可以判断 if (NULL == pSensorList[drvIdx[i]].SensorInit
drvIdx[i] 代表的是 对应的摄像头在 kd_sensorlist.h:ACDK_KD_SENSOR_INIT_FUNCTION_STRUCT kdSensorList[MAX_NUM_OF_SUPPORT_SENSOR+1]数组中的序列号!!!!
本行代码是检测该摄像头的初始化函数是否存在
*/
if (NULL == pSensorList[drvIdx[i]].SensorInit) {
PK_ERR("ERROR:kdSetDriver()\n");
return -EIO;
}
/*
SENSOR_FUNCTION_STRUCT *g_pInvokeSensorFunc[KDIMGSENSOR_MAX_INVOKE_DRIVERS] = {NULL, NULL};核心层摄像头操作结构体指针数组 即主副摄像头操作结构提指针
*pSensorList: 指向 ACDK_KD_SENSOR_INIT_FUNCTION_STRUCT kdSensorList[MAX_NUM_OF_SUPPORT_SENSOR+1]
pSensorList[drvIdx[i]] : 指向 ACDK_KD_SENSOR_INIT_FUNCTION_STRUCT kdSensorList[MAX_NUM_OF_SUPPORT_SENSOR+1]数组中的 目标项
pSensorList[drvIdx[i]].SensorInit() : 调用目标项的SensorInit()函数
在前面 C2390MIPISensorInit() 已经将将核心层 SENSOR_FUNCTION_STRUCT指针gm7150_pfFunc 指向 驱动层 SENSOR_FUNCTION_STRUCT,绑定核心层与驱动层的 SENSOR_FUNCTION_STRUCT
此处就是通过核心层指针 调用对应摄像头的 init()函数,定义在模块驱动层,成功的话表明核心层和模块驱动层已经连接成功
*/
pSensorList[drvIdx[i]].SensorInit(&g_pInvokeSensorFunc[i]);
if (NULL == g_pInvokeSensorFunc[i]) {
PK_ERR("ERROR:NULL g_pSensorFunc[%d]\n", i);
return -EIO;
}
/* 摄像头状态设为 TRUE 表明核心层和模块驱动层已经连接成功*/
g_bEnableDriver[i] = TRUE;
/*
从 pSensorList[drvIdx[i]].drvname 获取名称。
*/
memcpy((char *)g_invokeSensorNameStr[i], (char *)pSensorList[drvIdx[i]].drvname, sizeof(pSensorList[drvIdx[i]].drvname));
/* return sensor ID */
/*
打印sensor名称信息 : [0][1][1][gm7150_yuv]
可以知道 g_invokeSocketIdx[] : 代表的是 摄像头标志位 DUAL_CAMERA_MAIN_SENSOR = 1, 主
*/
PK_INF("[%d][%d][%d][%s]\n", i, g_bEnableDriver[i], g_invokeSocketIdx[i], g_invokeSensorNameStr[i]);
}
}
return 0;
}
/*电源管理相关操作
struct device *sensor_device = NULL; 已经在 sensor_device = device_create(sensor_class, NULL, g_CAMERA_HWdevno, NULL, CAMERA_HW_DRVNAME1);主摄像头字符设备操作 中初始化了
*/
bool Get_Cam_Regulator(void)
{
/*int ret;*/
struct regulator *name = NULL;
struct device_node *node = NULL, *kd_node;
if (1) {
/* check if customer camera node defined */
node = of_find_compatible_node(NULL, NULL, "mediatek,camera_hw");
if (node) {
/* name = of_get_property(node, "MAIN_CAMERA_POWER_A", NULL); */
/* regulator_get() kenrel 电源管理: 获取设备regulator.
获取设备 sensor_device 对应的 regulator
sensor_device 设备名称
"vcama_sub" 电源的ID,内核会查表找到电源ID对应的regulator
*/
name = regulator_get(sensor_devicee, "vcama_sub"); /*check customer definition*/
if (name == NULL) {
if (regVCAMA == NULL) {
regVCAMA = regulator_get(sensor_device, "vcama");
}
if (regVCAMD == NULL) {
regVCAMD = regulator_get(sensor_device, "vcamd");
}
if (regVCAMIO == NULL) {
regVCAMIO = regulator_get(sensor_device, "vcamio");
}
if (regVCAMAF == NULL) {
regVCAMAF = regulator_get(sensor_device, "vcamaf");
}
} else{
/*PK_DBG("Camera customer regulator name =%s!\n", name);*/
PK_DBG("Camera customer regulator!\n");
/* backup original dev.of_node */
kd_node = sensor_device->of_node;
/* if customer defined, get customized camera regulator node */
sensor_device->of_node = of_find_compatible_node(NULL, NULL, "mediatek,camera_hw");
if (regVCAMA == NULL) {
regVCAMA = regulator_get(sensor_device, "vcama");
}
if (regVCAMD == NULL) {
regVCAMD = regulator_get(sensor_device, "vcamd");
}
if (regSubVCAMD == NULL) {
regSubVCAMD = regulator_get(sensor_device, "vcamd_sub");
}
if (regVCAMIO == NULL) {
regVCAMIO = regulator_get(sensor_device, "vcamio");
}
if (regVCAMAF == NULL) {
regVCAMAF = regulator_get(sensor_device, "vcamaf");
}
/* restore original dev.of_node */
sensor_device->of_node = kd_node;
}
} else{
PK_ERR("regulator get cust camera node failed!\n");
return FALSE;
}
return TRUE;
}
return FALSE;
}
/*******************************************************************************
* CAMERA_HW_Ioctl
********************************************************************************/
static long CAMERA_HW_Ioctl(
struct file *a_pstFile,
unsigned int a_u4Command,
unsigned long a_u4Param
)
{
int i4RetValue = 0;
void *pBuff = NULL;
u32 *pIdx = NULL;
mutex_lock(&kdCam_Mutex);
if (_IOC_NONE == _IOC_DIR(a_u4Command)) {
} else {
pBuff = kmalloc(_IOC_SIZE(a_u4Command), GFP_KERNEL);
if (NULL == pBuff) {
PK_DBG("[CAMERA SENSOR] ioctl allocate mem failed\n");
i4RetValue = -ENOMEM;
goto CAMERA_HW_Ioctl_EXIT;
}
if (_IOC_WRITE & _IOC_DIR(a_u4Command)) {
if (copy_from_user(pBuff , (void *) a_u4Param, _IOC_SIZE(a_u4Command))) {
kfree(pBuff);
PK_DBG("[CAMERA SENSOR] ioctl copy from user failed\n");
i4RetValue = -EFAULT;
goto CAMERA_HW_Ioctl_EXIT;
}
}
}
pIdx = (u32 *)pBuff;
switch (a_u4Command) {
case KDIMGSENSORIOC_X_SET_DRIVER:
i4RetValue = kdSetDriver((unsigned int *)pBuff);
break;
case KDIMGSENSORIOC_T_OPEN:
i4RetValue = adopt_CAMERA_HW_Open();
break;
case KDIMGSENSORIOC_X_GETINFO:
i4RetValue = adopt_CAMERA_HW_GetInfo(pBuff);
break;
case KDIMGSENSORIOC_X_GETRESOLUTION2:
i4RetValue = adopt_CAMERA_HW_GetResolution(pBuff);
break;
case KDIMGSENSORIOC_X_GETINFO2:
i4RetValue = adopt_CAMERA_HW_GetInfo2(pBuff);
break;
case KDIMGSENSORIOC_X_FEATURECONCTROL:
i4RetValue = adopt_CAMERA_HW_FeatureControl(pBuff);
break;
case KDIMGSENSORIOC_X_CONTROL:
i4RetValue = adopt_CAMERA_HW_Control(pBuff);
break;
case KDIMGSENSORIOC_T_CLOSE:
i4RetValue = adopt_CAMERA_HW_Close();
break;
case KDIMGSENSORIOC_T_CHECK_IS_ALIVE:
i4RetValue = adopt_CAMERA_HW_CheckIsAlive();
break;
case KDIMGSENSORIOC_X_GET_SOCKET_POS:
i4RetValue = kdGetSocketPostion((unsigned int *)pBuff);
break;
case KDIMGSENSORIOC_X_SET_I2CBUS:
/* i4RetValue = kdSetI2CBusNum(*pIdx); */
break;
case KDIMGSENSORIOC_X_RELEASE_I2C_TRIGGER_LOCK:
/* i4RetValue = kdReleaseI2CTriggerLock(); */
break;
case KDIMGSENSORIOC_X_SET_SHUTTER_GAIN_WAIT_DONE:
i4RetValue = kdSensorSetExpGainWaitDone((int *)pBuff);
break;
case KDIMGSENSORIOC_X_SET_CURRENT_SENSOR:
i4RetValue = kdSetCurrentSensorIdx(*pIdx);
break;
case KDIMGSENSORIOC_X_SET_MCLK_PLL:
i4RetValue = kdSetSensorMclk(pBuff);
break;
case KDIMGSENSORIOC_X_SET_GPIO:
i4RetValue = kdSetSensorGpio(pBuff);
break;
case KDIMGSENSORIOC_X_GET_ISP_CLK:
/* PK_DBG("get_isp_clk=%d\n",get_isp_clk()); */
/* *(unsigned int*)pBuff = get_isp_clk(); */
break;
case KDIMGSENSORIOC_X_GET_SIGNAL_STATUS:
i4RetValue = kdGetSignalStatus((SIGNAL_STATUS *)pBuff);
break;
default:
PK_DBG("No such command\n");
i4RetValue = -EPERM;
break;
}
if (_IOC_READ & _IOC_DIR(a_u4Command)) {
if (copy_to_user((void __user *) a_u4Param , pBuff , _IOC_SIZE(a_u4Command))) {
kfree(pBuff);
PK_DBG("[CAMERA SENSOR] ioctl copy to user failed\n");
i4RetValue = -EFAULT;
goto CAMERA_HW_Ioctl_EXIT;
}
}
kfree(pBuff);
CAMERA_HW_Ioctl_EXIT:
mutex_unlock(&kdCam_Mutex);
return i4RetValue;
}
static int CAMERA_HW_Open(struct inode *a_pstInode, struct file *a_pstFile)
{
/*
定义于 drivers/misc/mediatek/chip/mt3561/mt_chip.c 通过内存映射访问获取硬件版本,从log可以知道 0x321
*/
unsigned int code = mt_get_chip_hw_code();
if (0x321 == code) {
PK_INF("owner = THIS_MODULE;
/* Add to system */
if (cdev_add(g_pCAMERA_HW_CharDrv, g_CAMERA_HWdevno, 1)) {
PK_DBG("[mt6516_IDP] Attatch file operation failed\n");
unregister_chrdev_region(g_CAMERA_HWdevno, 1);
return -EAGAIN;
}
sensor_class = class_create(THIS_MODULE, "sensordrv");
if (IS_ERR(sensor_class)) {
int ret = PTR_ERR(sensor_class);
PK_DBG("Unable to create class, err = %d\n", ret);
return ret;
}
//#define CAMERA_HW_DRVNAME1 "kd_camera_hw" 字符设备名称
sensor_device = device_create(sensor_class, NULL, g_CAMERA_HWdevno, NULL, CAMERA_HW_DRVNAME1);
/* 给 kd_camera_hw 主摄像头字符设备权限 0666 */
#ifdef CONFIG_ATC_ARM2
printk("chmod kd_camera_hw before\n");
sys_chmod("/dev/kd_camera_hw", (umode_t)(0666));
printk("chmod kd_camera_hw after\n");
#endif
return 0;
}
static int CAMERA_HW_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id)
{
int i4RetValue = 0;
PK_DBG("[CAMERA_HW] Attach I2C\n");
/*
获取主摄像头 i2c_client
*/
g_pstI2Cclient = client;
/*
设置主摄像头 时钟频率
*/
g_pstI2Cclient->timing = 100;/* 100k */
/*
设置 I2C属性 : 无I2c轮询忙等待
*/
g_pstI2Cclient->ext_flag &= ~I2C_POLLING_FLAG; /* No I2C polling busy waiting */
/*
Register char driver 注册主摄像头 字符设备
*/
i4RetValue = RegisterCAMERA_HWCharDrv();
if (i4RetValue) {
PK_ERR("[CAMERA_HW] register char device failed!\n");
return i4RetValue;
}
/* spin_lock_init(&g_CamHWLock); */
#if !defined(CONFIG_MTK_LEGACY)
Get_Cam_Regulator();//电源管理相关操作
#endif
PK_DBG("[CAMERA_HW] Attached!!\n");
return 0;
}
/*******************************************************************************
* I2C Driver structure
********************************************************************************/
#ifdef CONFIG_OF
static const struct of_device_id CAMERA_HW2_i2c_driver_of_ids[] = {
{ .compatible = "mediatek,camera_sub", },
{}
};
#endif
struct i2c_driver CAMERA_HW_i2c_driver2 = {
.probe = CAMERA_HW_i2c_probe2,
.remove = CAMERA_HW_i2c_remove2,
.driver = {
.name = CAMERA_HW_DRVNAME2,
.owner = THIS_MODULE,
#ifdef CONFIG_OF
.of_match_table = CAMERA_HW2_i2c_driver_of_ids,
#endif
},
.id_table = CAMERA_HW_i2c_id2,
};
/*******************************************************************************
* CAMERA_HW_probe
********************************************************************************/
static int CAMERA_HW_probe(struct platform_device *pdev)
{
pr_info("CAMERA_HW_probe\n");
#if !defined(CONFIG_MTK_CLKMGR)
Get_ccf_clk(pdev);
#endif
#if !defined(CONFIG_MTK_LEGACY)/*GPIO Pin control*/
mtkcam_gpio_init(pdev);
#endif
//add for cvbs in to change gpio mode that we use to transfer data
gm7150_gpio_init(pdev);
gm7150cam_gpio_set();
//add end
return i2c_add_driver(&CAMERA_HW_i2c_driver);
}
#ifdef CONFIG_OF
static const struct of_device_id CAMERA_HW_of_ids[] = {
{ .compatible = "mediatek,camera_hw", },
{}
};
#endif
static struct platform_driver g_stCAMERA_HW_Driver = {
.probe = CAMERA_HW_probe,
.remove = CAMERA_HW_remove,
.suspend = CAMERA_HW_suspend,
.resume = CAMERA_HW_resume,
.driver = {
.name = "image_sensor",
.owner = THIS_MODULE,
#ifdef CONFIG_OF
.of_match_table = CAMERA_HW_of_ids,
#endif
}
};
int CAMERA_HW_i2C_init(void)
{
.....
/*
注册平台设备 主副摄像头
*/
if (platform_driver_register(&g_stCAMERA_HW_Driver)) {
PK_ERR("failed to register CAMERA_HW driver\n");
return -ENODEV;
}
if (platform_driver_register(&g_stCAMERA_HW_Driver2)) {
PK_ERR("failed to register CAMERA_HW driver\n");
return -ENODEV;
}
/* FIX-ME: linux-3.10 procfs API changed */
#if 1
//创建 proc虚拟文件,应用层通过读写该文件,即可实现与内核的交互。
proc_create("driver/camsensor", 0, NULL, &fcamera_proc_fops);
proc_create("driver/camsensor2", 0, NULL, &fcamera_proc_fops2);
proc_create("driver/camsensor3", 0, NULL, &fcamera_proc_fops3);
GM7150_YUV_SensorInit(&gm7150_pfFunc);
// IMX135_MIPI_RAW_SensorInit(&imx135_pfFunc);
/*
直接调用 drivers/misc/mediatek/imgsensor/src/mt3561/kd_sensorlist.c 摄像头模块驱动中的 C2390MIPISensorInit()
已经定义了 static SENSOR_FUNCTION_STRUCT *gm7150_pfFunc;//摄像头功能结构体指针
此处直接调用模块驱动的 C2390MIPISensorInit(), 将核心层 SENSOR_FUNCTION_STRUCT指针gm7150_pfFunc 指向 驱动层 SENSOR_FUNCTION_STRUCT,绑定核心层与驱动层的 SENSOR_FUNCTION_STRUCT
*/
C2390MIPISensorInit(&gm7150_pfFunc);
GC2023MIPISensorInit(&imx135_pfFunc);
memset(&proc_tempSensor, 0, sizeof(MSDK_SENSOR_REG_INFO_STRUCT));
/* Camera information */
memset(mtk_ccm_name, 0, camera_info_size);
proc_create(PROC_CAMERA_INFO, 0, NULL, &fcamera_proc_fops1);
#else
......
return 0;
}
static void __exit CAMERA_HW_i2C_exit(void)
{
platform_driver_unregister(&g_stCAMERA_HW_Driver);
platform_driver_unregister(&g_stCAMERA_HW_Driver2);
}
EXPORT_SYMBOL(kdSetSensorSyncFlag);
EXPORT_SYMBOL(kdSensorSyncFunctionPtr);
EXPORT_SYMBOL(kdGetRawGainInfoPtr);
#ifndef CONFIG_ATC_ARM2
module_init(CAMERA_HW_i2C_init);
module_exit(CAMERA_HW_i2C_exit);
#else
EXPORT_SYMBOL(CAMERA_HW_i2C_init);
#endif
MODULE_DESCRIPTION("CAMERA_HW driver");
MODULE_AUTHOR("Jackie Su ");
MODULE_LICENSE("GPL");
头文件以及其他文件
drivers/misc/mediatek/imgsensor/inc/kd_imgsensor_define.h
#define KDIMGSENSOR_DUAL_SHIFT 16
#define KDIMGSENSOR_DUAL_MASK_MSB 0xFFFF0000
#define KDIMGSENSOR_DUAL_MASK_LSB 0x0000FFFF
#define KDIMGSENSOR_NOSENSOR "non_sensor"
#define KDIMGSENSOR_MAX_INVOKE_DRIVERS (2)
#define KDIMGSENSOR_INVOKE_DRIVER_0 (0)
#define KDIMGSENSOR_INVOKE_DRIVER_1 (1)
//核心层
typedef struct {
MUINT32 SensorId;
MUINT8 drvname[32];
MUINT32(*SensorInit)(PSENSOR_FUNCTION_STRUCT *pfFunc);
} ACDK_KD_SENSOR_INIT_FUNCTION_STRUCT, *PACDK_KD_SENSOR_INIT_FUNCTION_STRUCT;
typedef struct {
MUINT32(*SensorOpen)(void);
MUINT32(*SensorGetInfo)(MUINT32 *pScenarioId[2], MSDK_SENSOR_INFO_STRUCT * pSensorInfo[2], MSDK_SENSOR_CONFIG_STRUCT *pSensorConfigData[2]);
MUINT32(*SensorGetResolution)(MSDK_SENSOR_RESOLUTION_INFO_STRUCT * pSensorResolution[2]);
MUINT32(*SensorFeatureControl)(CAMERA_DUAL_CAMERA_SENSOR_ENUM InvokeCamera, MSDK_SENSOR_FEATURE_ENUM FeatureId, MUINT8 *pFeaturePara, MUINT32 *pFeatureParaLen);
MUINT32(*SensorControl)(CAMERA_DUAL_CAMERA_SENSOR_ENUM InvokeCamera, MSDK_SCENARIO_ID_ENUM ScenarioId, MSDK_SENSOR_EXPOSURE_WINDOW_STRUCT *pImageWindow, MSDK_SENSOR_CONFIG_STRUCT *pSensorConfigData);
MUINT32(*SensorClose)(void);
} MULTI_SENSOR_FUNCTION_STRUCT2, *PMULTI_SENSOR_FUNCTION_STRUCT2;
//模块驱动层
typedef struct {
MUINT32(*SensorOpen)(void);
MUINT32(*SensorGetInfo)(MSDK_SCENARIO_ID_ENUM ScenarioId, MSDK_SENSOR_INFO_STRUCT *pSensorInfo,
MSDK_SENSOR_CONFIG_STRUCT *pSensorConfigData);
MUINT32(*SensorGetResolution)(MSDK_SENSOR_RESOLUTION_INFO_STRUCT *pSensorResolution);
MUINT32(*SensorFeatureControl)(MSDK_SENSOR_FEATURE_ENUM FeatureId, MUINT8 *pFeaturePara, MUINT32 *pFeatureParaLen);
MUINT32(*SensorControl)(MSDK_SCENARIO_ID_ENUM ScenarioId, MSDK_SENSOR_EXPOSURE_WINDOW_STRUCT *pImageWindow, MSDK_SENSOR_CONFIG_STRUCT *pSensorConfigData);
MUINT32(*SensorClose)(void);
SIGNAL_STATUS (*SensorGetSignalStatus)(void);
#if 1 /* isp suspend resume patch */
MSDK_SCENARIO_ID_ENUM ScenarioId;
MSDK_SENSOR_EXPOSURE_WINDOW_STRUCT imageWindow;
MSDK_SENSOR_CONFIG_STRUCT sensorConfigData;
#endif
} SENSOR_FUNCTION_STRUCT, *PSENSOR_FUNCTION_STRUCT;
-----------------------------------------------------------------------------------
drivers/misc/mediatek/imgsensor/src/mt3561/camera_project/evb3561sv_ct_66_m0/camera_hw/kd_camera_hw.h
:62:#define SUPPORT_I2C_BUS_NUM1 0
------------------------------------------------------------------------------------------------
drivers/misc/mediatek/imgsensor/inc/kd_camera_feature.h
typedef enum {
DUAL_CAMERA_NONE_SENSOR = 0,//?
DUAL_CAMERA_MAIN_SENSOR = 1,//主
DUAL_CAMERA_SUB_SENSOR = 2,//副
DUAL_CAMERA_MAIN_2_SENSOR = 4,
/* for backward compatible */
DUAL_CAMERA_MAIN_SECOND_SENSOR = 4,
/* DUAL_CAMERA_SUB_2_SENSOR = 16, */
DUAL_CAMERA_SENSOR_MAX
} CAMERA_DUAL_CAMERA_SENSOR_ENUM;
-------------------------------------------------------------------------------------------------------------
kd_sensorlist.h
.....
UINT32 C2390MIPISensorInit(PSENSOR_FUNCTION_STRUCT *pfFunc);
......
ACDK_KD_SENSOR_INIT_FUNCTION_STRUCT kdSensorList[MAX_NUM_OF_SUPPORT_SENSOR+1] =
{
......
#if defined(C2390_MIPI_RAW)
{C2390MIPI_SENSOR_ID, SENSOR_DRVNAME_C2390_MIPI_RAW,C2390MIPISensorInit},
#endif
......
}
-------------------------------------------------------------------------------------------------------------
drivers/misc/mediatek/chip/mt3561/mt_chip.c
void __iomem *APHW_CODE = NULL;
void __iomem *APHW_SUBCODE = NULL;
void __iomem *APHW_VER = NULL;
void __iomem *APSW_VER = NULL;
static void init_chip_id(unsigned int line)
{
if (CID_INITIALIZED == atomic_read(&g_cid_init))
return;
if (CID_INITIALIZING == atomic_read(&g_cid_init)) {
pr_warn("%s (%d) state(%d)\n", __func__, line, atomic_read(&g_cid_init));
return;
}
atomic_set(&g_cid_init, CID_INITIALIZING);
#ifdef CONFIG_OF
{
/*
对应mt3561.dtsi中
//内存映射 共映射四段内存
chipid@08000000 {
compatible = "mediatek,chipid";
reg = <0x08000000 0x0004>,
<0x08000004 0x0004>,
<0x08000008 0x0004>,
<0x0800000C 0x0004>;
};
*/
//获取设备节点
struct device_node *node = of_find_compatible_node(NULL, NULL, "mediatek,chipid");
if (node) {
APHW_CODE = of_iomap(node, 0);//内存映射 0x08000000
WARN(!APHW_CODE, "unable to map APHW_CODE registers\n");
APHW_SUBCODE = of_iomap(node, 1);//内存映射 0x08000004
WARN(!APHW_SUBCODE, "unable to map APHW_SUBCODE registers\n");
APHW_VER = of_iomap(node, 2);//内存映射 0x08000008
WARN(!APHW_VER, "unable to map APHW_VER registers\n");
APSW_VER = of_iomap(node, 3);//内存映射 0x0800000C
WARN(!APSW_VER, "unable to map APSW_VER registers\n");
atomic_set(&g_cid_init, CID_INITIALIZED);
} else {
atomic_set(&g_cid_init, CID_UNINIT);
pr_warn("node not found\n");
}
}
#endif
}
unsigned int mt_get_chip_hw_code(void)
{
return __chip_hw_code();
}
/* return hardware version */
unsigned int __chip_hw_code(void)
{
init_chip_id(__LINE__);
/*
访问外设IO,读取 内存映射 0x08000000 数值,即 硬件版本
*/
return (APHW_CODE) ? readl(IOMEM(APHW_CODE)) : (C_UNKNOWN_CHIP_ID);
}
启动以及开启Camera的log
init/main.c
:
int arm2_recycle()
{
...
CAMERA_HW_i2C_init();
...
pr_err("ARM2 recycle others --\n");
...
ts = sched_clock() - ts;
pr_err("ARM2 recycle end, %10lld.%06ld ns\n", nsec_high(ts), nsec_low(ts));
}
/* CAMERA_HW_i2C_init()中 */
//平台设备匹配OK 调用 main sensor CAMERA_HW_probe()
[ 25.866276] <1>.(1)[1609:Thread-68]CAMERA_HW_probe
//调用 gm7150_gpio_init(pdev) 没有找到对应脚
[ 25.868516] <1>.(1)[1609:Thread-68]gm7150_gpio_init : pinctrl err, cmhsync
[ 25.871078] <2>.(2)[1609:Thread-68]gm7150_gpio_init : pinctrl err, cmvsync
[ 25.871934] <2>.(2)[1609:Thread-68]gm7150_gpio_init : pinctrl err, cmdata9
[ 25.872797] <2>.(2)[1609:Thread-68]gm7150_gpio_init : pinctrl err, cmdata8
[ 25.873645] <2>.(2)[1609:Thread-68]gm7150_gpio_init : pinctrl err, cmdata7
[ 25.874503] <2>.(2)[1609:Thread-68]gm7150_gpio_init : pinctrl err, cmdata6
[ 25.875435] <2>.(2)[1609:Thread-68]gm7150_gpio_init : pinctrl err, cmdata5
[ 25.876558] <2>.(2)[1609:Thread-68]gm7150_gpio_init : pinctrl err, cmdata4
[ 25.877445] <2>.(2)[1609:Thread-68]gm7150_gpio_init : pinctrl err, cmdata3
[ 25.878351] <2>.(2)[1609:Thread-68]gm7150_gpio_init : pinctrl err, cmdata2
[ 25.879198] <2>.(2)[1609:Thread-68]gm7150_gpio_init : pinctrl err, cmclk
//调用 gm7150cam_gpio_set() 没有找到目标 返回
[ 25.880033] <2>.(2)[1609:Thread-68]gm7150cam_gpio_set : pin pointer is not valid
/*
I2C设备匹配OK 调用 CAMERA_HW_i2c_probe(),
i4RetValue = RegisterCAMERA_HWCharDrv(); 并且开始注册主摄像头 字符设备
最后给 注册好的主摄像头字符设备 0666的权限 : sys_chmod("/dev/kd_camera_hw", (umode_t)(0666));
*/
[ 25.883822] <2>.(2)[1609:Thread-68]chmod kd_camera_hw before
[ 25.884527] <2>.(2)[1609:Thread-68]chmod kd_camera_hw after
//电源管理相关,暂时略过
[ 25.885442] <2>.(2)[1609:Thread-68]kd_camera_hw supply vcama_sub not found, using dummy regulator
//直接调用模块驱动的 C2390MIPISensorInit(), 将核心层 SENSOR_FUNCTION_STRUCT指针 指向 驱动层 SENSOR_FUNCTION_STRUCT,绑定核心层与驱动层的 SENSOR_FUNCTION_STRUCT
[ 25.894036] <2>.(2)[1609:Thread-68][lj c2390]func= C2390MIPISensorInit
[ 25.896322] <0>.(1)[1609:Thread-68]ARM2 recycle others --
[ 25.896328] <0>.(1)[1609:Thread-68]ARM2 recycle end, 256.837385 ns
//通过内存映射访问外设获取硬件版本,从log可以知道 0x321
[ 25.925351] <1>.(1)[510:mediaserver][kd_sensorlist][CAMERA_HW_Open] .(1)[510:mediaserver][kd_sensorlist][CAMERA_HW_Open] .(1)[510:mediaserver][kd_sensorlist][kdSetDriver] pDrvIndex:0x00010000/0x00000000
[ 25.932233] <1>.(1)[510:mediaserver][kd_sensorlist][kdSetDriver] g_invokeSocketIdx[0]=1,drvIdx[0]=0
[ 25.933842] <1>.(1)[510:mediaserver][kd_sensorlist][kdSetDriver] [0][1][1][gm7150_yuv]
/*
调用 kdCISModulePowerOn()
统一上电
VCAMA DVDD 数字供电,主要给 ISP 供电 主要给 ISP 供电
VCAMIO VDDIO 数字 IO 电源 主要给 I2C 部分供电
VCAMD AVDD 模拟供电 主要给感光区和 ADC 部分供电
根据名称进行摄像头复位
*/
[ 25.935048] <1>.(1)[510:mediaserver][PowerON]pinSetIdx:0, currSensorName: gm7150_yuv
[ 25.936176] <1>.(1)[510:mediaserver]kdCISModulePowerOn GpioPowerCount 1
[ 25.937136] <1>.(1)[726:EVDOReadThread][C2K MODEM] check_port 344: port0 func NULL
[ 26.014845] <3>.(3)[510:mediaserver]ERROR,506: id=0,addr: 5d, transfer error
[ 26.015721] <3>.(3)[510:mediaserver]ERROR,512: I2C_ACKERR
[ 26.016404] <3>.(3)[510:mediaserver][CAMERA SENSOR] I2C send failed!!, Addr = 0x80
[ 26.017625] <3>.(3)[510:mediaserver]ERROR,506: id=0,addr: 5d, transfer error
[ 26.018622] <3>.(3)[510:mediaserver]ERROR,512: I2C_ACKERR
[ 26.019369] <3>.(3)[510:mediaserver][CAMERA SENSOR] I2C send failed!!, Addr = 0x81
[ 26.021560] <1>.(1)[510:mediaserver]ERROR,506: id=0,addr: 5d, transfer error
[ 26.022732] <1>.(1)[510:mediaserver]ERROR,512: I2C_ACKERR
[ 26.024161] <1>.(1)[510:mediaserver][CAMERA SENSOR] I2C send failed!!, Addr = 0x80
[ 26.027322] <1>.(1)[510:mediaserver]ERROR,506: id=0,addr: 5d, transfer error
[ 26.028358] <0>.(0)[510:mediaserver]ERROR,512: I2C_ACKERR
[ 26.029090] <0>.(0)[510:mediaserver][CAMERA SENSOR] I2C send failed!!, Addr = 0x81
[ 26.029688] <0>.(1)[1061:ndroid.systemui]M4Uconfig_port:JPGDEC_BSDMA,v1,s0
[ 26.029705] <0>.(1)[1061:ndroid.systemui]M4Uconfig_port:JPGDEC_WDMA,v1,s0
[ 26.029717] <0>.(1)[1061:ndroid.systemui]M4U error: cache_map_vm_struct is NULL, retry
[ 26.033042] <0>.(0)[510:mediaserver]ERROR,506: id=0,addr: 5d, transfer error
[ 26.033916] <0>.(0)[510:mediaserver]ERROR,512: I2C_ACKERR
[ 26.034594] <0>.(0)[510:mediaserver][CAMERA SENSOR] I2C send failed!!, Addr = 0x80
[ 26.035749] <0>.(0)[510:mediaserver]ERROR,506: id=0,addr: 5d, transfer error
[ 26.036625] <0>.(0)[510:mediaserver]ERROR,512: I2C_ACKERR
[ 26.037301] <0>.(0)[510:mediaserver][CAMERA SENSOR] I2C send failed!!, Addr = 0x81
/*下电*/
[ 26.038394] <0>.(0)[510:mediaserver][PowerOFF]pinSetIdx:0 , currSensorName: gm7150_yuv
[ 26.039377] <0>.(0)[510:mediaserver]kdCISModulePowerOff GpioPowerCount 0
/*如此反复遍历 ACDK_KD_SENSOR_INIT_FUNCTION_STRUCT kdSensorList[MAX_NUM_OF_SUPPORT_SENSOR+1]数组中的摄像头:
pinSetIdx:0 , currSensorName: gm7150_yuv
pinSetIdx:0 , currSensorName: c2390mipiraw
pinSetIdx:0 , currSensorName: ps5250mipiraw
pinSetIdx:0 , currSensorName: gc2023mipiraw
*/
[ 26.040511] <0>.(0)[510:mediaserver][kd_sensorlist][kdSetDriver] pDrvIndex:0x00010001/0x00000000
[ 26.041605] <0>.(0)[510:mediaserver][kd_sensorlist][kdSetDriver] g_invokeSocketIdx[0]=1,drvIdx[0]=1
[ 26.042743] <0>.(0)[510:mediaserver][lj c2390]func= C2390MIPISensorInit
[ 26.043616] <0>.(0)[510:mediaserver][kd_sensorlist][kdSetDriver] [0][1][1][c2390mipiraw]
[ 26.044678] <0>.(0)[510:mediaserver][PowerON]pinSetIdx:0, currSensorName: c2390mipiraw
[ 26.045665] <0>.(0)[510:mediaserver]kdCISModulePowerOn GpioPowerCount 1
[ 26.048759] <1>.(1)[726:EVDOReadThread][C2K MODEM] check_port 344: port0 func NULL
[ 26.087951] <0>.(0)[510:mediaserver]PinIdx(0) PwrType(1) val(0)
[ 26.092891] <1>.(1)[1061:ndroid.systemui]M4Uconfig_port:JPGDEC_BSDMA,v1,s0
[ 26.098913] <0>.(0)[510:mediaserver]PinIdx(0) PwrType(1) val(1)
[ 26.100772] <1>.(1)[1061:ndroid.systemui]M4Uconfig_port:JPGDEC_WDMA,v1,s0
[ 26.134271] <1>.(1)[510:mediaserver][lj c2390]func= get_imgsensor_id
[ 26.135266] <1>.(1)[510:mediaserver]ERROR,506: id=0,addr: 36, transfer error
[ 26.136144] <1>.(1)[510:mediaserver]ERROR,512: I2C_ACKERR
[ 26.136821] <1>.(1)[510:mediaserver][CAMERA SENSOR] I2C send failed!!, Addr = 0x0
[ 26.138011] <1>.(1)[510:mediaserver]ERROR,506: id=0,addr: 36, transfer error
[ 26.138944] <1>.(1)[510:mediaserver]ERROR,512: I2C_ACKERR
[ 26.139823] <1>.(1)[510:mediaserver][CAMERA SENSOR] I2C send failed!!, Addr = 0x0
[ 26.140904] <1>.(1)[510:mediaserver][lj c2390]c2390 get_imgsensor_id fail, write id: 0x6c, id: 0x0
[ 26.142514] <1>.(1)[510:mediaserver]ERROR,506: id=0,addr: 36, transfer error
[ 26.144343] <1>.(1)[510:mediaserver]ERROR,512: I2C_ACKERR
[ 26.145588] <1>.(1)[510:mediaserver][CAMERA SENSOR] I2C send failed!!, Addr = 0x0
[ 26.147778] <1>.(1)[510:mediaserver]ERROR,506: id=0,addr: 36, transfer error
[ 26.148699] <1>.(1)[510:mediaserver]ERROR,512: I2C_ACKERR
[ 26.149378] <1>.(1)[510:mediaserver][CAMERA SENSOR] I2C send failed!!, Addr = 0x0
[ 26.150529] <1>.(1)[510:mediaserver][lj c2390]c2390 get_imgsensor_id fail, write id: 0x6c, id: 0x0
[ 26.151823] <1>.(1)[510:mediaserver][PowerOFF]pinSetIdx:0 , currSensorName: c2390mipiraw
[ 26.152852] <1>.(1)[510:mediaserver]PinIdx(0) PwrType(1) val(0)
[ 26.153589] <1>.(1)[510:mediaserver]kdCISModulePowerOff GpioPowerCount 0
[ 26.154821] <1>.(1)[510:mediaserver][lj c2390]>>> get_info():scenario_id = 0
[ 26.157375] <1>.(1)[510:mediaserver][lj c2390]func= get_info
[ 26.158208] <1>.(1)[510:mediaserver][lj c2390]<<< get_info()
[ 26.159095] <1>.(1)[510:mediaserver][kd_sensorlist][kdSetDriver] pDrvIndex:0x00010002/0x00000000
[ 26.160187] <1>.(1)[510:mediaserver][kd_sensorlist][kdSetDriver] g_invokeSocketIdx[0]=1,drvIdx[0]=2
[ 26.161416] <1>.(1)[726:EVDOReadThread][C2K MODEM] check_port 344: port0 func NULL
[ 26.162499] <1>.(1)[510:mediaserver][kd_sensorlist][kdSetDriver] [0][1][1][ps5250mipiraw]
[ 26.164030] <1>.(1)[510:mediaserver][PowerON]pinSetIdx:0, currSensorName: ps5250mipiraw
[ 26.165032] <1>.(1)[510:mediaserver]kdCISModulePowerOn GpioPowerCount 1
[ 26.208124] <1>.(1)[510:mediaserver]PinIdx(0) PwrType(0) val(1)
[ 26.209208] <1>.(1)[510:mediaserver]PinIdx(0) PwrType(1) val(0)
[ 26.238260] <0>.(0)[55:kworker/0:1]
[ 26.238260] <0><> flip to S(0), 1524
[ 26.246419] <2>.(2)[510:mediaserver]PinIdx(0) PwrType(0) val(0)
[ 26.247175] <2>.(2)[510:mediaserver]PinIdx(0) PwrType(1) val(1)
[ 26.257947] <0>.(0)[510:mediaserver]mediaserver PS5250 get_imgsensor_id
[ 26.259090] <0>.(0)[510:mediaserver]ERROR,506: id=0,addr: 48, transfer error
[ 26.259978] <0>.(0)[510:mediaserver]ERROR,512: I2C_ACKERR
[ 26.261522] <0>.(0)[510:mediaserver]ERROR,506: id=0,addr: 48, transfer error
[ 26.263268] <0>.(0)[510:mediaserver]ERROR,512: I2C_ACKERR
[ 26.264160] <1>.(1)[510:mediaserver]ERROR,506: id=0,addr: 48, transfer error
[ 26.265109] <0>.(0)[510:mediaserver]ERROR,512: I2C_ACKERR
[ 26.266012] <0>.(0)[510:mediaserver]ERROR,506: id=0,addr: 48, transfer error
[ 26.266913] <0>.(0)[510:mediaserver]ERROR,512: I2C_ACKERR
[ 26.267797] <0>.(0)[510:mediaserver]ERROR,506: id=0,addr: 48, transfer error
[ 26.268735] <0>.(0)[510:mediaserver]ERROR,512: I2C_ACKERR
[ 26.269658] <0>.(0)[510:mediaserver][CAMERA SENSOR] I2C send failed!!, Addr = 0x0
[ 26.270902] <2>.(2)[510:mediaserver]ERROR,506: id=0,addr: 48, transfer error
[ 26.271782] <2>.(2)[510:mediaserver]ERROR,512: I2C_ACKERR
[ 26.272587] <0>.(0)[510:mediaserver][CAMERA SENSOR] I2C send failed!!, Addr = 0x1
[ 26.272889] <0>.(1)[726:EVDOReadThread][C2K MODEM] check_port 344: port0 func NULL
[ 26.274481] <0>.(0)[510:mediaserver]Read sensor id fail, write id: 0x90, id: 0x0
[ 26.275571] <0>.(0)[510:mediaserver]ERROR,506: id=0,addr: 48, transfer error
[ 26.276446] <0>.(0)[510:mediaserver]ERROR,512: I2C_ACKERR
[ 26.277368] <0>.(0)[510:mediaserver]ERROR,506: id=0,addr: 48, transfer error
[ 26.278289] <0>.(0)[510:mediaserver]ERROR,512: I2C_ACKERR
[ 26.279249] <0>.(0)[510:mediaserver]ERROR,506: id=0,addr: 48, transfer error
[ 26.280291] <0>.(0)[510:mediaserver]ERROR,512: I2C_ACKERR
[ 26.281232] <0>.(0)[510:mediaserver]ERROR,506: id=0,addr: 48, transfer error
[ 26.282101] <0>.(0)[510:mediaserver]ERROR,512: I2C_ACKERR
[ 26.283009] <0>.(0)[510:mediaserver]ERROR,506: id=0,addr: 48, transfer error
[ 26.283879] <0>.(0)[510:mediaserver]ERROR,512: I2C_ACKERR
[ 26.284555] <0>.(0)[510:mediaserver][CAMERA SENSOR] I2C send failed!!, Addr = 0x0
[ 26.285645] <0>.(0)[510:mediaserver]ERROR,506: id=0,addr: 48, transfer error
[ 26.286515] <0>.(0)[510:mediaserver]ERROR,512: I2C_ACKERR
[ 26.287192] <0>.(0)[510:mediaserver][CAMERA SENSOR] I2C send failed!!, Addr = 0x1
[ 26.288121] <0>.(0)[510:mediaserver]Read sensor id fail, write id: 0x90, id: 0x0
[ 26.289113] <0>.(0)[510:mediaserver][PowerOFF]pinSetIdx:0 , currSensorName: ps5250mipiraw
[ 26.290148] <0>.(0)[510:mediaserver]PinIdx(0) PwrType(1) val(0)
[ 26.290885] <0>.(0)[510:mediaserver]PinIdx(0) PwrType(0) val(1)
[ 26.291613] <0>.(0)[510:mediaserver]kdCISModulePowerOff GpioPowerCount 0
[ 26.292746] <0>.(0)[510:mediaserver][kd_sensorlist][kdSetDriver] pDrvIndex:0x00010003/0x00000000
[ 26.293850] <0>.(0)[510:mediaserver][kd_sensorlist][kdSetDriver] g_invokeSocketIdx[0]=1,drvIdx[0]=3
[ 26.294972] <0>.(0)[510:mediaserver][kd_sensorlist][kdSetDriver] [0][1][1][gc2023mipiraw]
[ 26.296012] <0>.(0)[510:mediaserver][PowerON]pinSetIdx:0, currSensorName: gc2023mipiraw
[ 26.297005] <0>.(0)[510:mediaserver]kdCISModulePowerOn GpioPowerCount 1
[ 26.340511] <0>.(0)[510:mediaserver]PinIdx(0) PwrType(0) val(1)
[ 26.341264] <0>.(0)[510:mediaserver]PinIdx(0) PwrType(1) val(0)
[ 26.362041] <2>.(2)[510:mediaserver]PinIdx(0) PwrType(0) val(0)
[ 26.362800] <2>.(2)[510:mediaserver]PinIdx(0) PwrType(1) val(1)
[ 26.383427] <1>.(1)[726:EVDOReadThread][C2K MODEM] check_port 344: port0 func NULL
[ 26.397392] <2>.(2)[510:mediaserver]i2c write id: 0x6e, sensor id: 0x2023
[ 26.398307] <2>.(2)[510:mediaserver]++++++++++feature_control( finished+++++++++++++
[ 26.399270] <2>.(2)[510:mediaserver][kd_sensorlist][adopt_CAMERA_HW_CheckIsAlive] Sensor found ID = 0x2023
[ 26.400494] <2>.(2)[510:mediaserver][PowerOFF]pinSetIdx:0 , currSensorName: gc2023mipiraw
[ 26.401863] <2>.(2)[510:mediaserver]PinIdx(0) PwrType(1) val(0)
[ 26.402638] <2>.(2)[510:mediaserver]PinIdx(0) PwrType(0) val(1)
[ 26.403368] <2>.(2)[510:mediaserver]kdCISModulePowerOff GpioPowerCount 0
[ 26.409232] <2>.(2)[510:mediaserver][kd_sensorlist][kdSetDriver] pDrvIndex:0x00020000/0x00000000
[ 26.410743] <2>.(2)[510:mediaserver][kd_sensorlist][kdSetDriver] g_invokeSocketIdx[0]=2,drvIdx[0]=0
[ 26.411978] <2>.(2)[510:mediaserver][kd_sensorlist][kdSetDriver] [0][1][2][gm7150_yuv]
[ 26.413324] <2>.(2)[510:mediaserver][PowerON]pinSetIdx:1, currSensorName: gm7150_yuv
[ 26.414290] <2>.(2)[510:mediaserver]kdCISModulePowerOn GpioPowerCount 1
[ 26.432180] <2>.(2)[362:cmddumper][C2K MODEM] check_port 344: port11 func NULL
[ 26.474682] <0>.(0)[510:mediaserver]ERROR,506: id=0,addr: 5d, transfer error
[ 26.475660] <0>.(0)[510:mediaserver]ERROR,512: I2C_ACKERR
[ 26.476625] <2>.(2)[510:mediaserver][CAMERA SENSOR] I2C send failed!!, Addr = 0x80
[ 26.477864] <0>.(0)[510:mediaserver]ERROR,506: id=0,addr: 5d, transfer error
[ 26.478772] <0>.(0)[510:mediaserver]ERROR,512: I2C_ACKERR
[ 26.479449] <0>.(0)[510:mediaserver][CAMERA SENSOR] I2C send failed!!, Addr = 0x81
[ 26.480557] <0>.(0)[510:mediaserver]ERROR,506: id=0,addr: 5d, transfer error
[ 26.481430] <0>.(0)[510:mediaserver]ERROR,512: I2C_ACKERR
[ 26.482179] <0>.(0)[510:mediaserver][CAMERA SENSOR] I2C send failed!!, Addr = 0x80
[ 26.483287] <0>.(0)[510:mediaserver]ERROR,506: id=0,addr: 5d, transfer error
[ 26.484162] <0>.(0)[510:mediaserver]ERROR,512: I2C_ACKERR
[ 26.484902] <0>.(0)[510:mediaserver][CAMERA SENSOR] I2C send failed!!, Addr = 0x81
[ 26.486040] <0>.(0)[510:mediaserver]ERROR,506: id=0,addr: 5d, transfer error
[ 26.486923] <0>.(0)[510:mediaserver]ERROR,512: I2C_ACKERR
[ 26.487598] <0>.(0)[510:mediaserver][CAMERA SENSOR] I2C send failed!!, Addr = 0x80
[ 26.488758] <0>.(0)[510:mediaserver]ERROR,506: id=0,addr: 5d, transfer error
[ 26.492325] <0>.(0)[510:mediaserver]ERROR,512: I2C_ACKERR
[ 26.494882] <1>.(1)[726:EVDOReadThread][C2K MODEM] check_port 344: port0 func NULL
[ 26.495540] <1>.(0)[510:mediaserver][CAMERA SENSOR] I2C send failed!!, Addr = 0x81
[ 26.495548] <1>.(0)[510:mediaserver][PowerOFF]pinSetIdx:1 , currSensorName: gm7150_yuv
[ 26.495553] <1>.(0)[510:mediaserver]kdCISModulePowerOff GpioPowerCount 0
[ 26.495828] <1>.(0)[510:mediaserver][kd_sensorlist][kdSetDriver] pDrvIndex:0x00020001/0x00000000
[ 26.495834] <1>.(0)[510:mediaserver][kd_sensorlist][kdSetDriver] g_invokeSocketIdx[0]=2,drvIdx[0]=1
[ 26.495838] <1>.(0)[510:mediaserver][lj c2390]func= C2390MIPISensorInit
[ 26.495843] <1>.(0)[510:mediaserver][kd_sensorlist][kdSetDriver] [0][1][2][c2390mipiraw]
[ 26.495850] <1>.(0)[510:mediaserver][PowerON]pinSetIdx:1, currSensorName: c2390mipiraw
[ 26.495854] <1>.(0)[510:mediaserver]kdCISModulePowerOn GpioPowerCount 1
[ 26.586862] <0>.(0)[510:mediaserver][lj c2390]func= get_imgsensor_id
[ 26.589776] <0>.(0)[510:mediaserver]ERROR,506: id=0,addr: 36, transfer error
[ 26.590669] <0>.(0)[510:mediaserver]ERROR,512: I2C_ACKERR
[ 26.591352] <0>.(0)[510:mediaserver][CAMERA SENSOR] I2C send failed!!, Addr = 0x0
[ 26.592679] <0>.(0)[510:mediaserver]ERROR,506: id=0,addr: 36, transfer error
[ 26.593564] <0>.(0)[510:mediaserver]ERROR,512: I2C_ACKERR
[ 26.594239] <0>.(0)[510:mediaserver][CAMERA SENSOR] I2C send failed!!, Addr = 0x0
[ 26.595162] <0>.(0)[510:mediaserver][lj c2390]c2390 get_imgsensor_id fail, write id: 0x6c, id: 0x0
[ 26.596936] <0>.(0)[510:mediaserver]ERROR,506: id=0,addr: 36, transfer error
[ 26.597815] <0>.(0)[510:mediaserver]ERROR,512: I2C_ACKERR
[ 26.599016] <0>.(0)[510:mediaserver][CAMERA SENSOR] I2C send failed!!, Addr = 0x0
[ 26.601989] <0>.(0)[510:mediaserver]ERROR,506: id=0,addr: 36, transfer error
[ 26.603081] <0>.(0)[510:mediaserver]ERROR,512: I2C_ACKERR
[ 26.603766] <0>.(0)[510:mediaserver][CAMERA SENSOR] I2C send failed!!, Addr = 0x0
[ 26.604693] <0>.(0)[510:mediaserver][lj c2390]c2390 get_imgsensor_id fail, write id: 0x6c, id: 0x0
[ 26.605812] <0>.(0)[510:mediaserver][PowerOFF]pinSetIdx:1 , currSensorName: c2390mipiraw
[ 26.606831] <0>.(0)[510:mediaserver]kdCISModulePowerOff GpioPowerCount 0
[ 26.607876] <0>.(0)[510:mediaserver][lj c2390]>>> get_info():scenario_id = 0
[ 26.608797] <0>.(0)[510:mediaserver][lj c2390]func= get_info
[ 26.609536] <0>.(0)[510:mediaserver][lj c2390]<<< get_info()
[ 26.610355] <0>.(0)[510:mediaserver][kd_sensorlist][kdSetDriver] pDrvIndex:0x00020002/0x00000000
[ 26.611449] <0>.(0)[510:mediaserver][kd_sensorlist][kdSetDriver] g_invokeSocketIdx[0]=2,drvIdx[0]=2
[ 26.612966] <0>.(0)[510:mediaserver][kd_sensorlist][kdSetDriver] [0][1][2][ps5250mipiraw]
[ 26.614011] <0>.(0)[510:mediaserver][PowerON]pinSetIdx:1, currSensorName: ps5250mipiraw
[ 26.615085] <1>.(1)[726:EVDOReadThread][C2K MODEM] check_port 344: port0 func NULL
[ 26.625178] <0>.(0)[510:mediaserver]kdCISModulePowerOn GpioPowerCount 1
[ 26.635990] <2>.(2)[291:md_monitor][md1]port ccci_mdl_monitor open with flag 20802 by md_monitor
[ 26.637199] <2>.(2)[291:md_monitor][md1]port ccci_mdl_monitor close rx_len=0 empty=1
[ 26.638491] <2>.(2)[291:md_monitor][md1]dev close check: 1 0 0 0
[ 26.696797] <0>.(0)[510:mediaserver]mediaserver PS5250 get_imgsensor_id
[ 26.710346] <0>.(0)[510:mediaserver]ERROR,506: id=0,addr: 48, transfer error
[ 26.711445] <0>.(0)[510:mediaserver]ERROR,512: I2C_ACKERR
[ 26.712931] <0>.(0)[510:mediaserver]ERROR,506: id=0,addr: 48, transfer error
[ 26.713821] <0>.(0)[510:mediaserver]ERROR,512: I2C_ACKERR
[ 26.714722] <0>.(0)[510:mediaserver]ERROR,506: id=0,addr: 48, transfer error
[ 26.715615] <0>.(0)[510:mediaserver]ERROR,512: I2C_ACKERR
[ 26.716925] <0>.(0)[510:mediaserver]ERROR,506: id=0,addr: 48, transfer error
[ 26.718026] <0>.(0)[510:mediaserver]ERROR,512: I2C_ACKERR
[ 26.720147] <0>.(0)[510:mediaserver]ERROR,506: id=0,addr: 48, transfer error
[ 26.721031] <0>.(0)[510:mediaserver]ERROR,512: I2C_ACKERR
[ 26.721718] <0>.(0)[510:mediaserver][CAMERA SENSOR] I2C send failed!!, Addr = 0x0
[ 26.723760] <0>.(0)[510:mediaserver]ERROR,506: id=0,addr: 48, transfer error
[ 26.724636] <0>.(0)[510:mediaserver]ERROR,512: I2C_ACKERR
[ 26.725469] <0>.(0)[510:mediaserver][CAMERA SENSOR] I2C send failed!!, Addr = 0x1
[ 26.726398] <0>.(0)[510:mediaserver]Read sensor id fail, write id: 0x90, id: 0x0
[ 26.726975] <0>.(1)[726:EVDOReadThread][C2K MODEM] check_port 344: port0 func NULL
[ 26.729367] <0>.(0)[510:mediaserver]ERROR,506: id=0,addr: 48, transfer error
[ 26.731146] <0>.(0)[510:mediaserver]ERROR,512: I2C_ACKERR
[ 26.732074] <0>.(0)[510:mediaserver]ERROR,506: id=0,addr: 48, transfer error
[ 26.737999] <2>.(2)[510:mediaserver]ERROR,512: I2C_ACKERR
[ 26.741680] <2>.(2)[510:mediaserver]ERROR,506: id=0,addr: 48, transfer error
[ 26.742558] <2>.(2)[510:mediaserver]ERROR,512: I2C_ACKERR
[ 26.752810] <2>.(2)[510:mediaserver]ERROR,506: id=0,addr: 48, transfer error
[ 26.753688] <2>.(2)[510:mediaserver]ERROR,512: I2C_ACKERR
[ 26.754943] <2>.(2)[510:mediaserver]ERROR,506: id=0,addr: 48, transfer error
[ 26.755820] <2>.(2)[510:mediaserver]ERROR,512: I2C_ACKERR
[ 26.756499] <2>.(2)[510:mediaserver][CAMERA SENSOR] I2C send failed!!, Addr = 0x0
[ 26.799303] <2>.(2)[510:mediaserver]ERROR,506: id=0,addr: 48, transfer error
[ 26.800182] <2>.(2)[510:mediaserver]ERROR,512: I2C_ACKERR
[ 26.800864] <2>.(2)[510:mediaserver][CAMERA SENSOR] I2C send failed!!, Addr = 0x1
[ 26.803482] AEE_MONITOR_SET[status]: 0x1
[ 26.808620] <2>.(2)[510:mediaserver]Read sensor id fail, write id: 0x90, id: 0x0
[ 26.809582] <2>.(2)[510:mediaserver][PowerOFF]pinSetIdx:1 , currSensorName: ps5250mipiraw
[ 26.820655] <2>.(2)[510:mediaserver]kdCISModulePowerOff GpioPowerCount 0
[ 26.837482] <1>.(1)[726:EVDOReadThread][C2K MODEM] check_port 344: port0 func NULL
/*最后确定 gc2023mipiraw 然后不断的发送一些 IOCTL */
[ 26.839899] <2>.(2)[510:mediaserver][kd_sensorlist][kdSetDriver] pDrvIndex:0x00020003/0x00000000
[ 26.846712] <2>.(2)[510:mediaserver][kd_sensorlist][kdSetDriver] g_invokeSocketIdx[0]=2,drvIdx[0]=3
[ 26.854386] <2>.(2)[510:mediaserver][kd_sensorlist][kdSetDriver] [0][1][2][gc2023mipiraw]
[ 26.858486] <2>.(2)[510:mediaserver][PowerON]pinSetIdx:1, currSensorName: gc2023mipiraw
[ 26.859485] <2>.(2)[510:mediaserver]kdCISModulePowerOn GpioPowerCount 1
[ 26.900211] <0>.(0)[88:hps_main][HPS] (0000)(4)DBG_HRT(400)(1666)(58)(0) (4)(4)(4)(4)(1) (0)(0)(0) (3169)(10)(2) (3)(1666)(10)(0)(1666) wifi_base(0)
[ 26.922130] <2>.(2)[510:mediaserver]ERROR,506: id=0,addr: 37, transfer error
[ 26.923197] <2>.(2)[510:mediaserver]ERROR,512: I2C_ACKERR
[ 26.923999] <2>.(2)[510:mediaserver][CAMERA SENSOR] I2C send failed!!, Addr = 0xf0
[ 26.927872] <2>.(2)[510:mediaserver]ERROR,506: id=0,addr: 37, transfer error
[ 26.933074] <2>.(2)[510:mediaserver]ERROR,512: I2C_ACKERR
[ 26.933824] <2>.(2)[362:cmddumper][C2K MODEM] check_port 344: port11 func NULL
[ 26.935239] <2>.(2)[510:mediaserver][CAMERA SENSOR] I2C send failed!!, Addr = 0xf1
[ 26.936659] <2>.(2)[510:mediaserver]Read sensor id fail, write id: 0x6e, id: 0x0
[ 26.938856] <2>.(2)[510:mediaserver]ERROR,506: id=0,addr: 37, transfer error
[ 26.940198] <2>.(2)[510:mediaserver]ERROR,512: I2C_ACKERR
[ 26.941072] <0>.(0)[370:Binder_1]BOOTPROF: 26941.058756:BOOT_Animation:END
[ 26.941157] <0>.(2)[510:mediaserver][CAMERA SENSOR] I2C send failed!!, Addr = 0xf0
[ 26.941469] <0>.(2)[510:mediaserver]ERROR,506: id=0,addr: 37, transfer error
[ 26.941473] <0>.(2)[510:mediaserver]ERROR,512: I2C_ACKERR
[ 26.941482] <0>.(2)[510:mediaserver][CAMERA SENSOR] I2C send failed!!, Addr = 0xf1
[ 26.941486] <0>.(2)[510:mediaserver]Read sensor id fail, write id: 0x6e, id: 0x0
[ 26.941490] <0>.(2)[510:mediaserver]++++++++++feature_control( finished+++++++++++++
[ 26.941496] <0>.(2)[510:mediaserver][PowerOFF]pinSetIdx:1 , currSensorName: gc2023mipiraw
[ 26.941501] <0>.(2)[510:mediaserver]kdCISModulePowerOff GpioPowerCount 0
[ 26.942358] <0>.(2)[510:mediaserver][kd_sensorlist][CAMERA_HW_Open] .(2)[510:mediaserver][kd_sensorlist][kdSetDriver] pDrvIndex:0x00010003/0x00000000
[ 26.942378] <0>.(2)[510:mediaserver][kd_sensorlist][kdSetDriver] g_invokeSocketIdx[0]=1,drvIdx[0]=3
[ 26.942383] <0>.(2)[510:mediaserver][kd_sensorlist][kdSetDriver] [0][1][1][gc2023mipiraw]
[ 26.942428] <0>.(2)[510:mediaserver][kd_sensorlist][kd_MultiSensorGetResolution] g_bEnableDriver[1][0]
[ 26.942433] <0>.(2)[510:mediaserver]++++++++++get_resolution( finished+++++++++++++
[ 26.942472] <0>.(2)[510:mediaserver]++++++++++feature_control( finished+++++++++++++
[ 26.942479] <0>.(2)[510:mediaserver]++++++++++feature_control( finished+++++++++++++
[ 26.942548] <0>.(2)[510:mediaserver][kd_sensorlist][kd_MultiSensorGetResolution] g_bEnableDriver[1][0]
[ 26.942551] <0>.(2)[510:mediaserver]++++++++++get_resolution( finished+++++++++++++
[ 26.942791] <0>.(2)[510:mediaserver][kd_sensorlist][CAMERA_HW_Open] .(2)[510:mediaserver][kd_sensorlist][kdSetDriver] pDrvIndex:0x00000000/0x000200ff
[ 26.942804] <0>.(2)[510:mediaserver][kd_sensorlist][kdSetDriver] g_invokeSocketIdx[1]=2,drvIdx[1]=255
[ 26.942839] <0>.(2)[510:mediaserver][kd_sensorlist][kd_MultiSensorGetResolution] g_bEnableDriver[0][0]
[ 26.942907] <0>.(2)[510:mediaserver][kd_sensorlist][kd_MultiSensorGetResolution] g_bEnableDriver[0][0]
[ 26.943143] <0>.(2)[510:mediaserver][kd_sensorlist][CAMERA_HW_Open] .(2)[510:mediaserver][kd_sensorlist][kdSetDriver] pDrvIndex:0x00010003/0x00000000
[ 26.943156] <0>.(2)[510:mediaserver][kd_sensorlist][kdSetDriver] g_invokeSocketIdx[0]=1,drvIdx[0]=3
[ 26.943161] <0>.(2)[510:mediaserver][kd_sensorlist][kdSetDriver] [0][1][1][gc2023mipiraw]
[ 26.943195] <0>.(2)[510:mediaserver][kd_sensorlist][kd_MultiSensorGetResolution] g_bEnableDriver[1][0]
[ 26.943199] <0>.(2)[510:mediaserver]++++++++++get_resolution( finished+++++++++++++
[ 26.943232] <0>.(2)[510:mediaserver]++++++++++feature_control( finished+++++++++++++
[ 26.943239] <0>.(2)[510:mediaserver]++++++++++feature_control( finished+++++++++++++
[ 26.946957] <0>.(2)[510:mediaserver][CAMERA_HW] ffffffc02617dc80 ffffffc02617dc40 ffffffc02617dc80
[ 26.946963] <0>.(2)[510:mediaserver]++++++++++feature_control( finished+++++++++++++
[ 26.946973] <0>.(2)[510:mediaserver][CAMERA_HW] ffffffc02617dc80 ffffffc02617dc40 ffffffc02617dc80
[ 26.946976] <0>.(2)[510:mediaserver]++++++++++feature_control( finished+++++++++++++
[ 26.946984] <0>.(2)[510:mediaserver][CAMERA_HW] ffffffc02617dc80 ffffffc02617dc40 ffffffc02617dc80
[ 26.946988] <0>.(2)[510:mediaserver]++++++++++feature_control( finished+++++++++++++
[ 26.946996] <0>.(2)[510:mediaserver][CAMERA_HW] ffffffc02617dc80 ffffffc02617dc40 ffffffc02617dc80
[ 26.946999] <0>.(2)[510:mediaserver]++++++++++feature_control( finished+++++++++++++
[ 26.947006] <0>.(2)[510:mediaserver][CAMERA_HW] ffffffc02617dc80 ffffffc02617dc40 ffffffc02617dc80
[ 26.947009] <0>.(2)[510:mediaserver]++++++++++feature_control( finished+++++++++++++
[ 26.947017] <0>.(2)[510:mediaserver][CAMERA_HW] ffffffc02617dc80 ffffffc02617dc40 ffffffc02617dc80
[ 26.947020] <0>.(2)[510:mediaserver]++++++++++feature_control( finished+++++++++++++
[ 26.947028] <0>.(2)[510:mediaserver][CAMERA_HW] ffffffc02617dc80 ffffffc02617dc40 ffffffc02617dc80
[ 26.947031] <0>.(2)[510:mediaserver]++++++++++feature_control( finished+++++++++++++
[ 26.947038] <0>.(2)[510:mediaserver][CAMERA_HW] ffffffc02617dc80 ffffffc02617dc40 ffffffc02617dc80
[ 26.947042] <0>.(2)[510:mediaserver]++++++++++feature_control( finished+++++++++++++
[ 26.947049] <0>.(2)[510:mediaserver][CAMERA_HW] ffffffc02617dc80 ffffffc02617dc40 ffffffc02617dc80
[ 26.947053] <0>.(2)[510:mediaserver]++++++++++feature_control( finished+++++++++++++
[ 26.947060] <0>.(2)[510:mediaserver][CAMERA_HW] ffffffc02617dc80 ffffffc02617dc40 ffffffc02617dc80
[ 26.947063] <0>.(2)[510:mediaserver]++++++++++feature_control( finished+++++++++++++
[ 26.947241] <0>.(2)[510:mediaserver][kd_sensorlist][CAMERA_HW_Open] .(2)[510:mediaserver][kd_sensorlist][kdSetDriver] pDrvIndex:0x00000000/0x000200ff
[ 26.947257] <0>.(2)[510:mediaserver][kd_sensorlist][kdSetDriver] g_invokeSocketIdx[1]=2,drvIdx[1]=255
[ 26.947293] <0>.(2)[510:mediaserver][kd_sensorlist][kd_MultiSensorGetResolution] g_bEnableDriver[0][0]
[ 26.947404] <0>.(2)[510:mediaserver]jinsong *pflag:0 *pFeaturePara:0
[ 26.947406] <0>.(2)[510:mediaserver][CAMERA_HW] ffffffc02617dc80 ffffffc02617dc40 ffffffc02617dc80
[ 26.947414] <0>.(2)[510:mediaserver][CAMERA_HW] ffffffc02617dc80 ffffffc02617dc40 ffffffc02617dc80
[ 26.947422] <0>.(2)[510:mediaserver][CAMERA_HW] ffffffc02617dc80 ffffffc02617dc40 ffffffc02617dc80
[ 26.947429] <0>.(2)[510:mediaserver][CAMERA_HW] ffffffc02617dc80 ffffffc02617dc40 ffffffc02617dc80
[ 26.947437] <0>.(2)[510:mediaserver][CAMERA_HW] ffffffc02617dc80 ffffffc02617dc40 ffffffc02617dc80
[ 26.947445] <0>.(2)[510:mediaserver][CAMERA_HW] ffffffc02617dc80 ffffffc02617dc40 ffffffc02617dc80
[ 26.947452] <0>.(2)[510:mediaserver][CAMERA_HW] ffffffc02617dc80 ffffffc02617dc40 ffffffc02617dc80
[ 26.947460] <0>.(2)[510:mediaserver][CAMERA_HW] ffffffc02617dc80 ffffffc02617dc40 ffffffc02617dc80
[ 26.947468] <0>.(2)[510:mediaserver][CAMERA_HW] ffffffc02617dc80 ffffffc02617dc40 ffffffc02617dc80
[ 26.947475] <0>.(2)[510:mediaserver][CAMERA_HW] ffffffc02617dc80 ffffffc02617dc40 ffffffc02617dc80
[ 26.949006] <0>.(1)[726:EVDOReadThread][C2K MODEM] check_port 344: port0 func NULL
[ 27.012508] <0>.(0)[370:Binder_1]BOOTPROF: 27012.496064: OFF
[ 27.018280] <2>.(2)[17:kworker/2:0][CNN][WMT_EXP-6625][I]_mtk_wcn_wmt_therm_ctrl: OPID(15) type(1) start
[ 27.019532] <0>-(0)[269:mtk_stp_psm][CNN][WMT_PLAT-6625][D]wmt_plat_eirq_ctrl:WMT-PLAT:BGFInt (dis)
[ 27.036746] <2>.(2)[1669:RenderThread]Dump cpuinfo
[ 27.048321] <2>.(2)[17:kworker/2:0][CNN][STP_PSM-6625][I]_stp_psm_do_wait: STP is waiting state for ACT, i=1, state = 0
[ 27.051220] <2>.(2)[17:kworker/2:0][CNN][WMT_EXP-6625][I]_mtk_wcn_wmt_therm_ctrl: OPID(15) type(1) return(1) ok
[ 27.051220] <2>
[ 27.052720] <2>.(2)[17:kworker/2:0][CNN][WMT_EXP-6625][I]_mtk_wcn_wmt_therm_ctrl: OPID(15) type(2) start
[ 27.059035] <2>.(2)[17:kworker/2:0][CNN][WMT_EXP-6625][I]_mtk_wcn_wmt_therm_ctrl: OPID(15) type(2) return(31) ok
[ 27.059035] <2>
[ 27.059503] <2>.(1)[726:EVDOReadThread][C2K MODEM] check_port 344: port0 func NULL
[ 27.064992] <2>.(2)[17:kworker/2:0][CNN][WMT_EXP-6625][I]_mtk_wcn_wmt_therm_ctrl: OPID(15) type(3) start
[ 27.084003] <2>.(2)[17:kworker/2:0][CNN][WMT_EXP-6625][I]_mtk_wcn_wmt_therm_ctrl: OPID(15) type(3) return(1) ok
[ 27.084003] <2>
[ 27.087734] <2>.(2)[17:kworker/2:0][CNN][WMT_DEV-6625][I]wmt_dev_tm_temp_query: [Thermal] current_temp = 0x1f
[ 27.108221] <2>.(2)[1829:Thread-70][CNN][STP_PSM-6625][I]_stp_psm_stp_is_idle: **IDLE is over 30 msec, go to sleep!!!**
[ 27.109678] <2>-(2)[269:mtk_stp_psm][CNN][WMT_PLAT-6625][D]wmt_plat_eirq_ctrl:WMT-PLAT:BGFInt (en)
[ 27.138634] <1>.(1)[248:logd.auditd]type=1400 audit(1262304032.510:5): avc: granted { remove_name } for pid=1688 comm="bileVideoConfig" name="mobilevideocfg.xml" dev="mmcblk0p27" ino=32775 scontext=u:r:system_app:s0 tcontext=u:object_r:system_data_file:s0 tclass=dir
[ 27.141852] <1>.(1)[248:logd.auditd]type=1400 audit(1262304032.510:6): avc: granted { rename } for pid=1688 comm="bileVideoConfig" name="mobilevideocfg.xml" dev="mmcblk0p27" ino=32775 scontext=u:r:system_app:s0 tcontext=u:object_r:system_data_file:s0 tclass=file
[ 27.144922] <1>.(1)[248:logd.auditd]type=1400 audit(1262304032.510:7): avc: granted { add_name } for pid=1688 comm="bileVideoConfig" name="mobilevideocfg.xml.bak" scontext=u:r:system_app:s0 tcontext=u:object_r:system_data_file:s0 tclass=dir
[ 27.151236] <1>.(1)[248:logd.auditd]type=1400 audit(1262304032.520:8): avc: granted { add_name } for pid=1688 comm="bileVideoConfig" name="mobilevideocfg.xml" scontext=u:r:system_app:s0 tcontext=u:object_r:system_data_file:s0 tclass=dir
[ 27.154312] <2>.(2)[244:logd.writer]logd:diff time 2944296846, run time 92182293, count 5000,step 1 5829,2 1307,3 6967,4 4332. filter count 0.
[ 27.154484] <2>.(1)[248:logd.auditd]logd:diff time 2944503154, run time 92198139, count 5001,step 1 5829,2 1307,3 6966,4 4331. filter count 0.
[ 27.154556] <2>.(1)[248:logd.auditd]type=1400 audit(1262304032.520:9): avc: granted { create } for pid=1688 comm="bileVideoConfig" name="mobilevideocfg.xml" scontext=u:r:system_app:s0 tcontext=u:object_r:system_data_file:s0 tclass=file
[ 27.154647] <2>.(1)[248:logd.auditd]type=1400 audit(1262304032.520:10): avc: granted { write } for pid=1688 comm="bileVideoConfig" path="/data/misc/mobilevideo/mobilevideocfg.xml" dev="mmcblk0p27" ino=32778 scontext=u:r:system_app:s0 tcontext=u:object_r:system_data_file:s0 tclass=file
[ 27.170030] <1>.(1)[726:EVDOReadThread][C2K MODEM] check_port 344: port0 func NULL
[ 27.220868] <0>.(0)[1840:initCamdevice][kd_sensorlist][CAMERA_HW_Open] .(0)[1840:initCamdevice][kd_sensorlist][CAMERA_HW_Open] .(0)[1840:initCamdevice][kd_sensorlist][kdSetDriver] pDrvIndex:0x00010003/0x00000000
[ 27.224137] <0>.(0)[1840:initCamdevice][kd_sensorlist][kdSetDriver] g_invokeSocketIdx[0]=1,drvIdx[0]=3
[ 27.225295] <0>.(0)[1840:initCamdevice][kd_sensorlist][kdSetDriver] [0][1][1][gc2023mipiraw]
[ 27.226418] <0>.(0)[1840:initCamdevice][kd_sensorlist][kd_MultiSensorGetResolution] g_bEnableDriver[1][0]
[ 27.228405] <3>.(3)[1840:initCamdevice]++++++++++get_resolution( finished+++++++++++++
[ 27.229915] <3>.(3)[1840:initCamdevice]++++++++++feature_control( finished+++++++++++++
[ 27.231170] <3>.(3)[1840:initCamdevice]++++++++++feature_control( finished+++++++++++++
[ 27.232865] <0>.(0)[1840:initCamdevice][PowerON]pinSetIdx:0, currSensorName: gc2023mipiraw
[ 27.234233] <3>.(3)[1840:initCamdevice]kdCISModulePowerOn GpioPowerCount 1
[ 27.240625] <0>.(0)[1328:Binder_2]M4Uconfig_port:CAM_IMGO,v1,s0
[ 27.241414] <0>.(0)[1328:Binder_2]M4Uconfig_port:CAM_RRZO,v1,s0
[ 27.242158] <0>.(0)[1328:Binder_2]M4Uconfig_port:CAM_AAO,v1,s0
[ 27.242892] <0>.(0)[1328:Binder_2]M4Uconfig_port:CAM_ESFKO,v1,s0
[ 27.246313] <0>.(0)[1328:Binder_2]M4Uconfig_port:CAM_IMGO_S,v1,s0
[ 27.247082] <0>.(0)[1328:Binder_2]M4Uconfig_port:CAM_LSCI,v1,s0
[ 27.247819] <0>.(0)[1328:Binder_2]M4Uconfig_port:CAM_LSCI_D,v1,s0
[ 27.248923] <0>.(0)[1328:Binder_2]M4Uconfig_port:CAM_BPCI,v1,s0
[ 27.249681] <0>.(0)[1328:Binder_2]M4Uconfig_port:CAM_BPCI_D,v1,s0
[ 27.251580] <0>.(0)[1328:Binder_2]M4Uconfig_port:CAM_UFDI,v1,s0
[ 27.252503] <0>.(0)[1328:Binder_2]M4Uconfig_port:CAM_IMGI,v1,s0
[ 27.253266] <0>.(0)[1328:Binder_2]M4Uconfig_port:CAM_IMG2O,v1,s0
[ 27.254024] <0>.(0)[1328:Binder_2]M4Uconfig_port:CAM_IMG3O,v1,s0
[ 27.254903] <0>.(0)[1328:Binder_2]M4Uconfig_port:CAM_VIPI,v1,s0
[ 27.255891] <0>.(0)[1328:Binder_2]M4Uconfig_port:CAM_VIP2I,v1,s0
[ 27.256767] <0>.(0)[1328:Binder_2]M4Uconfig_port:CAM_VIP3I,v1,s0
[ 27.257665] <0>.(0)[1328:Binder_2]M4Uconfig_port:CAM_LCEI,v1,s0
[ 27.258561] <0>.(0)[1328:Binder_2]M4Uconfig_port:CAM_RB,v1,s0
[ 27.259564] <0>.(0)[1328:Binder_2]M4Uconfig_port:CAM_RP,v1,s0
[ 27.262657] <0>.(0)[1328:Binder_2]M4Uconfig_port:CAM_WR,v1,s0
[ 27.263833] <0>.(0)[1328:Binder_2][ION] error: cache_map_vm_struct is NULL, retry
[ 27.280974] <0>.(0)[1840:initCamdevice]PinIdx(0) PwrType(0) val(1)
[ 27.281574] <0>.(1)[726:EVDOReadThread][C2K MODEM] check_port 344: port0 func NULL
[ 27.283945] <0>.(0)[1840:initCamdevice]PinIdx(0) PwrType(1) val(0)
[ 27.330057] <0>.(0)[1840:initCamdevice]PinIdx(0) PwrType(0) val(0)
[ 27.330832] <0>.(0)[1840:initCamdevice]PinIdx(0) PwrType(1) val(1)
[ 27.365917] <2>.(2)[1840:initCamdevice]==========GC2023 Init End==========
[ 27.378223] <0>.(0)[1:init]init: Service 'bootanim' (pid 418) exited with status 0
[ 27.380093] <0>.(0)[1:init]init: Starting service 'atc_ipod_core'...
[ 27.392096] <1>.(1)[726:EVDOReadThread][C2K MODEM] check_port 344: port0 func NULL
[ 27.425004] <0>.(0)[1840:initCamdevice]==========GC2023 Init End==========
[ 27.425878] <0>.(0)[1840:initCamdevice]++++++++++open( finished+++++++++++++
[ 27.426799] <2>.(2)[1328:Binder_2]++++++++++feature_control( finished+++++++++++++
[ 27.427880] <2>.(2)[1328:Binder_2]++++++++++feature_control( finished+++++++++++++
[ 27.429081] <2>.(2)[1328:Binder_2]++++++++++feature_control( finished+++++++++++++
[ 27.430193] <2>.(2)[1328:Binder_2]++++++++++feature_control( finished+++++++++++++
[ 27.431281] <2>.(2)[1328:Binder_2]++++++++++feature_control( finished+++++++++++++
[ 27.434982] <2>.(2)[362:cmddumper][C2K MODEM] check_port 344: port11 func NULL
[ 27.435478] <2>.(0)[1:init]init: Starting service 'ged_srv'...
[ 27.436897] <0>.(0)[1:init]init: Starting service 'gas_srv'...
[ 27.481310] <2>.(2)[1328:Binder_2][kd_sensorlist][kdSetDriver] pDrvIndex:0x00010003/0x000200ff
[ 27.488755] <2>.(2)[1328:Binder_2][kd_sensorlist][kdSetDriver] g_invokeSocketIdx[0]=1,drvIdx[0]=3
[ 27.490276] <2>.(2)[1328:Binder_2][kd_sensorlist][kdSetDriver] [0][1][1][gc2023mipiraw]
[ 27.491554] <2>.(2)[1328:Binder_2][kd_sensorlist][kdSetDriver] g_invokeSocketIdx[1]=2,drvIdx[1]=255
[ 27.495340] <2>.(2)[1328:Binder_2][kd_sensorlist][kd_MultiSensorGetResolution] g_bEnableDriver[1][0]
[ 27.499824] <2>.(2)[1328:Binder_2]++++++++++get_resolution( finished+++++++++++++
[ 27.501129] jinsong *pflag:0 *pFeaturePara:0
[ 27.503622] <1>.(1)[726:EVDOReadThread][C2K MODEM] check_port 344: port0 func NULL
[ 27.572832] <1>.(1)[1328:Binder_2]++++++++++close( finished+++++++++++++
[ 27.573673] <1>.(1)[1328:Binder_2][PowerOFF]pinSetIdx:0 , currSensorName: gc2023mipiraw
[ 27.574722] <1>.(1)[1328:Binder_2]PinIdx(0) PwrType(1) val(0)
[ 27.575437] <1>.(1)[1328:Binder_2]PinIdx(0) PwrType(0) val(1)
[ 27.576143] <1>.(1)[1328:Binder_2]kdCISModulePowerOff GpioPowerCount 0
[ 27.615168] <1>.(1)[726:EVDOReadThread][C2K MODEM] check_port 344: port0 func NULL
[ 27.639838] <2>.(2)[291:md_monitor][md1]port ccci_mdl_monitor open with flag 20802 by md_monitor
[ 27.641073] <2>.(2)[291:md_monitor][md1]port ccci_mdl_monitor close rx_len=0 empty=1
[ 27.642033] <2>.(2)[291:md_monitor][md1]dev close check: 1 0 0 0
/*系统打开 摄像头 果然是 gc2023mipiraw*/
[ 149.189850] <2>.(3)[2441:initCamdevice][kd_sensorlist][CAMERA_HW_Open] .(3)[2441:initCamdevice][kd_sensorlist][kdSetDriver] pDrvIndex:0x00010003/0x000200ff
[ 149.190138] <2>.(3)[2441:initCamdevice][kd_sensorlist][kdSetDriver] g_invokeSocketIdx[0]=1,drvIdx[0]=3
[ 149.190143] <2>.(3)[2441:initCamdevice][kd_sensorlist][kdSetDriver] [0][1][1][gc2023mipiraw]
[ 149.190148] <2>.(3)[2441:initCamdevice][kd_sensorlist][kdSetDriver] g_invokeSocketIdx[1]=2,drvIdx[1]=255
[ 149.190190] <2>.(3)[2441:initCamdevice][kd_sensorlist][kd_MultiSensorGetResolution] g_bEnableDriver[1][0]
[ 149.190194] <2>.(3)[2441:initCamdevice]++++++++++get_resolution( finished+++++++++++++
[ 149.190233] <2>.(3)[2441:initCamdevice]++++++++++feature_control( finished+++++++++++++
[ 149.190241] <2>.(3)[2441:initCamdevice]++++++++++feature_control( finished+++++++++++++
[ 149.190681] <2>.(3)[2441:initCamdevice][PowerON]pinSetIdx:0, currSensorName: gc2023mipiraw
[ 149.190686] <2>.(3)[2441:initCamdevice]kdCISModulePowerOn GpioPowerCount 1
[ 149.201966] <2>.(2)[1328:Binder_2]M4Uconfig_port:CAM_RRZO,v1,s0
[ 149.202706] <2>.(2)[1328:Binder_2]M4Uconfig_port:CAM_AAO,v1,s0
[ 149.203432] <2>.(2)[1328:Binder_2]M4Uconfig_port:CAM_ESFKO,v1,s0
[ 149.204180] <2>.(2)[1328:Binder_2]M4Uconfig_port:CAM_IMGO_S,v1,s0
[ 149.204565] <2>.(1)[362:cmddumper][C2K MODEM] check_port 344: port11 func NULL
[ 149.205868] <2>.(2)[1328:Binder_2]M4Uconfig_port:CAM_LSCI,v1,s0
[ 149.206612] <2>.(2)[1328:Binder_2]M4Uconfig_port:CAM_LSCI_D,v1,s0
[ 149.207374] <2>.(2)[1328:Binder_2]M4Uconfig_port:CAM_BPCI,v1,s0
[ 149.208113] <2>.(2)[1328:Binder_2]M4Uconfig_port:CAM_BPCI_D,v1,s0
[ 149.209040] <2>.(2)[1328:Binder_2]M4Uconfig_port:CAM_UFDI,v1,s0
[ 149.210263] <2>.(2)[1328:Binder_2]M4Uconfig_port:CAM_IMGI,v1,s0
[ 149.211188] <2>.(2)[1328:Binder_2]M4Uconfig_port:CAM_IMG2O,v1,s0
[ 149.211942] <2>.(2)[1328:Binder_2]M4Uconfig_port:CAM_IMG3O,v1,s0
[ 149.212690] <2>.(2)[1328:Binder_2]M4Uconfig_port:CAM_VIPI,v1,s0
[ 149.213452] <2>.(2)[1328:Binder_2]M4Uconfig_port:CAM_VIP2I,v1,s0
[ 149.214200] <2>.(2)[1328:Binder_2]M4Uconfig_port:CAM_VIP3I,v1,s0
[ 149.214948] <2>.(2)[1328:Binder_2]M4Uconfig_port:CAM_LCEI,v1,s0
[ 149.215686] <2>.(2)[1328:Binder_2]M4Uconfig_port:CAM_RB,v1,s0
[ 149.216437] <2>.(2)[1328:Binder_2]M4Uconfig_port:CAM_RP,v1,s0
[ 149.217164] <2>.(2)[1328:Binder_2]M4Uconfig_port:CAM_WR,v1,s0
[ 149.234452] <3>.(3)[2441:initCamdevice]PinIdx(0) PwrType(0) val(1)
[ 149.235239] <3>.(3)[2441:initCamdevice]PinIdx(0) PwrType(1) val(0)
[ 149.256024] <3>.(3)[2441:initCamdevice]PinIdx(0) PwrType(0) val(0)
[ 149.256803] <3>.(3)[2441:initCamdevice]PinIdx(0) PwrType(1) val(1)
[ 149.263671] <1>.(1)[244:logd.writer]logd:diff time 9830983078, run time 92387775, count 5000,step 1 5101,2 1167,3 3305,4 8903. filter count 0.
[ 149.285540] <1>.(1)[726:EVDOReadThread][C2K MODEM] check_port 344: port0 func NULL
[ 149.288907] <3>.(3)[2441:initCamdevice]==========GC2023 Init End==========
[ 149.319804] <0>.(0)[49:pmic_thread][PWRAP] clear EINT flag mt_pmic_wrap_eint_status=0x0
[ 149.329763] <1>.(1)[49:pmic_thread][PWRAP] clear EINT flag mt_pmic_wrap_eint_status=0x0
[ 149.339005] <2>.(2)[2441:initCamdevice]==========GC2023 Init End==========
[ 149.339982] <2>.(2)[2441:initCamdevice]++++++++++open( finished+++++++++++++
[ 149.340898] <3>.(3)[1328:Binder_2][kd_sensorlist][kdSetDriver] pDrvIndex:0x00010003/0x000200ff
[ 149.341975] <3>.(3)[1328:Binder_2][kd_sensorlist][kdSetDriver] g_invokeSocketIdx[0]=1,drvIdx[0]=3
[ 149.343502] <3>.(3)[1328:Binder_2][kd_sensorlist][kdSetDriver] [0][1][1][gc2023mipiraw]
[ 149.344496] <3>.(3)[1328:Binder_2][kd_sensorlist][kdSetDriver] g_invokeSocketIdx[1]=2,drvIdx[1]=255
[ 149.345712] <3>.(3)[1328:Binder_2][kd_sensorlist][kd_MultiSensorGetResolution] g_bEnableDriver[1][0]
[ 149.346845] <3>.(3)[1328:Binder_2]++++++++++get_resolution( finished+++++++++++++
...
[ 149.518249] <0>-(1)[269:mtk_stp_psm][CNN][WMT_PLAT-6625][D]wmt_plat_eirq_ctrl:WMT-PLAT:BGFInt (en)
[ 149.525911] <0>.(0)[900:Binder_1][CAMERA_HW] ffffffc00c4d2a00 ffffffc00c4d2b00 ffffffc00c4d2a00
[ 149.526993] <0>.(0)[900:Binder_1]++++++++++feature_control( finished+++++++++++++
[ 149.569530] <1>.(1)[900:Binder_1]++++++++++feature_control( finished+++++++++++++
[ 149.570475] <1>.(1)[900:Binder_1]++++++++++feature_control( finished+++++++++++++
[ 149.571402] <1>.(1)[900:Binder_1]++++++++++feature_control( finished+++++++++++++
[ 149.572337] <1>.(1)[900:Binder_1]++++++++++preview( finished+++++++++++++
[ 149.574315] <0>.(0)[900:Binder_1]++++++++++control( finished+++++++++++++
[ 149.575183] <0>.(0)[900:Binder_1]++++++++++feature_control( finished+++++++++++++
[ 149.576120] <0>.(0)[900:Binder_1]++++++++++feature_control( finished+++++++++++++
[ 149.590139] <2>.(2)[2445:3ATHREAD]++++++++++feature_control( finished+++++++++++++
[ 149.593955] <0>.(0)[2478:pass1_allocP1][ION][ion_dbg] alloc_pages order=1 cache=1
[ 149.593960] <0>.(1)[2476:pass2][ION][ion_dbg] alloc_pages order=1 cache=1
[ 149.613984] <2>.(2)[2445:3ATHREAD]=============set_shutter shutter = 106================
[ 149.614993] <2>.(2)[2445:3ATHREAD]++++++++++feature_control( finished+++++++++++++
[ 149.617809] <2>.(2)[2445:3ATHREAD]=============set_gain iGain = 64, temp = 64================
[ 149.619025] <2>.(2)[2445:3ATHREAD]++++++++++feature_control( finished+++++++++++++
[ 149.620069] <0>.(0)[726:EVDOReadThread][C2K MODEM] check_port 344: port0 func NULL
[ 149.623621] <2>.(2)[2445:3ATHREAD]++++++++++feature_control( finished+++++++++++++
[ 149.628809] <3>.(3)[2445:3ATHREAD]++++++++++feature_control( finished+++++++++++++
[ 149.632190] <3>.(3)[2478:pass1_allocP1][ION][ion_dbg] alloc_pages order=1 cache=1
[ 149.637557] <3>.(3)[2445:3ATHREAD]++++++++++feature_control( finished+++++++++++++
[ 149.638606] <3>.(3)[2445:3ATHREAD]++++++++++feature_control( finished+++++++++++++
[ 149.651777] <3>.(3)[2476:pass2][ION][ion_dbg] alloc_pages order=1 cache=1
[ 149.665689] <0>.(0)[2478:pass1_allocP1][ION][ion_dbg] alloc_pages order=1 cache=1
[ 149.689945] <3>.(3)[2476:pass2][ION][ion_dbg] alloc_pages order=1 cache=1
[ 149.704764] <0>.(0)[362:cmddumper][C2K MODEM] check_port 344: port11 func NULL
[ 149.708670] <0>.(0)[2478:pass1_allocP1][ION][ion_dbg] alloc_pages order=1 cache=1
[ 149.717262] <0>.(0)[2478:pass1_allocP1][ION][ion_dbg] alloc_pages order=1 cache=1
[ 149.731542] <0>.(0)[726:EVDOReadThread][C2K MODEM] check_port 344: port0 func NULL
[ 149.740149] <1>.(1)[88:hps_main][HPS] (0000)(4)DBG_HRT(349)(412)(0)(0) (4)(4)(4)(4)(4) (0)(0)(0) (1025)(3)(3) (0)(412)(3)(0)(412) wifi_base(0)
[ 149.842910] <0>.(0)[726:EVDOReadThread][C2K MODEM] check_port 344: port0 func NULL
[ 149.847215] <0>.(0)[2445:3ATHREAD]++++++++++feature_control( finished+++++++++++++
[ 149.856282] <0>.(0)[2445:3ATHREAD]++++++++++feature_control( finished+++++++++++++
[ 149.877636] <2>.(2)[1514:Binder_3][ION][ion_dbg] alloc_pages order=1 cache=0
[ 149.881977] <0>.(0)[2445:3ATHREAD]++++++++++feature_control( finished+++++++++++++
[ 149.914449] <2>.(2)[372:Binder_2][ION][ion_dbg] alloc_pages order=1 cache=0
[ 149.920293] <0>.(0)[2445:3ATHREAD]++++++++++feature_control( finished+++++++++++++
[ 149.926357] <3>.(3)[2479:AESenThd]++++++++++feature_control( finished+++++++++++++
[ 149.928397] <0>.(0)[2479:AESenThd]=============set_shutter shutter = 106================
[ 149.929444] <0>.(0)[2479:AESenThd]++++++++++feature_control( finished+++++++++++++
[ 149.932604] <0>.(0)[2479:AESenThd]=============set_gain iGain = 64, temp = 64================
[ 149.933676] <0>.(0)[2479:AESenThd]++++++++++feature_control( finished+++++++++++++
[ 149.953536] AEE_MONITOR_SET[status]: 0x1
[ 149.954322] <0>.(0)[726:EVDOReadThread][C2K MODEM] check_port 344: port0 func NULL
[ 149.960093] <0>.(0)[2445:3ATHREAD]++++++++++feature_control( finished+++++++++++++
[ 150.000675] <0>.(0)[2445:3ATHREAD]++++++++++feature_control( finished+++++++++++++
[ 150.005813] <0>.(0)[2479:AESenThd]=============set_shutter shutter = 338================
[ 150.006823] <0>.(0)[2479:AESenThd]++++++++++feature_control( finished+++++++++++++
[ 150.009748] <1>.(1)[2479:AESenThd]=============set_gain iGain = 208, temp = 74================
[ 150.010828] <1>.(1)[2479:AESenThd]++++++++++feature_control( finished+++++++++++++
[ 150.040327] <0>.(0)[2445:3ATHREAD]++++++++++feature_control( finished+++++++++++++
[ 150.059252] <2>.(2)[291:md_monitor][md1]port ccci_mdl_monitor open with flag 20802 by md_monitor
[ 150.060455] <2>.(2)[291:md_monitor][md1]port ccci_mdl_monitor close rx_len=0 empty=1
[ 150.061413] <2>.(2)[291:md_monitor][md1]dev close check: 1 0 0 0
[ 150.065712] <0>.(0)[726:EVDOReadThread][C2K MODEM] check_port 344: port0 func NULL
[ 150.080277] <0>.(0)[2445:3ATHREAD]++++++++++feature_control( finished+++++++++++++
[ 150.121012] <0>.(0)[2445:3ATHREAD]++++++++++feature_control( finished+++++++++++++
[ 150.125708] <2>.(2)[2479:AESenThd]=============set_shutter shutter = 676================
[ 150.126720] <2>.(2)[2479:AESenThd]++++++++++feature_control( finished+++++++++++++
[ 150.129658] <0>.(0)[2479:AESenThd]=============set_gain iGain = 128, temp = 64================
[ 150.130737] <0>.(0)[2479:AESenThd]++++++++++feature_control( finished+++++++++++++
[ 150.150432] <0>-(0)[975:AlarmManager]alarmtimer_enqueue, 210082000000
[ 150.160308] <0>.(0)[2445:3ATHREAD]++++++++++feature_control( finished+++++++++++++
......
......