From patchwork Wed Jul 20 00:03:28 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Longerbeam X-Patchwork-Id: 9238517 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 A705B602F0 for ; Wed, 20 Jul 2016 00:04:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 961652624D for ; Wed, 20 Jul 2016 00:04:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 85FDA277D9; Wed, 20 Jul 2016 00:04:05 +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 B23AC2624D for ; Wed, 20 Jul 2016 00:04:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752646AbcGTAEC (ORCPT ); Tue, 19 Jul 2016 20:04:02 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:33259 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752072AbcGTAEA (ORCPT ); Tue, 19 Jul 2016 20:04:00 -0400 Received: by mail-pf0-f196.google.com with SMTP id i6so2254470pfe.0; Tue, 19 Jul 2016 17:03:59 -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=cGHShpXMJpHoAy3jRY8y4j1Ebos2JgBSvnVmtz1BK7g=; b=AdK4zjkJF/f+LfBpXyJwdIIRQiKgHVy78lKWwas3cpQD4hafs5teU6/DrR03u+LxXq SLWYZXYDcoiIqn+205Q4uCc/FZG0Gp9/oLG0zi+gNpndW0l2D83Y4jTM2JTVfE/PnBFl pdmtMq+v+JFvPY+KdJta4Zg8a2h8PqFizMnaSCTRObli+ULloV0OGL/RFqoPhkhQh1s+ Nx8IGDmPG97Qcc5vmVflmk+fnE39WdOwXOE7nQzYjMbzdt8BIRrKZBp1xMF80o8JtLh3 hRcR0RjbMkSE/E0NNCHT1H/yvBHO6rjvGvRWm6TFkMI5KyFb7BnYVSX/ms8D8hZFtiwL QdAA== 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=cGHShpXMJpHoAy3jRY8y4j1Ebos2JgBSvnVmtz1BK7g=; b=ju1AMtLlO1r+OZkNqhvFKnHRaefCNudsFEizwNmCucIvXPX9BMnPYGEg4iutlzp53K oK+MZuTlgkmP5+5Ul72D1Y9jq5Q+LO9LCnaZiDFdHfjIslwFwWgzpX8s+pZwp2w/QaNi 6gGJIhBCLnNN8eW8Gv4YuhZhJwL8uTfaBwxZ3RoHD/00SaPmS9rkybiJbKhpFe1r/hx0 MxLEwiO57t/5lqsym7kCHNKQOMNsniYqA01gB2kQ/BD8G6C/t9dlUqI0eb/7nr+/eDTG eC4a7rOiZrXp0wE15iI6oTAknWIP3E92qd/FZnhHKTlEU4xqHa9pgt0KzvOFHghOyS3+ vi/w== X-Gm-Message-State: ALyK8tL1cduvB+WcPjcOAywUltjLCNYtlA/lgkPH0ZsE0omJS87vPz2NAJPZxqPC9w3azg== X-Received: by 10.98.55.5 with SMTP id e5mr17390318pfa.120.1468973039339; Tue, 19 Jul 2016 17:03:59 -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 ty6sm7107742pac.18.2016.07.19.17.03.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 19 Jul 2016 17:03:58 -0700 (PDT) From: Steve Longerbeam X-Google-Original-From: Steve Longerbeam To: lars@metafoo.de Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Steve Longerbeam , Mauro Carvalho Chehab , Javier Martinez Canillas , Laurent Pinchart , Sakari Ailus Subject: [PATCH v2 01/10] v4l: of: add "newavmode" property for Analog Devices codecs Date: Tue, 19 Jul 2016 17:03:28 -0700 Message-Id: <1468973017-17647-2-git-send-email-steve_longerbeam@mentor.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1468973017-17647-1-git-send-email-steve_longerbeam@mentor.com> References: <1467846004-12731-1-git-send-email-steve_longerbeam@mentor.com> <1468973017-17647-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 This patch adds a "newavmode" boolean property as part of the v4l2 endpoint properties. This indicates an Analog Devices decoder is generating EAV/SAV codes to suit Analog Devices encoders. Signed-off-by: Steve Longerbeam Cc: Mauro Carvalho Chehab Cc: Javier Martinez Canillas Cc: Laurent Pinchart Cc: Sakari Ailus Nacked-by: Hans Verkuil --- Documentation/devicetree/bindings/media/video-interfaces.txt | 2 ++ drivers/media/v4l2-core/v4l2-of.c | 4 ++++ include/media/v4l2-mediabus.h | 5 +++++ 3 files changed, 11 insertions(+) diff --git a/Documentation/devicetree/bindings/media/video-interfaces.txt b/Documentation/devicetree/bindings/media/video-interfaces.txt index 9cd2a36..6f2df51 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. +- newavmode: a boolean property to indicate an Analog Devices decoder is + operating in NEWAVMODE. Valid for BT.656 busses only. - 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 diff --git a/drivers/media/v4l2-core/v4l2-of.c b/drivers/media/v4l2-core/v4l2-of.c index 93b3368..719a7d1 100644 --- a/drivers/media/v4l2-core/v4l2-of.c +++ b/drivers/media/v4l2-core/v4l2-of.c @@ -109,6 +109,10 @@ static void v4l2_of_parse_parallel_bus(const struct device_node *node, flags |= v ? V4L2_MBUS_DATA_ACTIVE_HIGH : V4L2_MBUS_DATA_ACTIVE_LOW; + if (endpoint->bus_type == V4L2_MBUS_BT656 && + of_get_property(node, "newavmode", &v)) + flags |= V4L2_MBUS_NEWAVMODE; + if (of_get_property(node, "slave-mode", &v)) flags |= V4L2_MBUS_SLAVE; else diff --git a/include/media/v4l2-mediabus.h b/include/media/v4l2-mediabus.h index 34cc99e..0bd5f0e 100644 --- a/include/media/v4l2-mediabus.h +++ b/include/media/v4l2-mediabus.h @@ -43,6 +43,11 @@ /* Active state of Sync-on-green (SoG) signal, 0/1 for LOW/HIGH respectively. */ #define V4L2_MBUS_VIDEO_SOG_ACTIVE_HIGH (1 << 12) #define V4L2_MBUS_VIDEO_SOG_ACTIVE_LOW (1 << 13) +/* + * BT.656 specific flags + */ +/* Analog Device's NEWAVMODE */ +#define V4L2_MBUS_NEWAVMODE (1 << 14) /* Serial flags */ /* How many lanes the client can use */