diff options
author | Hans de Goede <hdegoede@redhat.com> | 2023-06-04 17:14:05 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@kernel.org> | 2023-06-09 15:45:59 +0100 |
commit | dbacd5c5e1ff4220c239f4522de3450996cea62f (patch) | |
tree | 2d0eb10aaea70ac8750b10de06302794a90612fc /drivers | |
parent | 61ae5ec4c8b8ffbe160ce1acaa860eb9599c46a7 (diff) | |
download | linux-dbacd5c5e1ff4220c239f4522de3450996cea62f.tar.gz linux-dbacd5c5e1ff4220c239f4522de3450996cea62f.tar.bz2 linux-dbacd5c5e1ff4220c239f4522de3450996cea62f.zip |
media: atomisp: ov2680: Rename unknown/0x370a to sensor_ctrl_0a
The data sheets say the registers at offset 0x3700 - 0x373f are
"sensor control" registers rename the unknown variable in
ov2680_set_mode() to sensor_ctrl_0a and add
a OV2680_REG_SENSOR_CTRL_0A define.
Link: https://lore.kernel.org/r/20230604161406.69369-5-hdegoede@redhat.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/media/atomisp/i2c/atomisp-ov2680.c | 8 | ||||
-rw-r--r-- | drivers/staging/media/atomisp/i2c/ov2680.h | 2 |
2 files changed, 6 insertions, 4 deletions
diff --git a/drivers/staging/media/atomisp/i2c/atomisp-ov2680.c b/drivers/staging/media/atomisp/i2c/atomisp-ov2680.c index 85e01358fa19..4cc2839937af 100644 --- a/drivers/staging/media/atomisp/i2c/atomisp-ov2680.c +++ b/drivers/staging/media/atomisp/i2c/atomisp-ov2680.c @@ -248,22 +248,22 @@ static void ov2680_calc_mode(struct ov2680_dev *sensor) static int ov2680_set_mode(struct ov2680_dev *sensor) { struct i2c_client *client = sensor->client; - u8 unknown, inc, fmt1, fmt2; + u8 sensor_ctrl_0a, inc, fmt1, fmt2; int ret; if (sensor->mode.binning) { - unknown = 0x23; + sensor_ctrl_0a = 0x23; inc = 0x31; fmt1 = 0xc2; fmt2 = 0x01; } else { - unknown = 0x21; + sensor_ctrl_0a = 0x21; inc = 0x11; fmt1 = 0xc0; fmt2 = 0x00; } - ret = ov_write_reg8(client, 0x370a, unknown); + ret = ov_write_reg8(client, OV2680_REG_SENSOR_CTRL_0A, sensor_ctrl_0a); if (ret) return ret; diff --git a/drivers/staging/media/atomisp/i2c/ov2680.h b/drivers/staging/media/atomisp/i2c/ov2680.h index 6a71de55600b..d032af245674 100644 --- a/drivers/staging/media/atomisp/i2c/ov2680.h +++ b/drivers/staging/media/atomisp/i2c/ov2680.h @@ -72,6 +72,8 @@ #define OV2680_REG_EXPOSURE_PK_HIGH 0x3500 #define OV2680_REG_GAIN_PK 0x350a +#define OV2680_REG_SENSOR_CTRL_0A 0x370a + #define OV2680_HORIZONTAL_START_H 0x3800 /* Bit[11:8] */ #define OV2680_HORIZONTAL_START_L 0x3801 /* Bit[7:0] */ #define OV2680_VERTICAL_START_H 0x3802 /* Bit[11:8] */ |