]> www.infradead.org Git - users/jedix/linux-maple.git/commit
media: i2c: imx415: Make HBLANK controllable and in consistent units
authorDave Stevenson <dave.stevenson@raspberrypi.com>
Wed, 29 Jan 2025 15:03:50 +0000 (15:03 +0000)
committerHans Verkuil <hverkuil@xs4all.nl>
Sat, 15 Feb 2025 14:22:58 +0000 (15:22 +0100)
commit4e42bc8bf9899ad7f40474594e324d08b7612119
treeb9f613fdf11f05a42d66e71d4956ee50ce3deba6
parent3bcae55ab96a96ff7466164207365a853edf8756
media: i2c: imx415: Make HBLANK controllable and in consistent units

The control of HMAX documented in the datasheet is consistent
with being in terms of a scaled INCK, being always 72MHz or
74.25MHz. It is NOT link frequency dependent, but the minimum
value for HMAX is dictated by the link frequency.

If PIXEL_RATE is defined as being 12 times the 72 or 74.25MHz,
and all values are scaled down again when writing HMAX, then
the numbers all work out regardless of INCK or link frequency.
Retain an hmax_min (set to the same value as the previous fixed
hmax register value) to set as the default value to avoid changing
the behaviour for existing users.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Reviewed-by: Michael Riesch <michael.riesch@wolfvision.net>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
drivers/media/i2c/imx415.c