All of lore.kernel.org
 help / color / mirror / Atom feed
From: Florent Revest <florent.revest@free-electrons.com>
To: linux-media@vger.kernel.org
Cc: florent.revest@free-electrons.com, linux-sunxi@googlegroups.com,
	maxime.ripard@free-electrons.com, posciak@chromium.org,
	hans.verkuil@cisco.com, thomas.petazzoni@free-electrons.com,
	mchehab@kernel.org, linux-kernel@vger.kernel.org, wens@csie.org
Subject: [RFC 02/10] v4l: Add private compound control type.
Date: Thu, 25 Aug 2016 11:39:41 +0200	[thread overview]
Message-ID: <1472117989-21455-3-git-send-email-florent.revest@free-electrons.com> (raw)
In-Reply-To: <1472117989-21455-1-git-send-email-florent.revest@free-electrons.com>

From: Pawel Osciak <posciak@chromium.org>

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 <posciak@chromium.org>
Signed-off-by: Jung Zhao <jung.zhao@rock-chips.com>
Signed-off-by: Florent Revest <florent.revest@free-electrons.com>
---
 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 f7333fe..60056b0 100644
--- a/drivers/media/v4l2-core/v4l2-ctrls.c
+++ b/drivers/media/v4l2-core/v4l2-ctrls.c
@@ -1543,6 +1543,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 3eafd3f..904c44c 100644
--- a/include/uapi/linux/videodev2.h
+++ b/include/uapi/linux/videodev2.h
@@ -1521,6 +1521,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 */
-- 
2.7.4

  parent reply	other threads:[~2016-08-25  9:42 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-25  9:39 [RFC 00/10] Add Sunxi Cedrus Video Decoder Driver Florent Revest
2016-08-25  9:39 ` [RFC 01/10] clk: sunxi-ng: Add a couple of A13 clocks Florent Revest
2016-08-25  9:39 ` Florent Revest [this message]
2016-08-25  9:39 ` [RFC 03/10] v4l: Add sunxi Video Engine pixel format Florent Revest
2016-11-14 10:01   ` Hans Verkuil
2016-08-25  9:39 ` [RFC 04/10] v4l: Add MPEG2 low-level decoder API control Florent Revest
2016-08-25  9:39 ` [RFC 05/10] v4l: Add MPEG4 " Florent Revest
2016-08-25  9:39 ` [RFC 06/10] media: platform: Add Sunxi Cedrus decoder driver Florent Revest
2016-11-14 10:07   ` Hans Verkuil
2016-08-25  9:39 ` [RFC 07/10] sunxi-cedrus: Add a MPEG 2 codec Florent Revest
2016-11-14 10:18   ` Hans Verkuil
2016-11-14 10:28     ` Hans Verkuil
2016-08-25  9:39 ` [RFC 08/10] sunxi-cedrus: Add a MPEG 4 codec Florent Revest
2016-08-25  9:39 ` [RFC 09/10] ARM: dts: sun5i: Use video-engine node Florent Revest
2016-08-25  9:39 ` [RFC 10/10] sunxi-cedrus: Add device tree binding document Florent Revest
2016-08-25 12:12 ` [RFC 00/10] Add Sunxi Cedrus Video Decoder Driver Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1472117989-21455-3-git-send-email-florent.revest@free-electrons.com \
    --to=florent.revest@free-electrons.com \
    --cc=hans.verkuil@cisco.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-sunxi@googlegroups.com \
    --cc=maxime.ripard@free-electrons.com \
    --cc=mchehab@kernel.org \
    --cc=posciak@chromium.org \
    --cc=thomas.petazzoni@free-electrons.com \
    --cc=wens@csie.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.