media: i2c: imx258: Follow normal V4L2 behaviours for clipping exposure
authorDave Stevenson <dave.stevenson@raspberrypi.com>
Wed, 16 Jun 2021 16:19:17 +0000 (17:19 +0100)
committerDom Cobley <popcornmix@gmail.com>
Mon, 19 Feb 2024 11:33:33 +0000 (11:33 +0000)
commit3f0e27d3d0a87939a14af85613c4ef35c7af29f9
tree44c7add22307c22af544515fa6a99bfcb6d5b289
parent970be7ec2feb9a062881789df3765c25c16348d8
media: i2c: imx258: Follow normal V4L2 behaviours for clipping exposure

V4L2 sensor drivers are expected are expected to clip the supported
exposure range based on the VBLANK configured.
IMX258 wasn't doing that as register 0x350 (FRM_LENGTH_CTL)
switches it to a mode where frame length tracks coarse exposure time.

Disable this mode and clip the range for V4L2_CID_EXPOSURE appropriately
based on V4L2_CID_VBLANK.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
drivers/media/i2c/imx258.c