media: i2c: imx219: Set mode registers programmatically
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Sun, 24 Sep 2023 15:32:55 +0000 (18:32 +0300)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Sat, 7 Oct 2023 08:55:46 +0000 (10:55 +0200)
commit8921687278d4d5d5c936ea1c106f1a8f4c04f7fd
tree8b6149a8b61b40d85215c2585d3517a6cc7a1a02
parent55c3ec033b7e3353d1bed7ab96de8e9abc02fe3a
media: i2c: imx219: Set mode registers programmatically

Replace the per-mode register arrays with code that sets the same
register values using the mode definitions. This avoids duplicating
information in two different places.

The error check for invalid formats in imx219_set_framefmt() is dropped
as the format is guaranteed to be valid.

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