From patchwork Wed Feb 17 10:42:10 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jung Zhao X-Patchwork-Id: 8336481 Return-Path: X-Original-To: patchwork-linux-rockchip@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 1A941C02AA for ; Wed, 17 Feb 2016 10:42:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3E96F202F2 for ; Wed, 17 Feb 2016 10:42:39 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 55420202E9 for ; Wed, 17 Feb 2016 10:42:38 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aVzZ8-0004jW-1G; Wed, 17 Feb 2016 10:42:38 +0000 Received: from sg-smtp01.263.net ([54.255.195.220]) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aVzZ6-0004h6-FH for linux-rockchip@lists.infradead.org; Wed, 17 Feb 2016 10:42:37 +0000 Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by sg-smtp01.263.net (Postfix) with ESMTP id 49A8DDF31B; Wed, 17 Feb 2016 18:42:13 +0800 (CST) X-RL-SENDER: jung.zhao@rock-chips.com X-FST-TO: tfiga@chromium.org X-SENDER-IP: 103.29.142.67 X-LOGIN-NAME: jung.zhao@rock-chips.com X-UNIQUE-TAG: <5c548b895876b39ab72f43f694934fc0> X-ATTACHMENT-NUM: 0 X-SENDER: jung.zhao@rock-chips.com X-DNS-TYPE: 0 Received: from localhost.localdomain (unknown [103.29.142.67]) by sg-smtp01.263.net (Postfix) whith ESMTP id 25861RXNSO9; Wed, 17 Feb 2016 18:42:14 +0800 (CST) From: Jung Zhao To: tfiga@chromium.org, posciak@chromium.org, Mauro Carvalho Chehab , Hans Verkuil , Laurent Pinchart , Guennadi Liakhovetski , Philipp Zabel Subject: [PATCH v2 1/4] [NOT FOR REVIEW] v4l: Add private compound control type. Date: Wed, 17 Feb 2016 18:42:10 +0800 Message-Id: <1455705730-25607-1-git-send-email-jung.zhao@rock-chips.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1455705673-25484-1-git-send-email-jung.zhao@rock-chips.com> References: <1455705673-25484-1-git-send-email-jung.zhao@rock-chips.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160217_024236_818322_EF074338 X-CRM114-Status: UNSURE ( 7.95 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.6 (--) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-rockchip@lists.infradead.org, linux-media@vger.kernel.org MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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: Pawel Osciak V4L2_CTRL_TYPE_PRIVATE is to be used for private driver compound controls that use the "ptr" member of struct v4l2_ext_control. Signed-off-by: Pawel Osciak Signed-off-by: Jung Zhao --- Changes in v2: - add [NOT FOR REVIEW] tag for patches from Chromium OS Tree(Tomasz) - update copyright message - list all the related signed-off names - make commit message more readable(Enric) - fix format error of commit message(Tomasz) drivers/media/v4l2-core/v4l2-ctrls.c | 4 ++++ include/uapi/linux/videodev2.h | 2 ++ 2 files changed, 6 insertions(+) diff --git a/drivers/media/v4l2-core/v4l2-ctrls.c b/drivers/media/v4l2-core/v4l2-ctrls.c index 890520d..527d65c 100644 --- a/drivers/media/v4l2-core/v4l2-ctrls.c +++ b/drivers/media/v4l2-core/v4l2-ctrls.c @@ -1525,6 +1525,10 @@ static int std_validate(const struct v4l2_ctrl *ctrl, u32 idx, return -ERANGE; return 0; + /* FIXME:just return 0 for now */ + case V4L2_CTRL_TYPE_PRIVATE: + return 0; + default: return -EINVAL; } diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h index 29a6b78..53ac896 100644 --- a/include/uapi/linux/videodev2.h +++ b/include/uapi/linux/videodev2.h @@ -1517,6 +1517,8 @@ enum v4l2_ctrl_type { V4L2_CTRL_TYPE_U8 = 0x0100, V4L2_CTRL_TYPE_U16 = 0x0101, V4L2_CTRL_TYPE_U32 = 0x0102, + + V4L2_CTRL_TYPE_PRIVATE = 0xffff, }; /* Used in the VIDIOC_QUERYCTRL ioctl for querying controls */