]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
media: i2c: ov5647: Support HFLIP and VFLIP
authorDavid Plowman <david.plowman@raspberrypi.com>
Mon, 22 Dec 2025 08:15:34 +0000 (13:45 +0530)
committerHans Verkuil <hverkuil+cisco@kernel.org>
Wed, 14 Jan 2026 22:33:03 +0000 (23:33 +0100)
commitebde37e5ef1a0b34c170118eaa22ff86c3ed5b40
treeebf0d2962c00d580d97ad06676919e549c9b12e9
parent4885fb98350f76dd05c0f352925a53e2c20d390a
media: i2c: ov5647: Support HFLIP and VFLIP

Add missing controls for horizontal and vertical flipping.

The sensor readout mirrors in the horizontal direction by default (if
0x3821[1] = 0) which can make things unnecessarily difficult for
applications. The register table prior to this commit was setting that
bit explicitly, to achieve a normally oriented image.

Now that we have userspace controls for HFLIP, we keep the convention
and report the non-mirrored image (with 0x3821[1] = 1) as
horizontal_flip=0, and vice versa.

Signed-off-by: David Plowman <david.plowman@raspberrypi.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Co-developed-by: Jai Luthra <jai.luthra@ideasonboard.com>
Signed-off-by: Jai Luthra <jai.luthra@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
drivers/media/i2c/ov5647.c