diff options
author | Alain Volmat <alain.volmat@foss.st.com> | 2023-07-21 14:03:14 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@kernel.org> | 2023-08-10 07:58:36 +0200 |
commit | 7d0e95eb820b09ec432ddc5d9b36586de3dc88a3 (patch) | |
tree | 9c98b2f94b636b8d827d27c0295c76590d52634f /drivers/media | |
parent | 1073f4414184ed27578c63628c109e4a5900ca5c (diff) |
media: i2c: st_mipid02: cascade s_stream call to the source subdev
Cascade the s_stream call to the source subdev whenever the bridge
streaming is enable / disabled.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Reviewed-by: Benjamin Mugnier <benjamin.mugnier@foss.st.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/i2c/st-mipid02.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/media/i2c/st-mipid02.c b/drivers/media/i2c/st-mipid02.c index 782633b9e11e..fa27638edc07 100644 --- a/drivers/media/i2c/st-mipid02.c +++ b/drivers/media/i2c/st-mipid02.c @@ -545,7 +545,14 @@ static int mipid02_configure_from_code(struct mipid02_dev *bridge) static int mipid02_stream_disable(struct mipid02_dev *bridge) { struct i2c_client *client = bridge->i2c_client; - int ret; + int ret = -EINVAL; + + if (!bridge->s_subdev) + goto error; + + ret = v4l2_subdev_call(bridge->s_subdev, video, s_stream, 0); + if (ret) + goto error; /* Disable all lanes */ ret = mipid02_write_reg(bridge, MIPID02_CLK_LANE_REG1, 0); @@ -633,6 +640,10 @@ static int mipid02_stream_enable(struct mipid02_dev *bridge) if (ret) goto error; + ret = v4l2_subdev_call(bridge->s_subdev, video, s_stream, 1); + if (ret) + goto error; + return 0; error: |