本文整理汇总了C++中CAM_INFO函数的典型用法代码示例。如果您正苦于以下问题:C++ CAM_INFO函数的具体用法?C++ CAM_INFO怎么用?C++ CAM_INFO使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了CAM_INFO函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: icp_hd_reset
static int icp_hd_reset(int set)
{
int rc = 0;
rc = gpio_tlmm_config(GPIO_CFG(SENSOR_RESET_8M, 0, GPIO_CFG_OUTPUT, GPIO_CFG_NO_PULL, GPIO_CFG_2MA),GPIO_CFG_ENABLE);
if (!rc) {
CAM_INFO("%s %s:%d\n", __FILE__, __func__, __LINE__);
gpio_set_value(SENSOR_RESET_8M,0);
if(set){
gpio_set_value(SENSOR_RESET_8M,1);
}
}
else{
CAM_ERR("icp_hd_reset gpio_tlmm_config Failed!\n");
goto reset_fail;
}
CAM_INFO("%s %s Success:%d\n", __FILE__, __func__, __LINE__);
return rc;
reset_fail:
CAM_ERR("%s %s Failed!:%d\n", __FILE__, __func__, __LINE__);
return rc;
}
示例2: s5k6aafx13_reset
static int s5k6aafx13_reset(int set)//const struct msm_camera_sensor_info *dev)
{
int rc = 0;
//rc = gpio_request(dev->sensor_reset, "s5k6aafx13");
rc = gpio_tlmm_config(GPIO_CFG(SENSOR_RESET, 0, GPIO_CFG_OUTPUT, GPIO_CFG_NO_PULL, GPIO_CFG_2MA),GPIO_CFG_ENABLE);
if (!rc) {
CAM_INFO("%s %s:%d\n", __FILE__, __func__, __LINE__);
gpio_set_value(SENSOR_RESET,0);
//rc = gpio_direction_output(137, 0);
mdelay(20);
if(set) {
gpio_set_value(SENSOR_RESET,1);
}
//rc = gpio_direction_output(137, 1);
}
//standby
rc = gpio_tlmm_config(GPIO_CFG(SENSOR_STANDBY, 0, GPIO_CFG_OUTPUT, GPIO_CFG_NO_PULL, GPIO_CFG_2MA),GPIO_CFG_ENABLE);
if (!rc) {
CAM_INFO("%s %s:%d\n", __FILE__, __func__, __LINE__);
gpio_set_value(SENSOR_STANDBY,set);
//rc = gpio_direction_output(137, 0);
mdelay(20);
}
//gpio_free(dev->sensor_reset);
return rc;
}
示例3: s5k6aafx13_vreg_init
static int s5k6aafx13_vreg_init()
{
int rc;
CAM_INFO("%s %s:%d\n", __FILE__, __func__, __LINE__);
#if 0
lvs3b_1p8v = regulator_get(NULL, "8901_mvs0");//"8901_lvs3");
if (IS_ERR(lvs3b_1p8v)) {
CAM_ERR("regulator_get lvs2b_1p8v fail\n" );;
return -ENODEV;
}
lvs2b_1p8v = regulator_get(NULL, "8901_lvs2");
if (IS_ERR(lvs2b_1p8v)) {
CAM_ERR("regulator_get lvs2b_1p8v fail\n" );;
return -ENODEV;
}
#endif
l1b_2p8v = regulator_get(NULL, "8901_l1");
if (IS_ERR(l1b_2p8v)) {
CAM_ERR("regulator_get l1b_2p8v fail\n" );;
return -ENODEV;
}
rc = regulator_set_voltage(l1b_2p8v, 2800000, 2800000);
if (rc) {
CAM_ERR("%s: unable to set l1b_2p8v voltage to 2.8V\n", __func__);
goto fail;
}
l15a_1p5v = regulator_get(NULL, "8058_l15");
if (IS_ERR(l15a_1p5v)) {
CAM_ERR("regulator_get l15a_1p5v fail\n" );;
return -ENODEV;
}
rc = regulator_set_voltage(l15a_1p5v, 1500000, 1500000);
if (rc) {
CAM_ERR("%s: unable to set l15a_1p5v voltage to 1.5V\n", __func__);
goto fail;
}
lvs1b_1p8v = regulator_get(NULL, "8901_lvs1");
if (IS_ERR(lvs1b_1p8v)) {
CAM_ERR("regulator_get lvs1b_1p8v fail\n" );;
return -ENODEV;
}
CAM_INFO("%s %s:%d\n", __FILE__, __func__, __LINE__);
return rc;
fail:
CAM_INFO("%s %s:%d\n", __FILE__, __func__, __LINE__);
if(l15a_1p5v) {
regulator_put(l15a_1p5v);
}
if(l1b_2p8v) {
regulator_put(l1b_2p8v);
}
return rc;
}
示例4: mt9v113_power
static int mt9v113_power(int on)
{
int rc = 0;
int status = 0;
//CAM_INFO("%s %s:%d power = %d\n", __FILE__, __func__, __LINE__,on);
if(on) {
rc = regulator_enable(lvs3b_1p8v);
if (rc) {
CAM_ERR("%s: Enable regulator lvs3b_1p8v failed\n", __func__);
goto fail;
}
msleep(1);
rc = regulator_enable(lvs1b_1p8v);
if (rc) {
CAM_ERR("%s: Enable regulator lvs1b_1p8v failed\n", __func__);
goto fail;
}
msleep(1);
rc = regulator_enable(l15a_2p8v);
if (rc) {
CAM_ERR("%s: Enable regulator l15a_2p8v failed\n", __func__);
goto fail;
}
msleep(1);
}
else {
rc = regulator_disable(l15a_2p8v);
if (rc)
CAM_INFO("%s: Disable regulator l15a_2p8v failed\n", __func__);
regulator_put(l15a_2p8v);
rc = regulator_disable(lvs3b_1p8v);
if (rc)
CAM_ERR("%s: Disable regulator lvs3b_1p8v failed\n", __func__);
rc = regulator_disable(lvs1b_1p8v);
if (rc)
CAM_ERR("%s: Disable regulator lvs1b_1p8v failed\n", __func__);
}
//CAM_INFO("%s %s:%d\n", __FILE__, __func__, __LINE__);
status = gpio_tlmm_config(GPIO_CFG(SENSOR_RESET, 0, GPIO_CFG_OUTPUT, GPIO_CFG_NO_PULL, GPIO_CFG_2MA),GPIO_CFG_ENABLE);
if (!status)
{
//CAM_INFO("%s %s:%d\n", __FILE__, __func__, __LINE__);
gpio_set_value(SENSOR_RESET,0);
}
return rc;
fail:
CAM_INFO("%s %s:%d\n", __FILE__, __func__, __LINE__);
if(l15a_2p8v)
regulator_put(l15a_2p8v);
return rc;
}