]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
media: i2c: imx290: Compute pixel rate and blanking in one place
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Mon, 16 Jan 2023 14:44:43 +0000 (15:44 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Fri, 3 Feb 2023 14:00:57 +0000 (15:00 +0100)
commit693b5cb598cc787dd61b8b626bfd45c26b5b1290
tree0f39801eb9e2e434ee935a3236252a4911fa4233
parent31b54a422b3f66f715a0963d1d3ce0c7678fb333
media: i2c: imx290: Compute pixel rate and blanking in one place

The hblank, vblank, pixel rate and link frequency values and limits are
currently computed when creating controls, in imx290_ctrl_init(), and
updated in imx290_ctrl_update(). This duplicates the logic in different
places. Simplify the code by setting the control values and limits to
hardcoded values when creating the controls, and call
imx290_ctrl_update() to then update them.

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