Commit 50b631c6 authored by Tommaso Merciai's avatar Tommaso Merciai Committed by Hans Verkuil

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: default avatarTommaso Merciai <tomm.merciai@gmail.com>
[Sakari Ailus: Fix spelling of "acquisition".]
Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
parent 6be70e79
......@@ -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) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment