media: atomisp: ov2680: Remove unnecessary registers from ov2680_global_setting[]
authorHans de Goede <hdegoede@redhat.com>
Sun, 4 Jun 2023 16:14:04 +0000 (17:14 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Fri, 9 Jun 2023 14:44:46 +0000 (15:44 +0100)
commit61ae5ec4c8b8ffbe160ce1acaa860eb9599c46a7
tree8e3c8c49feb069747086a95be9430cd8c037fd08
parent7d45a432251a30ed0252655177e708229b163291
media: atomisp: ov2680: Remove unnecessary registers from ov2680_global_setting[]

Many of the values in ov2680_global_setting[] match the default/reset
register value for the ov2680 sensor (verified with both datasheet
and actual hw) so they are no-ops.

And there are also a couple of others which are later overwritten
by ctrls or by ov2680_set_mode().

Remove all the unnecessary entries and add annotations to
the remaining entries documenting what they change
(in so far as things are documented in the datasheet).

This also removes the double writing of OV2680_REG_SOFT_RESET in
ov2680_init_registers() (one direct write, one in ov2680_global_setting[])
instead add a short sleep after the first write to give the sensor
time to reset.

Link: https://lore.kernel.org/r/20230604161406.69369-4-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>
drivers/staging/media/atomisp/i2c/atomisp-ov2680.c
drivers/staging/media/atomisp/i2c/ov2680.h