summaryrefslogtreecommitdiff
path: root/drivers/media/i2c/alvium-csi2.c
diff options
context:
space:
mode:
authorTommaso Merciai <tomm.merciai@gmail.com>2024-06-10 11:10:32 +0300
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2024-06-15 12:16:39 +0300
commit50b631c6ecb33d45fe6919645bf19fdd3ab82f26 (patch)
tree52f9c9d87fff60ddada18601951c740e644bba93 /drivers/media/i2c/alvium-csi2.c
parent6be70e7981a00412b3fa99ab3b3f13ce908c0718 (diff)
downloadlinux-50b631c6ecb33d45fe6919645bf19fdd3ab82f26.tar.xz
media: i2c: alvium: enable acquisition frame rate
Alvium camera by default is in free running mode. Datasheet say that acquisition frame rate reg can only be used if frame start trigger mode is set to off. Enable r/w acquisition frame rate and turn off trigger mode. Signed-off-by: Tommaso Merciai <tomm.merciai@gmail.com> [Sakari Ailus: Fix spelling of "acquisition".] Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Diffstat (limited to 'drivers/media/i2c/alvium-csi2.c')
-rw-r--r--drivers/media/i2c/alvium-csi2.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/media/i2c/alvium-csi2.c b/drivers/media/i2c/alvium-csi2.c
index 7a38c424ea48..a88809333e56 100644
--- a/drivers/media/i2c/alvium-csi2.c
+++ b/drivers/media/i2c/alvium-csi2.c
@@ -1189,6 +1189,20 @@ static int alvium_set_frame_rate(struct alvium_dev *alvium, u64 fr)
struct device *dev = &alvium->i2c_client->dev;
int ret;
+ ret = alvium_write_hshake(alvium, REG_BCRM_ACQUISITION_FRAME_RATE_EN_RW,
+ 1);
+ if (ret) {
+ dev_err(dev, "Fail to set acquisition frame rate enable reg\n");
+ return ret;
+ }
+
+ ret = alvium_write_hshake(alvium, REG_BCRM_FRAME_START_TRIGGER_MODE_RW,
+ 0);
+ if (ret) {
+ dev_err(dev, "Fail to set frame start trigger mode reg\n");
+ return ret;
+ }
+
ret = alvium_write_hshake(alvium, REG_BCRM_ACQUISITION_FRAME_RATE_RW,
fr);
if (ret) {