media: i2c: imx290: Factor out black level setting to a function
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Mon, 16 Jan 2023 14:44:44 +0000 (15:44 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Fri, 3 Feb 2023 14:01:23 +0000 (15:01 +0100)
commitee4ce89366935da1c044d0417bf09f9f0e4a3457
tree9648579f1e981a926c3629bdc81c917b02e1560f
parent693b5cb598cc787dd61b8b626bfd45c26b5b1290
media: i2c: imx290: Factor out black level setting to a function

The black level programmed in the BLKLEVEL register depends on the
output format. The black level value computation is currently performed
in imx290_set_ctrl(), in addition to having different black level values
in the output-specific register value tables. Move it to a separate
function to simplify the imx290_set_ctrl() code.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Alexander Stein <alexander.stein@ew.tq-group.com>
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/imx290.c