media: i2c: imx219: Merge format and binning setting functions
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Sun, 24 Sep 2023 15:32:56 +0000 (18:32 +0300)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Sat, 7 Oct 2023 08:55:46 +0000 (10:55 +0200)
commitcff09e76bf7940e2a82d003d80ca89824005008d
tree8bd0dbb6b521cb214e8d45fe3f3f37598e2c3892
parent8921687278d4d5d5c936ea1c106f1a8f4c04f7fd
media: i2c: imx219: Merge format and binning setting functions

The imx219_set_binning() function sets registers based on the bpp value,
which is computed in imx219_set_framefmt(). As both functions are called
from the same place consecutively, and set registers based on the
selected mode, merge them together to simplify the code.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
drivers/media/i2c/imx219.c