Skip to content

Commit 45fc595

Browse files
trunghieulenxpngphibang
authored andcommitted
drivers: video: ov5640: Fix constrast value sign
Fix sign's register for constrast value. Signed-off-by: Trung Hieu Le <trunghieu.le@nxp.com> Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
1 parent 67709b4 commit 45fc595

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

drivers/video/ov5640.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1049,6 +1049,11 @@ static int ov5640_set_ctrl_contrast(const struct device *dev, int value)
10491049
return ret;
10501050
}
10511051

1052+
ret = ov5640_modify_reg(&cfg->i2c, SDE_CTRL6_REG, BIT(2), value >= 0 ? 0 : BIT(2));
1053+
if (ret) {
1054+
return ret;
1055+
}
1056+
10521057
return ov5640_write_reg(&cfg->i2c, SDE_CTRL6_REG, value & 0xff);
10531058
}
10541059

0 commit comments

Comments
 (0)