diff options
author | Robby Cai <robby.cai@nxp.com> | 2017-12-07 15:00:33 +0800 |
---|---|---|
committer | Leonard Crestez <leonard.crestez@nxp.com> | 2018-08-24 12:41:33 +0300 |
commit | 3acff01f5130ffd78d786c29842bbc559886df15 (patch) | |
tree | a73f9935b673d16ba82254571a3bb2b7df0dddd1 /drivers/media/platform/mxc | |
parent | c05a42feddaac7616287f39eed853d988c61a7be (diff) |
MLK-17116-1 media: camera: use simpler way for 20MHz mclk setting
For ov5640, the simpler way is to make PLL1 same. Here's changing PRE_DIV0.
"24MHz / 3" equals to "20MHz / 2.5", hereby the reg 3037[3:0] = 7.
Signed-off-by: Robby Cai <robby.cai@nxp.com>
Reviewed-by: Sandor Yu <sandor.yu@nxp.com>
(cherry picked from commit bf7d2bb06ca3bdf88a8aa86ac39b7d3f44134ea5)
Diffstat (limited to 'drivers/media/platform/mxc')
-rw-r--r-- | drivers/media/platform/mxc/capture/ov5640_mipi_v2.c | 31 |
1 files changed, 4 insertions, 27 deletions
diff --git a/drivers/media/platform/mxc/capture/ov5640_mipi_v2.c b/drivers/media/platform/mxc/capture/ov5640_mipi_v2.c index ae41a6687100..0062be01b269 100644 --- a/drivers/media/platform/mxc/capture/ov5640_mipi_v2.c +++ b/drivers/media/platform/mxc/capture/ov5640_mipi_v2.c @@ -1530,39 +1530,16 @@ static struct v4l2_subdev_ops ov5640_subdev_ops = { static void ov5640_adjust_setting_20mhz(void) { - struct ov5640_mode_info *modeinfo; struct reg_value *regsetting; - int i, j, k, array_size; + int i, array_size; /* adjust for INIT mode */ regsetting = ov5640_init_setting_30fps_VGA; array_size = ARRAY_SIZE(ov5640_init_setting_30fps_VGA); - for (k = 0; k < array_size; k++, regsetting++) - if (regsetting->u16RegAddr == 0x3036) - regsetting->u8Val = 0x44; - - /* adjust for other modes */ - for (i = 0; i < ARRAY_SIZE(ov5640_mode_info_data); i++) { - for (j = 0; j < ov5640_mode_MAX; j++) { - modeinfo = &ov5640_mode_info_data[i][j]; - regsetting = modeinfo->init_data_ptr; - array_size = modeinfo->init_data_size; - if (regsetting == NULL || array_size == 0) - continue; - - for (k = 0; k < array_size; k++, regsetting++) { - if (regsetting->u16RegAddr == 0x3036) { - if (modeinfo->width == 640) - regsetting->u8Val = 0x44; - else if (modeinfo->width == 720) - regsetting->u8Val = 0x87; - else - regsetting->u8Val = 0x65; - } - } - } - } + for (i = 0; i < array_size; i++, regsetting++) + if (regsetting->u16RegAddr == 0x3037) + regsetting->u8Val = 0x17; } /*! |