From patchwork Wed Jul 17 15:47:02 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lad, Prabhakar" X-Patchwork-Id: 2828803 Return-Path: X-Original-To: patchwork-davinci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 4E22C9F9A0 for ; Wed, 17 Jul 2013 15:48:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 116F12037E for ; Wed, 17 Jul 2013 15:48:38 +0000 (UTC) Received: from arroyo.ext.ti.com (arroyo.ext.ti.com [192.94.94.40]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B53142037D for ; Wed, 17 Jul 2013 15:48:36 +0000 (UTC) Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id r6HFlPtO007198; Wed, 17 Jul 2013 10:47:25 -0500 Received: from DFLE73.ent.ti.com (dfle73.ent.ti.com [128.247.5.110]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id r6HFlP0s021948; Wed, 17 Jul 2013 10:47:25 -0500 Received: from dlelxv23.itg.ti.com (172.17.1.198) by DFLE73.ent.ti.com (128.247.5.110) with Microsoft SMTP Server id 14.2.342.3; Wed, 17 Jul 2013 10:47:25 -0500 Received: from linux.omap.com (dlelxs01.itg.ti.com [157.170.227.31]) by dlelxv23.itg.ti.com (8.13.8/8.13.8) with ESMTP id r6HFlP8r019412; Wed, 17 Jul 2013 10:47:25 -0500 Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id 183D780627; Wed, 17 Jul 2013 10:47:25 -0500 (CDT) X-Original-To: davinci-linux-open-source@linux.davincidsp.com Delivered-To: davinci-linux-open-source@linux.davincidsp.com Received: from dflp52.itg.ti.com (dflp52.itg.ti.com [128.247.22.96]) by linux.omap.com (Postfix) with ESMTP id 5CCDF80626 for ; Wed, 17 Jul 2013 10:47:23 -0500 (CDT) Received: from red.ext.ti.com (red.ext.ti.com [192.94.93.37]) by dflp52.itg.ti.com (8.13.7/8.13.8) with ESMTP id r6HFlNCQ009374 for ; Wed, 17 Jul 2013 10:47:23 -0500 (CDT) Received: from mail6.bemta12.messagelabs.com (mail6.bemta12.messagelabs.com [216.82.250.247]) by red.ext.ti.com (8.13.7/8.13.7) with ESMTP id r6HFlMWk022990 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 17 Jul 2013 10:47:22 -0500 Received: from [216.82.250.51:48770] by server-11.bemta-12.messagelabs.com id 36/8C-32766-A8CB6E15; Wed, 17 Jul 2013 15:47:22 +0000 X-Env-Sender: prabhakar.csengg@gmail.com X-Msg-Ref: server-12.tower-108.messagelabs.com!1374076040!13565943!1 X-Originating-IP: [209.85.160.53] X-SpamReason: No, hits=0.2 required=7.0 tests=ML_RADAR_SPEW_LINKS_14, RCVD_ILLEGAL_IP,spamassassin: X-StarScan-Received: X-StarScan-Version: 6.9.9; banners=-,-,- X-VirusChecked: Checked Received: (qmail 22384 invoked from network); 17 Jul 2013 15:47:21 -0000 Received: from mail-pb0-f53.google.com (HELO mail-pb0-f53.google.com) (209.85.160.53) by server-12.tower-108.messagelabs.com with RC4-SHA encrypted SMTP; 17 Jul 2013 15:47:21 -0000 Received: by mail-pb0-f53.google.com with SMTP id xb12so2041646pbc.26 for ; Wed, 17 Jul 2013 08:47:20 -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:x-mailer; bh=ZRqBBVMDzh3O2xP67v9IS0q844vM1Ezy89b4RyXNI7Q=; b=bUT5JXmKLzvSSdkhZiNHCKsPaiSGBDtkeyfkVhX6zCvIR/af0ype5blhSNv76POA9B M2wRN+lMYifCf0szOP0iB0DsB7AKWD18rceZmgbrVexiuU5FGDL78VBEmq9ddgyqGX0+ pLFPtD4YrVJd7PnGYleTKfuBKz9MD7VIEqdeBOvKjEpg54oIDrhwDEMM8TExaTsP0g4T nONGDRs13TAZmTts55gHi1HHqMTgYH7+EDd+1V69r1uGqncBqjgz+8zAbhlHpLjl0ON3 IueaqkyZXFXFykAuHRRKPylSPTObQSw5kt3qiidFdGpQeElB0CPBGEpO0TucGp7TA9DD JU4Q== X-Received: by 10.68.130.38 with SMTP id ob6mr7405681pbb.154.1374076040366; Wed, 17 Jul 2013 08:47:20 -0700 (PDT) Received: from localhost.localdomain ([1.23.216.3]) by mx.google.com with ESMTPSA id iq3sm8533492pbb.20.2013.07.17.08.47.15 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 17 Jul 2013 08:47:19 -0700 (PDT) From: Prabhakar Lad To: LMML , Subject: [PATCH RFC FINAL v5] media: OF: add "sync-on-green-active" property Date: Wed, 17 Jul 2013 21:17:02 +0530 Message-ID: <1374076022-10960-1-git-send-email-prabhakar.csengg@gmail.com> X-Mailer: git-send-email 1.7.9.5 CC: DLOS , LKML , Sylwester Nawrocki , X-BeenThere: davinci-linux-open-source@linux.davincidsp.com X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: Errors-To: davinci-linux-open-source-bounces@linux.davincidsp.com X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: "Lad, Prabhakar" This patch adds 'sync-on-green-active' property as part of endpoint property. Signed-off-by: Lad, Prabhakar Acked-by: Sylwester Nawrocki --- Changes for v5: 1: Changed description for sync-on-green-active property in documentation file as suggested by Sylwester. Changes for v4: 1: Fixed review comments pointed by Sylwester. Changes for v3: 1: Fixed review comments pointed by Laurent and Sylwester. RFC v2 https://patchwork.kernel.org/patch/2578091/ RFC V1 https://patchwork.kernel.org/patch/2572341/ .../devicetree/bindings/media/video-interfaces.txt | 2 ++ drivers/media/v4l2-core/v4l2-of.c | 4 ++++ include/media/v4l2-mediabus.h | 2 ++ 3 files changed, 8 insertions(+) diff --git a/Documentation/devicetree/bindings/media/video-interfaces.txt b/Documentation/devicetree/bindings/media/video-interfaces.txt index e022d2d..ce719f8 100644 --- a/Documentation/devicetree/bindings/media/video-interfaces.txt +++ b/Documentation/devicetree/bindings/media/video-interfaces.txt @@ -88,6 +88,8 @@ Optional endpoint properties - field-even-active: field signal level during the even field data transmission. - pclk-sample: sample data on rising (1) or falling (0) edge of the pixel clock signal. +- sync-on-green-active: active state of Sync-on-green (SoG) signal, 0/1 for + LOW/HIGH respectively. - data-lanes: an array of physical data lane indexes. Position of an entry determines the logical lane number, while the value of an entry indicates physical lane, e.g. for 2-lane MIPI CSI-2 bus we could have diff --git a/drivers/media/v4l2-core/v4l2-of.c b/drivers/media/v4l2-core/v4l2-of.c index aa59639..5c4c9f0 100644 --- a/drivers/media/v4l2-core/v4l2-of.c +++ b/drivers/media/v4l2-core/v4l2-of.c @@ -100,6 +100,10 @@ static void v4l2_of_parse_parallel_bus(const struct device_node *node, if (!of_property_read_u32(node, "data-shift", &v)) bus->data_shift = v; + if (!of_property_read_u32(node, "sync-on-green-active", &v)) + flags |= v ? V4L2_MBUS_VIDEO_SOG_ACTIVE_HIGH : + V4L2_MBUS_VIDEO_SOG_ACTIVE_LOW; + bus->flags = flags; } diff --git a/include/media/v4l2-mediabus.h b/include/media/v4l2-mediabus.h index 83ae07e..d47eb81 100644 --- a/include/media/v4l2-mediabus.h +++ b/include/media/v4l2-mediabus.h @@ -40,6 +40,8 @@ #define V4L2_MBUS_FIELD_EVEN_HIGH (1 << 10) /* FIELD = 1/0 - Field1 (odd)/Field2 (even) */ #define V4L2_MBUS_FIELD_EVEN_LOW (1 << 11) +#define V4L2_MBUS_VIDEO_SOG_ACTIVE_HIGH (1 << 12) +#define V4L2_MBUS_VIDEO_SOG_ACTIVE_LOW (1 << 13) /* Serial flags */ /* How many lanes the client can use */