Re: [PATCH 2/4] [media] marvell-ccic: core: add soc camera support on marvell-ccic mcam-core

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

 



On Fri September 28 2012 15:47:20 Albert Wang wrote:
> From: Libin Yang <lbyang@xxxxxxxxxxx>
> 
> This patch adds the support of Soc Camera on marvell-ccic mcam-core.
> The Soc Camera mode does not compatible with current mode.
> Only one mode can be used at one time.
> 
> To use Soc Camera, CONFIG_VIDEO_MMP_SOC_CAMERA should be defined.
> What's more, the platform driver should support Soc camera at the same time.
> 
> Also add MIPI interface and dual CCICs support in Soc Camera mode.
> 
> Signed-off-by: Albert Wang <twang13@xxxxxxxxxxx>
> Signed-off-by: Libin Yang <lbyang@xxxxxxxxxxx>
> ---
>  drivers/media/platform/marvell-ccic/mcam-core.c | 1034 ++++++++++++++++++++++----
>  drivers/media/platform/marvell-ccic/mcam-core.h |  126 +++-
>  2 files changed, 997 insertions(+), 163 deletions(-)
> 
> diff --git a/drivers/media/platform/marvell-ccic/mcam-core.c b/drivers/media/platform/marvell-ccic/mcam-core.c
> index ce2b7b4..4adb1ca 100755
> --- a/drivers/media/platform/marvell-ccic/mcam-core.c
> +++ b/drivers/media/platform/marvell-ccic/mcam-core.c

...

> +static int mcam_camera_querycap(struct soc_camera_host *ici,
> +			struct v4l2_capability *cap)
> +{
> +	struct v4l2_dbg_chip_ident id;
> +	struct mcam_camera *mcam = ici->priv;
> +	struct soc_camera_device *icd = mcam->icd;
> +	struct v4l2_subdev *sd = soc_camera_to_subdev(icd);
> +	int ret = 0;
> +
> +	cap->version = KERNEL_VERSION(0, 0, 5);

Don't fill in version. It's set to the kernel version automatically.

> +	cap->capabilities = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING;

Please also set cap->device_caps. See the spec.

> +	ret = v4l2_subdev_call(sd, core, g_chip_ident, &id);

Yuck. Don't abuse this. g_chip_ident is for debugging purposes only.

> +	if (ret < 0) {
> +		cam_err(mcam, "%s %d\n", __func__, __LINE__);
> +		return ret;
> +	}
> +
> +	strcpy(cap->card, mcam->card_name);
> +	strncpy(cap->driver, (const char *)&(id.ident), 4);

No, the name of the driver is the name of this module: marvell_ccic.
It's *not* the name of the sensor driver.

> +
> +	return 0;
> +}

Regards,

	Hans
--
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