OSDN Git Service

media: ov5640: Make the FPS clamping / rounding more extendable
authorMaxime Ripard <maxime.ripard@bootlin.com>
Mon, 3 Dec 2018 08:44:25 +0000 (03:44 -0500)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Wed, 5 Dec 2018 11:50:14 +0000 (06:50 -0500)
commitf6cc192fbf0892047f28626f2a989400453fd699
tree1f91aebaa6c67084e88f56b041ea33ec4a4ac7c0
parent5a3ad937bc784d44259860196ec987949348b83d
media: ov5640: Make the FPS clamping / rounding more extendable

The current code uses an algorithm to clamp the FPS values and round them
to the closest supported one that isn't really allows to be extended to
more than two values.

Rework it a bit to make it much easier to extend the amount of FPS options
we support.

Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Tested-by: Adam Ford <aford173@gmail.com> #imx6dq
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/i2c/ov5640.c