From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-qk0-f196.google.com ([209.85.220.196]:33110 "EHLO mail-qk0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751292AbcKHHSe (ORCPT ); Tue, 8 Nov 2016 02:18:34 -0500 Received: by mail-qk0-f196.google.com with SMTP id x190so13854391qkb.0 for ; Mon, 07 Nov 2016 23:18:03 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <1476466481-24030-8-git-send-email-p.zabel@pengutronix.de> References: <1476466481-24030-1-git-send-email-p.zabel@pengutronix.de> <1476466481-24030-8-git-send-email-p.zabel@pengutronix.de> From: Ying Liu Date: Tue, 8 Nov 2016 15:18:02 +0800 Message-ID: Subject: Re: [PATCH v2 07/21] [media] imx-ipu: Add i.MX IPUv3 CSI subdevice driver To: Philipp Zabel Cc: linux-media@vger.kernel.org, Steve Longerbeam , Marek Vasut , Hans Verkuil , Gary Bisson , kernel@pengutronix.de, Sascha Hauer , Marc Kleine-Budde Content-Type: text/plain; charset=UTF-8 Sender: linux-media-owner@vger.kernel.org List-ID: Hi Philipp, On Sat, Oct 15, 2016 at 1:34 AM, Philipp Zabel wrote: > This adds a V4L2 subdevice driver for the two CMOS Sensor Interface (CSI) > modules contained in each IPUv3. These sample video data from the > parallel CSI0/1 pads or from the the MIPI CSI-2 bridge via IOMUXC video > bus multiplexers and write to IPU internal FIFOs to deliver data to > either the IDMAC or IC modules. > > Signed-off-by: Sascha Hauer > Signed-off-by: Marc Kleine-Budde > Signed-off-by: Philipp Zabel > --- > Changes since v1: > - Propagate field and colorspace in ipucsi_subdev_set_format. > - Recursively call s_stream on upstream subdev. > --- > drivers/media/platform/imx/Kconfig | 7 + > drivers/media/platform/imx/Makefile | 1 + > drivers/media/platform/imx/imx-ipuv3-csi.c | 547 +++++++++++++++++++++++++++++ > 3 files changed, 555 insertions(+) > create mode 100644 drivers/media/platform/imx/imx-ipuv3-csi.c > > diff --git a/drivers/media/platform/imx/Kconfig b/drivers/media/platform/imx/Kconfig > index 1662bb0b..a88c4f7 100644 > --- a/drivers/media/platform/imx/Kconfig > +++ b/drivers/media/platform/imx/Kconfig > @@ -8,3 +8,10 @@ config MEDIA_IMX > > config VIDEO_IMX_IPU_COMMON > tristate > + > +config VIDEO_IMX_IPU_CSI > + tristate "i.MX5/6 CMOS Sensor Interface driver" > + depends on VIDEO_DEV && IMX_IPUV3_CORE && MEDIA_IMX Should depend on VIDEO_V4L2_SUBDEV_API, otherwise v4l2_subdev_get_try_format() would break build. Regards, Liu Ying > + select VIDEO_IMX_IPUV3 > + ---help--- > + This is a v4l2 subdevice driver for two CSI modules in each IPUv3. > diff --git a/drivers/media/platform/imx/Makefile b/drivers/media/platform/imx/Makefile > index 0ba601a..82a3616 100644 > --- a/drivers/media/platform/imx/Makefile > +++ b/drivers/media/platform/imx/Makefile > @@ -1,2 +1,3 @@ > obj-$(CONFIG_MEDIA_IMX) += imx-media.o > obj-$(CONFIG_VIDEO_IMX_IPU_COMMON) += imx-ipu.o > +obj-$(CONFIG_VIDEO_IMX_IPU_CSI) += imx-ipuv3-csi.o > diff --git a/drivers/media/platform/imx/imx-ipuv3-csi.c b/drivers/media/platform/imx/imx-ipuv3-csi.c > new file mode 100644 > index 0000000..83e0511 > --- /dev/null > +++ b/drivers/media/platform/imx/imx-ipuv3-csi.c > @@ -0,0 +1,547 @@ > +/* > + * i.MX IPUv3 CSI V4L2 Subdevice Driver > + * > + * Copyright (C) 2016, Pengutronix, Philipp Zabel > + * > + * Based on code > + * Copyright (C) 2006, Sascha Hauer, Pengutronix > + * Copyright (C) 2008, Guennadi Liakhovetski > + * Copyright (C) 2008, Paulius Zaleckas > + * Copyright (C) 2009, Darius Augulis > + * > + * This program is free software; you can redistribute it and/or modify > + * it under the terms of the GNU General Public License version 2 as > + * published by the Free Software Foundation. > + */ > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > + > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > + > +#include