From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030938AbdAFSMC (ORCPT ); Fri, 6 Jan 2017 13:12:02 -0500 Received: from mail-pg0-f65.google.com ([74.125.83.65]:36812 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756668AbdAFSL5 (ORCPT ); Fri, 6 Jan 2017 13:11:57 -0500 Subject: Re: [PATCH v2 12/19] media: imx: Add SMFC subdev driver To: Vladimir Zapolskiy , shawnguo@kernel.org, kernel@pengutronix.de, fabio.estevam@nxp.com, robh+dt@kernel.org, mark.rutland@arm.com, linux@armlinux.org.uk, mchehab@kernel.org, gregkh@linuxfoundation.org, p.zabel@pengutronix.de References: <1483477049-19056-1-git-send-email-steve_longerbeam@mentor.com> <1483477049-19056-13-git-send-email-steve_longerbeam@mentor.com> <13ff9579-ce8e-9272-ee44-9b597631f6b5@mentor.com> Cc: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, devel@driverdev.osuosl.org, Steve Longerbeam From: Steve Longerbeam Message-ID: <7814d422-0782-9e5a-bcd9-29e747ba2858@gmail.com> Date: Fri, 6 Jan 2017 10:11:54 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <13ff9579-ce8e-9272-ee44-9b597631f6b5@mentor.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/04/2017 06:23 AM, Vladimir Zapolskiy wrote: > On 01/03/2017 10:57 PM, Steve Longerbeam wrote: >> This is a media entity subdevice driver for the i.MX Sensor Multi-FIFO >> Controller module. Video frames are received from the CSI and can >> be routed to various sinks including the i.MX Image Converter for >> scaling, color-space conversion, motion compensated deinterlacing, >> and image rotation. >> >> Signed-off-by: Steve Longerbeam >> --- >> drivers/staging/media/imx/Makefile | 1 + >> drivers/staging/media/imx/imx-smfc.c | 739 +++++++++++++++++++++++++++++++++++ >> 2 files changed, 740 insertions(+) >> create mode 100644 drivers/staging/media/imx/imx-smfc.c >> >> diff --git a/drivers/staging/media/imx/Makefile b/drivers/staging/media/imx/Makefile >> index 133672a..3559d7b 100644 >> --- a/drivers/staging/media/imx/Makefile >> +++ b/drivers/staging/media/imx/Makefile >> @@ -5,4 +5,5 @@ obj-$(CONFIG_VIDEO_IMX_MEDIA) += imx-media.o >> obj-$(CONFIG_VIDEO_IMX_MEDIA) += imx-media-common.o >> >> obj-$(CONFIG_VIDEO_IMX_CAMERA) += imx-csi.o >> +obj-$(CONFIG_VIDEO_IMX_CAMERA) += imx-smfc.o > May be > > obj-$(CONFIG_VIDEO_IMX_CAMERA) += imx-csi.o imx-smfc.o I'd prefer to keep them on separate lines, to indicate they are all built as separate modules. > >> >> diff --git a/drivers/staging/media/imx/imx-smfc.c b/drivers/staging/media/imx/imx-smfc.c >> new file mode 100644 >> index 0000000..565048c >> --- /dev/null >> +++ b/drivers/staging/media/imx/imx-smfc.c >> @@ -0,0 +1,739 @@ >> +/* >> + * V4L2 Capture SMFC Subdev for Freescale i.MX5/6 SOC >> + * >> + * This subdevice handles capture of raw/unconverted video frames >> + * from the CSI, directly to memory via the Sensor Multi-FIFO Controller. >> + * >> + * Copyright (c) 2012-2016 Mentor Graphics Inc. >> + * >> + * This program is free software; you can redistribute it and/or modify >> + * it under the terms of the GNU General Public License as published by >> + * the Free Software Foundation; either version 2 of the License, or >> + * (at your option) any later version. >> + */ >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include > Please sort the list of headers alphabetically. done. > >> +static irqreturn_t imx_smfc_eof_interrupt(int irq, void *dev_id) >> +{ >> + struct imx_smfc_priv *priv = dev_id; >> + struct imx_media_dma_buf *done, *next; >> + unsigned long flags; >> + >> + spin_lock_irqsave(&priv->irqlock, flags); > spin_lock(&priv->irqlock) should be sufficient. yes thanks. > >> + >> +static const struct platform_device_id imx_smfc_ids[] = { >> + { .name = "imx-ipuv3-smfc" }, >> + { }, >> +}; >> +MODULE_DEVICE_TABLE(platform, imx_smfc_ids); >> + >> +static struct platform_driver imx_smfc_driver = { >> + .probe = imx_smfc_probe, >> + .remove = imx_smfc_remove, >> + .id_table = imx_smfc_ids, >> + .driver = { >> + .name = "imx-ipuv3-smfc", >> + .owner = THIS_MODULE, > You can drop owner assignment. done. Steve