• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ camera_sensor_power_disable函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中camera_sensor_power_disable函数的典型用法代码示例。如果您正苦于以下问题:C++ camera_sensor_power_disable函数的具体用法?C++ camera_sensor_power_disable怎么用?C++ camera_sensor_power_disable使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了camera_sensor_power_disable函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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, &reg_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, &reg_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, &reg_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;

}
开发者ID:BackupWildfireDEV,项目名称:ElementalX-Sense-5.0.2,代码行数:60,代码来源:board-ville-camera.c


示例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, &reg_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, &reg_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, &reg_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;

}
开发者ID:SunRain,项目名称:kernel_evita,代码行数:60,代码来源:board-elite-camera.c


示例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;
}
开发者ID:BackupWildfireDEV,项目名称:ElementalX-Sense-5.0.2,代码行数:34,代码来源:board-operaul-camera.c


示例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;
}
开发者ID:BackupWildfireDEV,项目名称:ElementalX-Sense-5.0.2,代码行数:58,代码来源:board-ville-camera.c


示例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;
}
开发者ID:talnoah,项目名称:Leaping_Lemur-AOSP,代码行数:58,代码来源:board-m4-camera.c


示例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;
}
开发者ID:SunRain,项目名称:kernel_evita,代码行数:58,代码来源:board-elite-camera.c


示例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;
}
开发者ID:BackupWildfireDEV,项目名称:ElementalX-Sense-5.0.2,代码行数:52,代码来源:board-ville-camera.c


示例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;
}
开发者ID:BackupWildfireDEV,项目名称:ElementalX-Sense-5.0.2,代码行数:52,代码来源:board-ville-camera.c


示例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;
}
开发者ID:jshafer817,项目名称:sailfish_kernel_hp_tenderloin,代码行数:52,代码来源:board-shooter-camera.c


示例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;
}
开发者ID:SunRain,项目名称:kernel_evita,代码行数:52,代码来源:board-elite-camera.c


示例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, &reg_8921_l22);
    if (rc<0)
        goto VREG_FAIL_D1V8;
    mdelay(125);

    
	rc = camera_sensor_power_enable("8921_l23", 1800000, &reg_8921_l23);
    if (rc<0)
        goto VREG_FAIL_IO1V8;
	mdelay(25);

    
	rc = camera_sensor_power_enable("8921_l8", 2800000, &reg_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;
}
开发者ID:zarboz,项目名称:T6_Blackout_Edition,代码行数:50,代码来源:board-t6china-camera.c


示例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;
}
开发者ID:talnoah,项目名称:Leaping_Lemur-AOSP,代码行数:14,代码来源:board-m4-camera.c


示例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, &reg_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, &reg_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;
}
开发者ID:talnoah,项目名称:Leaping_Lemur-AOSP,代码行数:49,代码来源:board-m4-camera.c


示例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;
}
开发者ID:santod,项目名称:nuk3rn3l_htc_msm8960-revamped,代码行数:48,代码来源:board-m4-camera.c


示例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;
}
开发者ID:bgcngm,项目名称:802Xtreem,代码行数:48,代码来源:board-k2-camera.c


示例16: msm8930_ov5693_vreg_on

static int msm8930_ov5693_vreg_on(void)
{
	int rc;
	pr_info("%s\n", __func__);

	/* VCM */
	rc = camera_sensor_power_enable("8038_l17", 2850000, &reg_8038_l17);
	pr_info("vcm sensor_power_enable(\"8038_l17\", 2.8V) == %d\n", rc);
	if (rc < 0) {
		pr_err("sensor_power_enable(\"8038_l17\", 2.8V) FAILED %d\n", rc);
		goto enable_ov5693_vcm_fail;
	}
	udelay(50);

	/* analog */
	rc = camera_sensor_power_enable("8038_l8", 2800000, &reg_8038_l8);
	pr_info("analog sensor_power_enable(\"8038_l8\", 2.8V) == %d\n", rc);
	if (rc < 0) {
		pr_err("sensor_power_enable(\"8038_l8\", 2.8V) FAILED %d\n", rc);
		goto enable_ov5693_analog_fail;
	}
	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);
		goto enable_ov5693_io_fail;
	}
	gpio_direction_output(CAM_PIN_GPIO_V_CAMIO_1V8_EN, 1);
	gpio_free(CAM_PIN_GPIO_V_CAMIO_1V8_EN);
	udelay(50);

	/* 2nd camera reset pin */
	rc = gpio_request(CAM_PIN_GPIO_CAM2_RSTz, "s5k6a2ya");
	pr_info(" reset pin gpio_request, %d\n", CAM_PIN_GPIO_CAM2_RSTz);
	if (rc < 0) {
		pr_err(" GPIO(%d) request failed", CAM_PIN_GPIO_CAM2_RSTz);
	}
	gpio_direction_output(CAM_PIN_GPIO_CAM2_RSTz, 0);
	gpio_free(CAM_PIN_GPIO_CAM2_RSTz);

	return rc;

