Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions drivers/media/i2c/ov5693.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@

/* Analogue Gain */
#define OV5693_GAIN_CTRL_REG CCI_REG16(0x350a)
#define OV5693_GAIN_CTRL_MASK GENMASK(10, 4)
#define OV5693_GAIN_CTRL_MASK GENMASK(10, 0)
#define OV5693_GAIN_MIN 1
#define OV5693_GAIN_MAX 127
#define OV5693_GAIN_DEF 8
#define OV5693_GAIN_MAX 2047
#define OV5693_GAIN_DEF 16
#define OV5693_GAIN_STEP 1

/* Digital Gain */
Expand Down Expand Up @@ -444,7 +444,7 @@ static int ov5693_analog_gain_configure(struct ov5693_device *ov5693, u32 gain)
{
int ret = 0;

gain = (gain << 4) & OV5693_GAIN_CTRL_MASK;
gain &= OV5693_GAIN_CTRL_MASK;

cci_write(ov5693->regmap, OV5693_GAIN_CTRL_REG, gain, &ret);

Expand Down