Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7fc57d25 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: camera: vreg: Fix vreg power down issue"

parents 0664f05d 73cc85a3
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -67,6 +67,8 @@ int msm_camera_fill_vreg_params(struct camera_vreg_t *cam_vreg,
					break;
				}
			}
			if (j == num_vreg)
				power_setting[i].seq_val = INVALID_VREG;
			break;

		case CAM_VIO:
@@ -86,6 +88,8 @@ int msm_camera_fill_vreg_params(struct camera_vreg_t *cam_vreg,
					break;
				}
			}
			if (j == num_vreg)
				power_setting[i].seq_val = INVALID_VREG;
			break;

		case CAM_VANA:
@@ -105,6 +109,8 @@ int msm_camera_fill_vreg_params(struct camera_vreg_t *cam_vreg,
					break;
				}
			}
			if (j == num_vreg)
				power_setting[i].seq_val = INVALID_VREG;
			break;

		case CAM_VAF:
@@ -124,6 +130,8 @@ int msm_camera_fill_vreg_params(struct camera_vreg_t *cam_vreg,
					break;
				}
			}
			if (j == num_vreg)
				power_setting[i].seq_val = INVALID_VREG;
			break;

		case CAM_V_CUSTOM1:
@@ -144,6 +152,8 @@ int msm_camera_fill_vreg_params(struct camera_vreg_t *cam_vreg,
					break;
				}
			}
			if (j == num_vreg)
				power_setting[i].seq_val = INVALID_VREG;
			break;

		case CAM_V_CUSTOM2:
@@ -164,6 +174,8 @@ int msm_camera_fill_vreg_params(struct camera_vreg_t *cam_vreg,
					break;
				}
			}
			if (j == num_vreg)
				power_setting[i].seq_val = INVALID_VREG;
			break;

		default:
@@ -1379,6 +1391,8 @@ int msm_camera_power_up(struct msm_camera_power_ctrl_t *ctrl,
				(int) power_setting->config_val);
			break;
		case SENSOR_VREG:
			if (power_setting->seq_val == INVALID_VREG)
				break;
			if (power_setting->seq_val >= CAM_VREG_MAX) {
				pr_err("%s vreg index %d >= max %d\n", __func__,
					power_setting->seq_val,
@@ -1570,6 +1584,8 @@ int msm_camera_power_down(struct msm_camera_power_ctrl_t *ctrl,
				(int) pd->config_val);
			break;
		case SENSOR_VREG:
			if (pd->seq_val == INVALID_VREG)
				break;
			if (pd->seq_val >= CAM_VREG_MAX) {
				pr_err("%s vreg index %d >= max %d\n", __func__,
					pd->seq_val,
+3 −1
Original line number Diff line number Diff line
/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved.
/* Copyright (c) 2013-2015, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -18,6 +18,8 @@
#include <linux/of.h>
#include "msm_camera_i2c.h"

#define INVALID_VREG 100

int msm_sensor_get_sub_module_index(struct device_node *of_node,
	struct  msm_sensor_info_t **s_info);