本文整理汇总了C++中camera_sensor_power_disable函数的典型用法代码示例。如果您正苦于以下问题:C++ camera_sensor_power_disable函数的具体用法?C++ camera_sensor_power_disable怎么用?C++ camera_sensor_power_disable使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了camera_sensor_power_disable函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ville_s5k3h2yx_vreg_on
static int ville_s5k3h2yx_vreg_on(void)
{
int rc = 0;
pr_info("%s\n", __func__);
#if 0
/* VCM */
rc = camera_sensor_power_enable("8921_l9", 2800000, ®_8921_l9);
if (rc < 0) {
pr_err("sensor_power_enable(\"8921_l9\", 2.85V) FAILED %d\n", rc);
goto enable_vcm_fail;
}
/* redundant setting...enable at rawchip */
/* IO */
rc = camera_sensor_power_enable("8921_lvs6", 1800000, ®_8921_lvs6);
if (rc < 0) {
pr_err("sensor_power_enable(\"8921_lvs6\", 1.8V) FAILED %d\n", rc);
goto enable_io_fail;
}
/* analog */
rc = camera_sensor_power_enable("8921_l8", 2800000, ®_8921_l8);
if (rc < 0) {
pr_err("sensor_power_enable(\"8921_l8\", 2.8V) FAILED %d\n", rc);
goto enable_analog_fail;
}
udelay(50);
/* redundant setting...enable at rawchip */
/* digital */
rc = gpio_request(VILLE_GPIO_V_CAM_D1V2_EN, "CAM_D1V2_EN");
if (rc < 0) {
pr_err("sensor_power_enable(\"gpio %d\", 1.2V) FAILED %d\n", VILLE_GPIO_V_CAM_D1V2_EN, rc);
goto enable_digital_fail;
}
gpio_direction_output(VILLE_GPIO_V_CAM_D1V2_EN, 1);
gpio_free(VILLE_GPIO_V_CAM_D1V2_EN);
rc = gpio_request(VILLE_GPIO_V_LCMIO_1V8_EN, "CAM_D1V8_EN");
if (rc < 0) {
pr_err("%s:GPIO_CAM_D1V8_EN gpio %d request failed, rc=%d\n", __func__, VILLE_GPIO_V_LCMIO_1V8_EN, rc);
goto enable_digital_fail;
}
gpio_direction_output(VILLE_GPIO_V_LCMIO_1V8_EN, 1);
gpio_free(VILLE_GPIO_V_LCMIO_1V8_EN);
return rc;
enable_digital_fail:
camera_sensor_power_disable(reg_8921_l8);
enable_analog_fail:
camera_sensor_power_disable(reg_8921_lvs6);
enable_io_fail:
camera_sensor_power_disable(reg_8921_l9);
enable_vcm_fail:
#endif
return rc;
}
示例2: elite_s5k3h2yx_vreg_on
static int elite_s5k3h2yx_vreg_on(void)
{
int rc = 0;
pr_info("%s\n", __func__);
#if 0
rc = camera_sensor_power_enable("8921_l9", 2800000, ®_8921_l9);
if (rc < 0) {
pr_err("sensor_power_enable(\"8921_l9\", 2.85V) FAILED %d\n", rc);
goto enable_vcm_fail;
}
rc = camera_sensor_power_enable("8921_lvs6", 1800000, ®_8921_lvs6);
if (rc < 0) {
pr_err("sensor_power_enable(\"8921_lvs6\", 1.8V) FAILED %d\n", rc);
goto enable_io_fail;
}
rc = camera_sensor_power_enable("8921_l8", 2800000, ®_8921_l8);
if (rc < 0) {
pr_err("sensor_power_enable(\"8921_l8\", 2.8V) FAILED %d\n", rc);
goto enable_analog_fail;
}
udelay(50);
rc = gpio_request(ELITE_GPIO_V_CAM_D1V2_EN, "CAM_D1V2_EN");
if (rc < 0) {
pr_err("sensor_power_enable(\"gpio %d\", 1.2V) FAILED %d\n", ELITE_GPIO_V_CAM_D1V2_EN, rc);
goto enable_digital_fail;
}
gpio_direction_output(ELITE_GPIO_V_CAM_D1V2_EN, 1);
gpio_free(ELITE_GPIO_V_CAM_D1V2_EN);
rc = gpio_request(ELITE_GPIO_V_LCMIO_1V8_EN, "CAM_D1V8_EN");
if (rc < 0) {
pr_err("%s:GPIO_CAM_D1V8_EN gpio %d request failed, rc=%d\n", __func__, ELITE_GPIO_V_LCMIO_1V8_EN, rc);
goto enable_digital_fail;
}
gpio_direction_output(ELITE_GPIO_V_LCMIO_1V8_EN, 1);
gpio_free(ELITE_GPIO_V_LCMIO_1V8_EN);
return rc;
enable_digital_fail:
camera_sensor_power_disable(reg_8921_l8);
enable_analog_fail:
camera_sensor_power_disable(reg_8921_lvs6);
enable_io_fail:
camera_sensor_power_disable(reg_8921_l9);
enable_vcm_fail:
#endif
return rc;
}
示例3: msm8930_ov5693_vreg_off
static int msm8930_ov5693_vreg_off(void)
{
int rc = 0;
pr_info("%s\n", __func__);
/* analog */
rc = camera_sensor_power_disable(reg_8038_l8);
pr_info("sensor_power_disable(\"8038_l8\") == %d\n", rc);
if (rc < 0)
pr_err("sensor_power_disable\(\"8038_l8\") FAILED %d\n", rc);
udelay(50);
/* IO */
rc = gpio_request(CAM_PIN_GPIO_V_CAMIO_1V8_EN, "V_CAMIO_1V8_EN");
pr_info("cam io gpio_request, %d\n", CAM_PIN_GPIO_V_CAMIO_1V8_EN);
if (rc < 0)
pr_err("GPIO(%d) request failed", CAM_PIN_GPIO_V_CAMIO_1V8_EN);
else {
gpio_direction_output(CAM_PIN_GPIO_V_CAMIO_1V8_EN, 0);
gpio_free(CAM_PIN_GPIO_V_CAMIO_1V8_EN);
}
udelay(50);
/* VCM */
if (reg_8038_l17 != NULL)
regulator_set_optimum_mode(reg_8038_l17, 9000);
rc = camera_sensor_power_disable(reg_8038_l17);
pr_info("sensor_power_disable(\"8038_l17\") == %d\n", rc);
if (rc < 0)
pr_err("sensor_power_disable\(\"8038_l17\") FAILED %d\n", rc);
return rc;
}
示例4: ville_mt9v113_vreg_off
static int ville_mt9v113_vreg_off(void)
{
int rc;
pr_info("%s\n", __func__);
/* Reset */
rc = gpio_request(VILLE_GPIO_CAM2_RSTz, "mt9v113");
if (rc < 0) {
pr_err("%s:VILLE_GPIO_CAM2_RSTz gpio %d request failed, rc=%d\n", __func__, VILLE_GPIO_CAM2_RSTz, rc);
goto init_fail;
}
gpio_direction_output(VILLE_GPIO_CAM2_RSTz, 0);
msleep(2);
gpio_free(VILLE_GPIO_CAM2_RSTz);
udelay(50);
/* disable clock here */
/* IO */
rc = gpio_request(VILLE_GPIO_V_LCMIO_1V8_EN, "CAM_D1V8_EN");
pr_info("ville_mt9v113_vreg_off %d 1v8\n", VILLE_GPIO_V_LCMIO_1V8_EN);
if (rc < 0) {
pr_err("%s:GPIO_CAM_D1V8_EN gpio %d request failed, rc=%d\n", __func__, VILLE_GPIO_V_LCMIO_1V8_EN, rc);
goto init_fail;
}
gpio_direction_output(VILLE_GPIO_V_LCMIO_1V8_EN, 0);
gpio_free(VILLE_GPIO_V_LCMIO_1V8_EN);
udelay(50);
/* analog */
rc = camera_sensor_power_disable(reg_8921_l8);
pr_info("camera_sensor_power_disable(\"8921_l8\", 2.8V) == %d\n", rc);
if (rc < 0)
goto init_fail;
udelay(50);
/* digital */
rc = camera_sensor_power_disable(reg_8921_lvs6);
pr_info("camera_sensor_power_disable(\"8921_lvs6\", 1.8V) == %d\n", rc);
if (rc < 0)
goto init_fail;
udelay(50);
/* VCM */
rc = camera_sensor_power_disable(reg_8921_l9);
if (rc < 0) {
pr_err("sensor_power_disable(\"8921_l9\") FAILED %d\n", rc);
goto init_fail;
}
init_fail:
return rc;
}
示例5: msm8930_mt9v113_vreg_off
static int msm8930_mt9v113_vreg_off(void)
{
int rc = 0;
pr_info("%s\n", __func__);
rc = gpio_request(MSM_CAMIO_1V8_EN, "V_CAMIO_1V8_EN");
pr_info("cam io gpio_request, %d\n", MSM_CAMIO_1V8_EN);
if (rc < 0)
pr_err("GPIO(%d) request failed", MSM_CAMIO_1V8_EN);
else {
gpio_direction_output(MSM_CAMIO_1V8_EN, 0);
gpio_free(MSM_CAMIO_1V8_EN);
}
udelay(50);
pr_info("sensor_power_disable(\"8038_l8\") == %d\n", rc);
rc = camera_sensor_power_disable(reg_8038_l8);
if (rc < 0)
pr_err("sensor_power_disable(\"reg_8038_l8\") FAILED %d\n", rc);
udelay(50);
rc = gpio_request(MSM_V_CAM_D1V8_EN, "V_CAM_D1V8_EN");
pr_info("digital gpio_request, %d\n", MSM_V_CAM_D1V8_EN);
if (rc < 0)
pr_err("GPIO(%d) request failed", MSM_V_CAM_D1V8_EN);
else {
gpio_direction_output(MSM_V_CAM_D1V8_EN, 0);
gpio_free(MSM_V_CAM_D1V8_EN);
}
udelay(50);
rc = gpio_request(MSM_CAM_VCM_PD, "CAM_VCM_PD");
pr_info("vcm pd gpio_request, %d\n", MSM_CAM_VCM_PD);
if (rc < 0 && rc != -EBUSY) {
pr_err("GPIO(%d) request failed", MSM_CAM_VCM_PD);
} else {
gpio_direction_output(MSM_CAM_VCM_PD, 0);
gpio_free(MSM_CAM_VCM_PD);
rc = 0;
}
rc = gpio_request(MSM_CAM2_RSTz, "mt9v113");
pr_info("reset pin gpio_request, %d\n", MSM_CAM2_RSTz);
if (rc < 0)
pr_err("GPIO(%d) request failed", MSM_CAM2_RSTz);
else {
gpio_direction_output(MSM_CAM2_RSTz, 0);
gpio_free(MSM_CAM2_RSTz);
}
udelay(50);
pr_info("sensor_power_disable(\"reg_8038_l17\") == %d\n", rc);
rc = camera_sensor_power_disable(reg_8038_l17);
if (rc < 0)
pr_err("sensor_power_disable(\"reg_8038_l17\") FAILED %d\n", rc);
return rc;
}
示例6: elite_mt9v113_vreg_off
static int elite_mt9v113_vreg_off(void)
{
int rc;
pr_info("%s\n", __func__);
rc = gpio_request(ELITE_GPIO_CAM2_RSTz, "mt9v113");
if (rc < 0) {
pr_err("%s:ELITE_GPIO_CAM2_RSTz gpio %d request failed, rc=%d\n", __func__, ELITE_GPIO_CAM2_RSTz, rc);
goto init_fail;
}
gpio_direction_output(ELITE_GPIO_CAM2_RSTz, 0);
msleep(2);
gpio_free(ELITE_GPIO_CAM2_RSTz);
udelay(50);
rc = gpio_request(ELITE_GPIO_V_LCMIO_1V8_EN, "CAM_D1V8_EN");
pr_info("elite_mt9v113_vreg_off %d 1v8\n", ELITE_GPIO_V_LCMIO_1V8_EN);
if (rc < 0) {
pr_err("%s:GPIO_CAM_D1V8_EN gpio %d request failed, rc=%d\n", __func__, ELITE_GPIO_V_LCMIO_1V8_EN, rc);
goto init_fail;
}
gpio_direction_output(ELITE_GPIO_V_LCMIO_1V8_EN, 0);
gpio_free(ELITE_GPIO_V_LCMIO_1V8_EN);
udelay(50);
rc = camera_sensor_power_disable(reg_8921_l8);
pr_info("camera_sensor_power_disable(\"8921_l8\", 2.8V) == %d\n", rc);
if (rc < 0)
goto init_fail;
udelay(50);
rc = camera_sensor_power_disable(reg_8921_lvs6);
pr_info("camera_sensor_power_disable(\"8921_lvs6\", 1.8V) == %d\n", rc);
if (rc < 0)
goto init_fail;
udelay(50);
rc = camera_sensor_power_disable(reg_8921_l9);
if (rc < 0) {
pr_err("sensor_power_disable(\"8921_l9\") FAILED %d\n", rc);
goto init_fail;
}
init_fail:
return rc;
}
示例7: ville_rawchip_vreg_off
static int ville_rawchip_vreg_off(void)
{
int rc = 0;
pr_info("%s\n", __func__);
/* Mu Lee for sequence with raw chip 20120116 */
rc = camera_sensor_power_disable(reg_8921_l8);
if (rc < 0) {
pr_err("sensor_power_disable(\"8921_l8\") FAILED %d\n", rc);
goto ville_rawchip_vreg_off_fail;
}
rc = gpio_request(VILLE_GPIO_V_CAM_D1V2_EN, "CAM_D1V2_EN");
if (rc < 0) {
pr_err("sensor_power_enable(\"gpio %d\", 1.2V) FAILED %d\n", VILLE_GPIO_V_CAM_D1V2_EN, rc);
goto ville_rawchip_vreg_off_fail;
}
gpio_direction_output(VILLE_GPIO_V_CAM_D1V2_EN, 0);
gpio_free(VILLE_GPIO_V_CAM_D1V2_EN);
udelay(50);
rc = gpio_request(VILLE_GPIO_V_LCMIO_1V8_EN, "CAM_D1V8_EN");
if (rc < 0) {
pr_err("%s:GPIO_CAM_D1V8_EN gpio %d request failed, rc=%d\n", __func__, VILLE_GPIO_V_LCMIO_1V8_EN, rc);
goto ville_rawchip_vreg_off_fail;
}
gpio_direction_output(VILLE_GPIO_V_LCMIO_1V8_EN, 0);
gpio_free(VILLE_GPIO_V_LCMIO_1V8_EN);
mdelay(5);
rc = camera_sensor_power_disable(reg_8921_lvs6);
if (rc < 0) {
pr_err("rawchip_power_disable(\"8921_lvs6\", 1.8V) FAILED %d\n", rc);
goto ville_rawchip_vreg_off_fail;
}
/* VCM */
/* Mu Lee for sequenc with raw chip 20120116 */
rc = camera_sensor_power_disable(reg_8921_l9);
if (rc < 0) {
pr_err("sensor_power_disable(\"8921_l9\") FAILED %d\n", rc);
goto ville_rawchip_vreg_off_fail;
}
return rc;
ville_rawchip_vreg_off_fail:
return rc;
}
示例8: ville_s5k3h2yx_vreg_off
static int ville_s5k3h2yx_vreg_off(void)
{
int rc = 0;
pr_info("%s\n", __func__);
#if 0
/* analog */
rc = camera_sensor_power_disable(reg_8921_l8);
if (rc < 0) {
pr_err("sensor_power_disable(\"8921_l8\") FAILED %d\n", rc);
goto ville_s5k3h2yx_vreg_off_fail;
}
udelay(50);
/* VCM */
rc = camera_sensor_power_disable(reg_8921_l9);
if (rc < 0) {
pr_err("sensor_power_disable(\"8921_l9\") FAILED %d\n", rc);
goto ville_s5k3h2yx_vreg_off_fail;
}
/* digital */
/* remove because rawchip will turn it off latter. */
rc = gpio_request(VILLE_GPIO_V_CAM_D1V2_EN, "CAM_D1V2_EN");
if (rc < 0) {
pr_err("%s:GPIO_CAM_D1V2_EN gpio %d request failed, rc=%d\n", __func__, VILLE_GPIO_V_CAM_D1V2_EN, rc);
goto ville_s5k3h2yx_vreg_off_fail;
}
gpio_direction_output(VILLE_GPIO_V_CAM_D1V2_EN, 0);
gpio_free(VILLE_GPIO_V_CAM_D1V2_EN);
rc = gpio_request(VILLE_GPIO_V_LCMIO_1V8_EN, "CAM_D1V8_EN");
if (rc < 0) {
pr_err("%s:GPIO_CAM_D1V8_EN gpio %d request failed, rc=%d\n", __func__, VILLE_GPIO_V_LCMIO_1V8_EN, rc);
goto ville_s5k3h2yx_vreg_off_fail;
}
gpio_direction_output(VILLE_GPIO_V_LCMIO_1V8_EN, 0);
gpio_free(VILLE_GPIO_V_LCMIO_1V8_EN);
/* IO */
rc = camera_sensor_power_disable(reg_8921_lvs6);
if (rc < 0) {
pr_err("sensor_power_disable(\"8921_lvs6\") FAILED %d\n", rc);
goto ville_s5k3h2yx_vreg_off_fail;
}
ville_s5k3h2yx_vreg_off_fail:
#endif
return rc;
}
示例9: shooter_mt9v113_vreg_off
static int shooter_mt9v113_vreg_off(void)
{
int rc = 0;
pr_info("[CAM] %s\n", __func__);
rc = camera_sensor_power_disable(shooter_reg_8058_l9);
pr_info("[CAM] camera_sensor_power_disable(\"8058_l9\", 1.8V) == %d\n", rc);
if (rc < 0) {
pr_err("[CAM] sensor_power_disable(\"8058_l9\") FAILED %d\n", rc);
goto init_fail;
}
udelay(50);
rc = camera_sensor_power_disable(shooter_reg_8058_l15);
pr_info("[CAM] camera_sensor_power_disable(\"8058_l15\", 2.8V) == %d\n", rc);
if (rc < 0) {
pr_err("[CAM] sensor_power_disable(\"8058_l15\") FAILED %d\n", rc);
goto init_fail;
}
udelay(50);
rc = camera_sensor_power_disable(shooter_reg_8058_l12);
pr_info("[CAM] camera_sensor_power_disable(\"8058_l12\", 1.8V) == %d\n", rc);
if (rc < 0) {
pr_err("[CAM] sensor_power_disable(\"8058_l12\") FAILED %d\n", rc);
goto init_fail;
}
udelay(50);
pr_info("[CAM] camera_sensor_power_disable(\"8058_l10\", 2.8V) == %d\n", rc);
rc = camera_sensor_power_disable(shooter_reg_8058_l10);
if (rc < 0) {
pr_err("[CAM] sensor_power_disable(\"8058_l10\") FAILED %d\n", rc);
goto init_fail;
}
shooter_config_camera_off_gpios();
pr_info("[CAM] Doing clk switch to sleep state\n");
rc = gpio_request(SHOOTER_MCLK_SWITCH, "CAM_SEL");
if (rc < 0)
{
pr_err("[CAM] GPIO (%d) request fail\n", SHOOTER_MCLK_SWITCH);
goto init_fail;
}
gpio_direction_output(SHOOTER_MCLK_SWITCH, 0);
gpio_free(SHOOTER_MCLK_SWITCH);
init_fail:
return rc;
}
示例10: elite_s5k3h2yx_vreg_off
static int elite_s5k3h2yx_vreg_off(void)
{
int rc = 0;
pr_info("%s\n", __func__);
#if 0
rc = camera_sensor_power_disable(reg_8921_l8);
if (rc < 0) {
pr_err("sensor_power_disable(\"8921_l8\") FAILED %d\n", rc);
goto elite_s5k3h2yx_vreg_off_fail;
}
udelay(50);
rc = camera_sensor_power_disable(reg_8921_l9);
if (rc < 0) {
pr_err("sensor_power_disable(\"8921_l9\") FAILED %d\n", rc);
goto elite_s5k3h2yx_vreg_off_fail;
}
rc = gpio_request(ELITE_GPIO_V_CAM_D1V2_EN, "CAM_D1V2_EN");
if (rc < 0) {
pr_err("%s:GPIO_CAM_D1V2_EN gpio %d request failed, rc=%d\n", __func__, ELITE_GPIO_V_CAM_D1V2_EN, rc);
goto elite_s5k3h2yx_vreg_off_fail;
}
gpio_direction_output(ELITE_GPIO_V_CAM_D1V2_EN, 0);
gpio_free(ELITE_GPIO_V_CAM_D1V2_EN);
rc = gpio_request(ELITE_GPIO_V_LCMIO_1V8_EN, "CAM_D1V8_EN");
if (rc < 0) {
pr_err("%s:GPIO_CAM_D1V8_EN gpio %d request failed, rc=%d\n", __func__, ELITE_GPIO_V_LCMIO_1V8_EN, rc);
goto elite_s5k3h2yx_vreg_off_fail;
}
gpio_direction_output(ELITE_GPIO_V_LCMIO_1V8_EN, 0);
gpio_free(ELITE_GPIO_V_LCMIO_1V8_EN);
rc = camera_sensor_power_disable(reg_8921_lvs6);
if (rc < 0) {
pr_err("sensor_power_disable(\"8921_lvs6\") FAILED %d\n", rc);
goto elite_s5k3h2yx_vreg_off_fail;
}
elite_s5k3h2yx_vreg_off_fail:
#endif
return rc;
}
示例11: t6china_camera_vreg_on
int t6china_camera_vreg_on(void)
{
int rc=0;
pr_info("%s \n", __func__);
t6chian_camera_on++;
if (t6chian_camera_on>1) {
pr_info("%s: just return\n", __func__);
return rc;
}
rc = camera_sensor_power_enable("8921_l22", 3000000, ®_8921_l22);
if (rc<0)
goto VREG_FAIL_D1V8;
mdelay(125);
rc = camera_sensor_power_enable("8921_l23", 1800000, ®_8921_l23);
if (rc<0)
goto VREG_FAIL_IO1V8;
mdelay(25);
rc = camera_sensor_power_enable("8921_l8", 2800000, ®_8921_l8);
if (rc<0)
goto VREG_FAIL_ANALOG2V8;
mdelay(10);
rc = gpio_set (PM8921_GPIO_PM_TO_SYS(MCAM_D1V2_EN),1);
if (rc<0)
goto VREG_FAIL_1V2;
mdelay(1);
return rc;
VREG_FAIL_1V2:
camera_sensor_power_disable(reg_8921_l8);
VREG_FAIL_ANALOG2V8:
camera_sensor_power_disable(reg_8921_l23);
VREG_FAIL_IO1V8:
camera_sensor_power_disable(reg_8921_l22);
VREG_FAIL_D1V8:
return rc;
}
示例12: msm8930_ov4688_vreg_off
static int msm8930_ov4688_vreg_off(void)
{
int rc = 0;
pr_info("%s\n", __func__);
gpio_set (MSM_CAMIO_1V8_EN,0);
camera_sensor_power_disable(reg_8038_l8);
gpio_set (MSM_CAM_VCM_PD,0);
camera_sensor_power_disable(reg_8038_l17);
gpio_set (MSM_RAW_1V2_EN,0);
return rc;
}
示例13: msm8930_ov4688_vreg_on
static int msm8930_ov4688_vreg_on(void)
{
int rc =0;
pr_info("%s\n", __func__);
rc = camera_sensor_power_enable("8038_l17", 2850000, ®_8038_l17);
if (rc < 0) {
pr_err("[CAM] sensor_power_enable(\"8038_l17\", 2.85V) FAILED %d\n", rc);
goto enable_ov4688_vcm_fail;
}
msleep(1);
rc = gpio_set (MSM_CAM_VCM_PD,1);
if (rc<0) {
goto enable_ov4688_vcm_pd_fail;
}
rc = camera_sensor_power_enable("8038_l8", 2900000, ®_8038_l8);
if (rc < 0) {
pr_err("[CAM] sensor_power_enable(\"8038_l8\", 2.9V) FAILED %d\n", rc);
goto enable_ov4688_l8_fail;
}
udelay(50);
rc = gpio_set (MSM_CAMIO_1V8_EN,1);
if (rc < 0)
goto enable_ov4688_io1v8_fail;
rc = gpio_set (MSM_RAW_1V2_EN,1);
if (rc<0)
goto RAW_FAIL_1V2;
return rc;
RAW_FAIL_1V2:
gpio_set (MSM_CAMIO_1V8_EN,0);
enable_ov4688_io1v8_fail:
camera_sensor_power_disable(reg_8038_l8);
enable_ov4688_l8_fail:
gpio_set (MSM_CAM_VCM_PD,0);
enable_ov4688_vcm_pd_fail:
camera_sensor_power_disable(reg_8038_l17);
enable_ov4688_vcm_fail:
return rc;
}
示例14: msm8930_s5k6a2ya_vreg_off
static int msm8930_s5k6a2ya_vreg_off(void)
{
int rc = 0;
pr_info("[CAM] %s\n", __func__);
rc = gpio_request(MSM_CAM2_RSTz, "s5k6a2ya");
pr_info("[CAM] reset pin gpio_request, %d\n", MSM_CAM2_RSTz);
if (rc < 0)
pr_err("[CAM] GPIO(%d) request failed", MSM_CAM2_RSTz);
else {
gpio_direction_output(MSM_CAM2_RSTz, 0);
gpio_free(MSM_CAM2_RSTz);
}
udelay(50);
pr_info("[CAM] sensor_power_disable(\"8038_l8\") == %d\n", rc);
rc = camera_sensor_power_disable(reg_8038_l8);
if (rc < 0)
pr_err("[CAM] sensor_power_disable(\"reg_8038_l8\") FAILED %d\n", rc);
udelay(50);
rc = gpio_request(MSM_CAMIO_1V8_EN, "V_CAMIO_1V8_EN");
pr_info("[CAM] cam io gpio_request, %d\n", MSM_CAMIO_1V8_EN);
if (rc < 0)
pr_err("[CAM] GPIO(%d) request failed", MSM_CAMIO_1V8_EN);
else {
gpio_direction_output(MSM_CAMIO_1V8_EN, 0);
gpio_free(MSM_CAMIO_1V8_EN);
}
gpio_set (MSM_RAW_1V2_EN,0);
rc = gpio_request(MSM_CAM_VCM_PD, "CAM_VCM_PD");
pr_info("[CAM] vcm pd gpio_request, %d\n", MSM_CAM_VCM_PD);
if (rc < 0)
pr_err("[CAM] GPIO(%d) request failed", MSM_CAM_VCM_PD);
else {
gpio_direction_output(MSM_CAM_VCM_PD, 0);
gpio_free(MSM_CAM_VCM_PD);
}
udelay(50);
pr_info("[CAM] sensor_power_disable(\"reg_8038_l17\") == %d\n", rc);
rc = camera_sensor_power_disable(reg_8038_l17);
if (rc < 0)
pr_err("[CAM] sensor_power_disable(\"reg_8038_l17\") FAILED %d\n", rc);
return rc;
}
示例15: msm8930_s5k4e5yx_vreg_off
static int msm8930_s5k4e5yx_vreg_off(void)
{
int rc = 0;
pr_info("[CAM] %s\n", __func__);
/* analog */
rc = camera_sensor_power_disable(reg_8038_l8);
pr_info("[CAM] sensor_power_disable(\"8038_l8\") == %d\n", rc);
if (rc < 0)
pr_err("[CAM] sensor_power_disable\(\"8038_l8\") FAILED %d\n", rc);
udelay(50);
/* digital */
rc = gpio_request(CAM_PIN_GPIO_V_CAM_D1V8_EN, "V_CAM_D1V8_EN");
pr_info("[CAM] digital gpio_request, %d\n", CAM_PIN_GPIO_V_CAM_D1V8_EN);
if (rc < 0)
pr_err("[CAM] GPIO(%d) request failed", CAM_PIN_GPIO_V_CAM_D1V8_EN);
else {
gpio_tlmm_config(
GPIO_CFG(CAM_PIN_GPIO_V_CAM_D1V8_EN, 0, GPIO_CFG_OUTPUT, GPIO_CFG_NO_PULL, GPIO_CFG_2MA),
GPIO_CFG_ENABLE);
gpio_direction_output(CAM_PIN_GPIO_V_CAM_D1V8_EN, 0);
gpio_free(CAM_PIN_GPIO_V_CAM_D1V8_EN);
}
udelay(900);
/* IO */
rc = gpio_request(CAM_PIN_GPIO_V_CAMIO_1V8_EN, "V_CAMIO_1V8_EN");
pr_info("[CAM] cam io gpio_request, %d\n", CAM_PIN_GPIO_V_CAMIO_1V8_EN);
if (rc < 0)
pr_err("[CAM] GPIO(%d) request failed", CAM_PIN_GPIO_V_CAMIO_1V8_EN);
else {
gpio_direction_output(CAM_PIN_GPIO_V_CAMIO_1V8_EN, 0);
gpio_free(CAM_PIN_GPIO_V_CAMIO_1V8_EN);
}
udelay(50);
/* VCM */
if (reg_8038_l17 != NULL)
regulator_set_optimum_mode(reg_8038_l17, 9000);
rc = camera_sensor_power_disable(reg_8038_l17);
pr_info("[CAM] sensor_power_disable(\"8038_l17\") == %d\n", rc);
if (rc < 0)
pr_err("[CAM] sensor_power_disable\(\"8038_l17\") FAILED %d\n", rc);
return rc;
}