Re: [PATCH 2/2] V4L: soc_camera: disable I2C subdev streamon for mpc52xx_csi

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Anatolij

On Fri, 28 Sep 2012, Anatolij Gustschin wrote:

> With mpc52xx_csi interface I2C subdev streamon after vb2_streamon()
> doesn't work due to mpc52xx sensor interface glue-logic restrictions.
> 
> Since mpc5200 doesn't have a camera sensor interface, the sensor on
> O2D cameras is connected to the LocalPlus bus by special glue-logic.
> While sensor read-out the sensor will be clocked with the bus chip-
> select signal as the sensor clock so that the read-out is synchronous
> with the data accesses on the bus. Therefore, I2C access can't be
> performed when the glue-logic is setup for sensor read-out.
> 
> mpc52xx_csi driver for O2D cameras performs I2C subdev streamon in
> its start_streaming() operation and then disables the I2C bus access
> by configuring the interface glue-logic for sensor read-out.
> For above-mentioned reasons we disable this subdev call here.
> 
> Signed-off-by: Anatolij Gustschin <agust@xxxxxxx>
> ---
>  drivers/media/platform/soc_camera/soc_camera.c |    5 ++++-
>  1 files changed, 4 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/media/platform/soc_camera/soc_camera.c b/drivers/media/platform/soc_camera/soc_camera.c
> index f6b1c1f..64e0abb 100644
> --- a/drivers/media/platform/soc_camera/soc_camera.c
> +++ b/drivers/media/platform/soc_camera/soc_camera.c
> @@ -809,7 +809,7 @@ static int soc_camera_streamon(struct file *file, void *priv,
>  {
>  	struct soc_camera_device *icd = file->private_data;
>  	struct soc_camera_host *ici = to_soc_camera_host(icd->parent);
> -	struct v4l2_subdev *sd = soc_camera_to_subdev(icd);
> +	struct v4l2_subdev __maybe_unused *sd = soc_camera_to_subdev(icd);
>  	int ret;
>  
>  	WARN_ON(priv != file->private_data);
> @@ -826,8 +826,11 @@ static int soc_camera_streamon(struct file *file, void *priv,
>  	else
>  		ret = vb2_streamon(&icd->vb2_vidq, i);
>  
> +#if !defined(CONFIG_VIDEO_MPC52xx_CSI) && \
> +    !defined(CONFIG_VIDEO_MPC52xx_CSI_MODULE)

No, we're not adding any preprocessor or run-time hardware dependencies to 
soc-camera or to any other generic code. I have no idea what those "IFM 
O2D" cameras are. If it's their common feature, that they cannot take any 
further I2C commands, while streaming, their drivers have to do that 
themselves. And not only for stream-on, there are many operations, that 
are allowed during streaming.

Thanks
Guennadi

>  	if (!ret)
>  		v4l2_subdev_call(sd, video, s_stream, 1);
> +#endif
>  
>  	return ret;
>  }
> -- 
> 1.7.1
> 

---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux