Skip to content

Commit 247c1ab

Browse files
committed
drivers: video: ov2640 driver: Enhancing ov2640 driver
Minor fixes, cleanup Signed-off-by: Roman Pustobaiev <[email protected]>
1 parent 3355ed0 commit 247c1ab

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

drivers/video/ov2640.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -482,8 +482,6 @@ static const struct ov2640_reg uxga_regs[] = {
482482
{R_DVP_SP, R_DVP_SP_AUTO_MODE | 0x04},
483483

484484
{R_BYPASS, R_BYPASS_DSP_EN},
485-
/* Keep reset asserted as zoom config is coming next */
486-
/* { RESET, 0x00 }, */
487485
{0, 0},
488486
};
489487

@@ -858,9 +856,7 @@ static int ov2640_set_vertical_flip(const struct device *dev, int enable)
858856

859857
static const struct ov2640_win_size *ov2640_select_win(uint32_t width, uint32_t height)
860858
{
861-
int i;
862-
863-
for (i = 0; i < ARRAY_SIZE(ov2640_supported_win_sizes); i++) {
859+
for (int i = 0; i < ARRAY_SIZE(ov2640_supported_win_sizes); i++) {
864860
if (ov2640_supported_win_sizes[i].width >= width &&
865861
ov2640_supported_win_sizes[i].height >= height) {
866862
return &ov2640_supported_win_sizes[i];
@@ -887,7 +883,7 @@ static int ov2640_set_resolution(const struct device *dev,
887883
LOG_INF("Selected resolution %s", win->name);
888884

889885
/* Write DSP input registers */
890-
ret |= ov2640_write_all(dev, uxga_regs, ARRAY_SIZE(uxga_regs));
886+
ret = ov2640_write_all(dev, uxga_regs, ARRAY_SIZE(uxga_regs));
891887
if (ret < 0) {
892888
return ret;
893889
}

0 commit comments

Comments
 (0)