msm: camera: Remove deprecated APIs
Remove APIs that are no longer in use.
Logic moved to userspace.
Change-Id: Ic54c493e7edef78d829dc5cc598b7b4bff919cfd
Signed-off-by: Kevin Chan <ktchan@codeaurora.org>
diff --git a/drivers/media/video/msm/sensors/imx074_v4l2.c b/drivers/media/video/msm/sensors/imx074_v4l2.c
index 99cc2d4..2923e5d 100644
--- a/drivers/media/video/msm/sensors/imx074_v4l2.c
+++ b/drivers/media/video/msm/sensors/imx074_v4l2.c
@@ -315,12 +315,6 @@
.sensor_stop_stream = msm_sensor_stop_stream,
.sensor_group_hold_on = msm_sensor_group_hold_on,
.sensor_group_hold_off = msm_sensor_group_hold_off,
- .sensor_get_prev_lines_pf = msm_sensor_get_prev_lines_pf,
- .sensor_get_prev_pixels_pl = msm_sensor_get_prev_pixels_pl,
- .sensor_get_pict_lines_pf = msm_sensor_get_pict_lines_pf,
- .sensor_get_pict_pixels_pl = msm_sensor_get_pict_pixels_pl,
- .sensor_get_pict_max_exp_lc = msm_sensor_get_pict_max_exp_lc,
- .sensor_get_pict_fps = msm_sensor_get_pict_fps,
.sensor_set_fps = msm_sensor_set_fps,
.sensor_write_exp_gain = msm_sensor_write_exp_gain1,
.sensor_write_snapshot_exp_gain = msm_sensor_write_exp_gain1,
diff --git a/drivers/media/video/msm/sensors/msm_sensor.c b/drivers/media/video/msm/sensors/msm_sensor.c
index 76ade6c..7eb3160 100644
--- a/drivers/media/video/msm/sensors/msm_sensor.c
+++ b/drivers/media/video/msm/sensors/msm_sensor.c
@@ -100,54 +100,6 @@
s_ctrl->msm_sensor_reg->default_data_type);
}
-uint16_t msm_sensor_get_prev_lines_pf(struct msm_sensor_ctrl_t *s_ctrl)
-{
- return s_ctrl->msm_sensor_reg->
- output_settings[s_ctrl->prev_res].frame_length_lines;
-}
-
-uint16_t msm_sensor_get_prev_pixels_pl(struct msm_sensor_ctrl_t *s_ctrl)
-{
- return s_ctrl->msm_sensor_reg->
- output_settings[s_ctrl->prev_res].line_length_pclk;
-}
-
-uint16_t msm_sensor_get_pict_lines_pf(struct msm_sensor_ctrl_t *s_ctrl)
-{
- return s_ctrl->msm_sensor_reg->
- output_settings[s_ctrl->pict_res].frame_length_lines;
-}
-
-uint16_t msm_sensor_get_pict_pixels_pl(struct msm_sensor_ctrl_t *s_ctrl)
-{
- return s_ctrl->msm_sensor_reg->
- output_settings[s_ctrl->pict_res].line_length_pclk;
-}
-
-uint32_t msm_sensor_get_pict_max_exp_lc(struct msm_sensor_ctrl_t *s_ctrl)
-{
- return s_ctrl->msm_sensor_reg->
- output_settings[s_ctrl->prev_res].frame_length_lines * 24;
-}
-
-void msm_sensor_get_pict_fps(struct msm_sensor_ctrl_t *s_ctrl,
- uint16_t fps, uint16_t *pfps)
-{
- uint32_t divider, d1, d2;
- d1 = s_ctrl->msm_sensor_reg->
- output_settings[s_ctrl->prev_res].frame_length_lines * Q10 /
- s_ctrl->msm_sensor_reg->
- output_settings[s_ctrl->pict_res].frame_length_lines;
-
- d2 = s_ctrl->msm_sensor_reg->
- output_settings[s_ctrl->prev_res].line_length_pclk * Q10 /
- s_ctrl->msm_sensor_reg->
- output_settings[s_ctrl->pict_res].line_length_pclk;
-
- divider = d1 * d2 / Q10;
- *pfps = (uint16_t) (fps * divider / Q10);
-}
-
int32_t msm_sensor_set_fps(struct msm_sensor_ctrl_t *s_ctrl,
struct fps_cfg *fps)
{
@@ -268,15 +220,6 @@
{
int32_t rc = 0;
if (s_ctrl->curr_res != res) {
- switch (mode) {
- case SENSOR_PREVIEW_MODE:
- s_ctrl->prev_res = res;
- break;
- case SENSOR_SNAPSHOT_MODE:
- case SENSOR_RAW_SNAPSHOT_MODE:
- s_ctrl->pict_res = res;
- break;
- }
s_ctrl->curr_frame_length_lines =
s_ctrl->msm_sensor_reg->
output_settings[res].frame_length_lines;
@@ -298,27 +241,16 @@
int mode, struct sensor_init_cfg *init_info)
{
int32_t rc = 0;
- s_ctrl->fps = 30*Q8;
s_ctrl->fps_divider = Q10;
s_ctrl->cam_mode = MSM_SENSOR_MODE_INVALID;
CDBG("%s: %d\n", __func__, __LINE__);
if (mode != s_ctrl->cam_mode) {
- if (init_info->prev_res >=
- s_ctrl->msm_sensor_reg->num_conf ||
- init_info->pict_res >=
- s_ctrl->msm_sensor_reg->num_conf) {
- CDBG("Resolution does not exist");
- return -EINVAL;
- }
-
- s_ctrl->prev_res = init_info->prev_res;
- s_ctrl->pict_res = init_info->pict_res;
s_ctrl->curr_res = MSM_SENSOR_INVALID_RES;
s_ctrl->cam_mode = mode;
rc = s_ctrl->func_tbl->sensor_setting(s_ctrl,
- MSM_SENSOR_REG_INIT, s_ctrl->prev_res);
+ MSM_SENSOR_REG_INIT, 0);
}
return rc;
}
@@ -349,109 +281,6 @@
CDBG("msm_sensor_config: cfgtype = %d\n",
cdata.cfgtype);
switch (cdata.cfgtype) {
- case CFG_GET_PICT_FPS:
- if (s_ctrl->func_tbl->
- sensor_get_pict_fps == NULL) {
- rc = -EFAULT;
- break;
- }
- s_ctrl->func_tbl->
- sensor_get_pict_fps(
- s_ctrl,
- cdata.cfg.gfps.prevfps,
- &(cdata.cfg.gfps.pictfps));
-
- if (copy_to_user((void *)argp,
- &cdata,
- sizeof(struct sensor_cfg_data)))
- rc = -EFAULT;
- break;
-
- case CFG_GET_PREV_L_PF:
- if (s_ctrl->func_tbl->
- sensor_get_prev_lines_pf == NULL) {
- rc = -EFAULT;
- break;
- }
- cdata.cfg.prevl_pf =
- s_ctrl->func_tbl->
- sensor_get_prev_lines_pf
- (s_ctrl);
-
- if (copy_to_user((void *)argp,
- &cdata,
- sizeof(struct sensor_cfg_data)))
- rc = -EFAULT;
- break;
-
- case CFG_GET_PREV_P_PL:
- if (s_ctrl->func_tbl->
- sensor_get_prev_pixels_pl == NULL) {
- rc = -EFAULT;
- break;
- }
- cdata.cfg.prevp_pl =
- s_ctrl->func_tbl->
- sensor_get_prev_pixels_pl
- (s_ctrl);
-
- if (copy_to_user((void *)argp,
- &cdata,
- sizeof(struct sensor_cfg_data)))
- rc = -EFAULT;
- break;
-
- case CFG_GET_PICT_L_PF:
- if (s_ctrl->func_tbl->
- sensor_get_pict_lines_pf == NULL) {
- rc = -EFAULT;
- break;
- }
- cdata.cfg.pictl_pf =
- s_ctrl->func_tbl->
- sensor_get_pict_lines_pf
- (s_ctrl);
-
- if (copy_to_user((void *)argp,
- &cdata,
- sizeof(struct sensor_cfg_data)))
- rc = -EFAULT;
- break;
-
- case CFG_GET_PICT_P_PL:
- if (s_ctrl->func_tbl->
- sensor_get_pict_pixels_pl == NULL) {
- rc = -EFAULT;
- break;
- }
- cdata.cfg.pictp_pl =
- s_ctrl->func_tbl->
- sensor_get_pict_pixels_pl
- (s_ctrl);
-
- if (copy_to_user((void *)argp,
- &cdata,
- sizeof(struct sensor_cfg_data)))
- rc = -EFAULT;
- break;
-
- case CFG_GET_PICT_MAX_EXP_LC:
- if (s_ctrl->func_tbl->
- sensor_get_pict_max_exp_lc == NULL) {
- rc = -EFAULT;
- break;
- }
- cdata.cfg.pict_max_exp_lc =
- s_ctrl->func_tbl->
- sensor_get_pict_max_exp_lc
- (s_ctrl);
-
- if (copy_to_user((void *)argp,
- &cdata,
- sizeof(struct sensor_cfg_data)))
- rc = -EFAULT;
- break;
-
case CFG_SET_FPS:
case CFG_SET_PICT_FPS:
if (s_ctrl->func_tbl->
@@ -506,30 +335,9 @@
cdata.rs);
break;
- case CFG_PWR_DOWN:
- break;
-
- case CFG_MOVE_FOCUS:
- break;
-
- case CFG_SET_DEFAULT_FOCUS:
- break;
-
- case CFG_GET_AF_MAX_STEPS:
- cdata.max_steps = 32;
- if (copy_to_user((void *)argp,
- &cdata,
- sizeof(struct sensor_cfg_data)))
- rc = -EFAULT;
- break;
-
case CFG_SET_EFFECT:
break;
-
- case CFG_SEND_WB_INFO:
- break;
-
case CFG_SENSOR_INIT:
if (s_ctrl->func_tbl->
sensor_mode_init == NULL) {
diff --git a/drivers/media/video/msm/sensors/msm_sensor.h b/drivers/media/video/msm/sensors/msm_sensor.h
index 1121170..e4dc34f 100644
--- a/drivers/media/video/msm/sensors/msm_sensor.h
+++ b/drivers/media/video/msm/sensors/msm_sensor.h
@@ -99,18 +99,6 @@
void (*sensor_group_hold_on) (struct msm_sensor_ctrl_t *);
void (*sensor_group_hold_off) (struct msm_sensor_ctrl_t *);
- uint16_t (*sensor_get_prev_lines_pf)
- (struct msm_sensor_ctrl_t *);
- uint16_t (*sensor_get_prev_pixels_pl)
- (struct msm_sensor_ctrl_t *);
- uint16_t (*sensor_get_pict_lines_pf)
- (struct msm_sensor_ctrl_t *);
- uint16_t (*sensor_get_pict_pixels_pl)
- (struct msm_sensor_ctrl_t *);
- uint32_t (*sensor_get_pict_max_exp_lc)
- (struct msm_sensor_ctrl_t *);
- void (*sensor_get_pict_fps) (struct msm_sensor_ctrl_t *,
- uint16_t, uint16_t *);
int32_t (*sensor_set_fps) (struct msm_sensor_ctrl_t *,
struct fps_cfg *);
int32_t (*sensor_write_exp_gain) (struct msm_sensor_ctrl_t *,
@@ -153,10 +141,7 @@
uint16_t curr_line_length_pclk;
uint16_t curr_frame_length_lines;
- uint16_t fps;
uint32_t fps_divider;
- enum msm_sensor_resolution_t prev_res;
- enum msm_sensor_resolution_t pict_res;
enum msm_sensor_resolution_t curr_res;
enum msm_sensor_cam_mode_t cam_mode;
@@ -176,13 +161,6 @@
void msm_sensor_group_hold_on(struct msm_sensor_ctrl_t *s_ctrl);
void msm_sensor_group_hold_off(struct msm_sensor_ctrl_t *s_ctrl);
-uint16_t msm_sensor_get_prev_lines_pf(struct msm_sensor_ctrl_t *s_ctrl);
-uint16_t msm_sensor_get_prev_pixels_pl(struct msm_sensor_ctrl_t *s_ctrl);
-uint16_t msm_sensor_get_pict_lines_pf(struct msm_sensor_ctrl_t *s_ctrl);
-uint16_t msm_sensor_get_pict_pixels_pl(struct msm_sensor_ctrl_t *s_ctrl);
-uint32_t msm_sensor_get_pict_max_exp_lc(struct msm_sensor_ctrl_t *s_ctrl);
-void msm_sensor_get_pict_fps(struct msm_sensor_ctrl_t *s_ctrl,
- uint16_t fps, uint16_t *pfps);
int32_t msm_sensor_set_fps(struct msm_sensor_ctrl_t *s_ctrl,
struct fps_cfg *fps);
int32_t msm_sensor_write_exp_gain1(struct msm_sensor_ctrl_t *s_ctrl,
diff --git a/drivers/media/video/msm/sensors/ov2720.c b/drivers/media/video/msm/sensors/ov2720.c
index bdad57c..5938406 100644
--- a/drivers/media/video/msm/sensors/ov2720.c
+++ b/drivers/media/video/msm/sensors/ov2720.c
@@ -477,12 +477,6 @@
.sensor_stop_stream = msm_sensor_stop_stream,
.sensor_group_hold_on = msm_sensor_group_hold_on,
.sensor_group_hold_off = msm_sensor_group_hold_off,
- .sensor_get_prev_lines_pf = msm_sensor_get_prev_lines_pf,
- .sensor_get_prev_pixels_pl = msm_sensor_get_prev_pixels_pl,
- .sensor_get_pict_lines_pf = msm_sensor_get_pict_lines_pf,
- .sensor_get_pict_pixels_pl = msm_sensor_get_pict_pixels_pl,
- .sensor_get_pict_max_exp_lc = msm_sensor_get_pict_max_exp_lc,
- .sensor_get_pict_fps = msm_sensor_get_pict_fps,
.sensor_set_fps = msm_sensor_set_fps,
.sensor_write_exp_gain = ov2720_write_exp_gain,
.sensor_write_snapshot_exp_gain = ov2720_write_exp_gain,