media: ar0521: Rework startup sequence
authorJacopo Mondi <jacopo@jmondi.org>
Fri, 4 Nov 2022 14:24:52 +0000 (14:24 +0000)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Fri, 25 Nov 2022 08:46:02 +0000 (08:46 +0000)
commite0b8d21b62561516d5077ec0e57d755e1cf51953
tree56d73c0fd4c1b797b123b70eeccd7167a89fc29d
parentc79f0f15db3c7f2e047f78647a4c2561d9820fc8
media: ar0521: Rework startup sequence

The ar0521_write_mode() function explicitly programs the exposure time
register and the test pattern register, which are now setup by the call
to __v4l2_ctrl_handler_setup() in ar0521_set_stream().

Removing those register writes from ar0521_write_mode() reduces the
function to two operations: geometry configuration and pll
configuration.

Move geomerty configuration in the ar0521_set_stream() caller and rename
ar0521_write_mode() to ar0521_pll_config().

Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/media/i2c/ar0521.c