enable_ov5693_io_fail:
	camera_sensor_power_disable(reg_8038_l8);
enable_ov5693_analog_fail:
	rc = gpio_request(CAM_PIN_GPIO_V_CAM_D1V8_EN, "V_CAM_D1V8_EN");
	if (rc < 0)
		pr_err("GPIO(%d) request failed", CAM_PIN_GPIO_V_CAM_D1V8_EN);
	else {
		gpio_direction_output(CAM_PIN_GPIO_V_CAM_D1V8_EN, 0);
		gpio_free(CAM_PIN_GPIO_V_CAM_D1V8_EN);
	}
/*enable_ov5693_digital_fail:
	camera_sensor_power_disable(reg_8038_l17);*/
enable_ov5693_vcm_fail:
	return rc;
}
开发者ID:BackupWildfireDEV,项目名称:ElementalX-Sense-5.0.2,代码行数:60,代码来源:board-operaul-camera.c


示例17: t6china_rawchip_vreg_on

static int t6china_rawchip_vreg_on(void)
{
    int rc = 0;
    pr_info("%s\n", __func__);

    
    rc = camera_sensor_power_enable("8921_lvs4", 1800000, &reg_8921_lvs4);
    if (rc < 0) {
        pr_err("sensor_power_enable(\"8921_lvs4\") FAILED %d\n", rc);
        goto RAW_FAIL_1V8;
    }
    mdelay(5);
    
    
    rc = gpio_set (PM8921_GPIO_PM_TO_SYS(V_RAW_1V2_EN),1);
    if (rc<0)
        goto RAW_FAIL_1V2;

    return rc;


RAW_FAIL_1V2:
    camera_sensor_power_disable (reg_8921_lvs4);

RAW_FAIL_1V8:

    return rc;

}
开发者ID:zarboz,项目名称:T6_Blackout_Edition,代码行数:29,代码来源:board-t6china-camera.c


示例18: t6china_rawchip_vreg_off

static int t6china_rawchip_vreg_off(void)
{
    gpio_set (CAM_PIN_GPIO_CAM_PWDN,0);
    mdelay(10);

    gpio_set (PM8921_GPIO_PM_TO_SYS(V_RAW_1V2_EN),0);
    camera_sensor_power_disable (reg_8921_lvs4);

	return 0;
}
开发者ID:zarboz,项目名称:T6_Blackout_Edition,代码行数:10,代码来源:board-t6china-camera.c


示例19: t6china_camera_vreg_off

int t6china_camera_vreg_off(void)
{
    pr_info("%s\n", __func__);    
    t6chian_camera_on--;

    if (t6chian_camera_on) {
        pr_info("%s: just return\n", __func__);
        return 0;
    }

    gpio_set (PM8921_GPIO_PM_TO_SYS(MCAM_D1V2_EN),0);
    camera_sensor_power_disable(reg_8921_l8); 
	mdelay(25);
    camera_sensor_power_disable(reg_8921_l23); 
	mdelay(125);
    camera_sensor_power_disable(reg_8921_l22); 

    return 0;
}
开发者ID:zarboz,项目名称:T6_Blackout_Edition,代码行数:19,代码来源:board-t6china-camera.c


示例20: t6china_csi_vreg_off

static int t6china_csi_vreg_off(void)
{
	pr_info("%s\n", __func__);
	
    t6chian_csi_on--;
	if (t6chian_csi_on) {
        return 0;
	}
	return camera_sensor_power_disable(reg_8921_l2);
}
开发者ID:zarboz,项目名称:T6_Blackout_Edition,代码行数:10,代码来源:board-t6china-camera.c



注:本文中的camera_sensor_power_disable函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ caml_acquire_runtime_system函数代码示例发布时间:2022-05-30
下一篇:
C++ camera_pack_event函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap