From patchwork Tue Jun 14 22:49:26 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Longerbeam X-Patchwork-Id: 9177115 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C03A46021C for ; Tue, 14 Jun 2016 22:52:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B036328307 for ; Tue, 14 Jun 2016 22:52:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A51B22833F; Tue, 14 Jun 2016 22:52:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CDC6728307 for ; Tue, 14 Jun 2016 22:52:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932158AbcFNWwI (ORCPT ); Tue, 14 Jun 2016 18:52:08 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:34751 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753033AbcFNWv1 (ORCPT ); Tue, 14 Jun 2016 18:51:27 -0400 Received: by mail-pf0-f196.google.com with SMTP id 66so306523pfy.1 for ; Tue, 14 Jun 2016 15:51:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=sHRLlnsArpNMAYllccAjywMV8U8iPoGHNnv+18u9sSM=; b=wGMCog4pv7+LxF5JzMWSfjbrPm8LMv/LKZ+PFxWznsL1ZOQtXL4rRqq8sINcvCGKmT WMPIQd0tB6gxk3WAWWov1D9X3+2q0vzP844hNkRH8540jyNw1idmqonPzmlNIn+fBPHX hPMTWCjv6DlQIigM0sGSAoQabICaErOMkD5TTsQLrwNCJbNtQi3ZqF83KPnsQHeNLprA hvwBjm5JecssFn3i6DX9gAsXs8Q9A3oe4RLc2j0BHiItB1RRulMHkoHJ7mAPf8+dFVs3 BGMhU33z1BribZn3s/rBeuBqb7rt9Uyv7RE3Cbk6JrSTsNYhb/RAxzTswekZaueIpLEE woUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=sHRLlnsArpNMAYllccAjywMV8U8iPoGHNnv+18u9sSM=; b=A2a0Z2oGgtKiJehbbhXl8t21LVrxSwG0aMZIjvGJBXT1SMdkjOZ+104pYG7Db7ONBj Yc78FPP+04kLX1JuYJk6dseSWszEnCS4zNNle7U6m/OCDdRS6Ic01HeHRgm8P0YLwhow /IuVcLxkqs/ii2yrNWm5HgzLVVFUrF7srtqNohpTTXQhXb6IyTSVP9NMRpeBA/Vo6VYz LeL32yiVW6dmqPFEpYgUrvJa4/lHl3YrrbCAyOiis3vssKex3Cud8YoYVneEVD1PHlJK IraaMKce/7WI+4Qv5UO/nZYjpP4qBIR7x+z1vwYWF3VmDOiPdJSNIm3SxYuQgi4a5MLo seuw== X-Gm-Message-State: ALyK8tKPcx+6ZBo5PoAGxx/F+7DQ6eHbfFUef0aXMDbdpRO0cfXVanmCPjPExWNS+Al+IA== X-Received: by 10.66.253.70 with SMTP id zy6mr41379pac.55.1465944686860; Tue, 14 Jun 2016 15:51:26 -0700 (PDT) Received: from mothership.sklembedded.com (c-73-241-2-21.hsd1.ca.comcast.net. [73.241.2.21]) by smtp.googlemail.com with ESMTPSA id v184sm47829999pfb.24.2016.06.14.15.51.26 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 14 Jun 2016 15:51:26 -0700 (PDT) From: Steve Longerbeam X-Google-Original-From: Steve Longerbeam To: linux-media@vger.kernel.org Cc: Steve Longerbeam Subject: [PATCH 30/38] media: imx: Add MIPI CSI-2 Receiver driver Date: Tue, 14 Jun 2016 15:49:26 -0700 Message-Id: <1465944574-15745-31-git-send-email-steve_longerbeam@mentor.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1465944574-15745-1-git-send-email-steve_longerbeam@mentor.com> References: <1465944574-15745-1-git-send-email-steve_longerbeam@mentor.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Adds MIPI CSI-2 Receiver subdev driver. This subdev is required for sensors with a MIPI CSI2 interface. Signed-off-by: Steve Longerbeam --- drivers/staging/media/imx/capture/Kconfig | 8 + drivers/staging/media/imx/capture/Makefile | 1 + drivers/staging/media/imx/capture/mipi-csi2.c | 373 ++++++++++++++++++++++++++ 3 files changed, 382 insertions(+) create mode 100644 drivers/staging/media/imx/capture/mipi-csi2.c diff --git a/drivers/staging/media/imx/capture/Kconfig b/drivers/staging/media/imx/capture/Kconfig index ee2cbab..ac6fce0 100644 --- a/drivers/staging/media/imx/capture/Kconfig +++ b/drivers/staging/media/imx/capture/Kconfig @@ -1,3 +1,11 @@ menu "i.MX5/6 Camera Sub devices" +config IMX_MIPI_CSI2 + tristate "MIPI CSI2 Receiver Driver" + depends on VIDEO_IMX_CAMERA + default y + ---help--- + MIPI CSI-2 Receiver driver support. This driver is required + for sensor drivers with a MIPI CSI2 interface. + endmenu diff --git a/drivers/staging/media/imx/capture/Makefile b/drivers/staging/media/imx/capture/Makefile index 5c965f9..8961a4f 100644 --- a/drivers/staging/media/imx/capture/Makefile +++ b/drivers/staging/media/imx/capture/Makefile @@ -3,3 +3,4 @@ imx-camera-objs := imx-camif.o imx-ic-prpenc.o imx-of.o \ obj-$(CONFIG_VIDEO_IMX_CAMERA) += imx-camera.o obj-$(CONFIG_VIDEO_IMX_CAMERA) += imx-csi.o +obj-$(CONFIG_IMX_MIPI_CSI2) += mipi-csi2.o diff --git a/drivers/staging/media/imx/capture/mipi-csi2.c b/drivers/staging/media/imx/capture/mipi-csi2.c new file mode 100644 index 0000000..d0a8c10 --- /dev/null +++ b/drivers/staging/media/imx/capture/mipi-csi2.c @@ -0,0 +1,373 @@ +/* + * MIPI CSI-2 Receiver Subdev for Freescale i.MX5/6 SOC. + * + * Copyright (c) 2012-2014 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 +#include +#include +#include +#include