From 62879f67875fdc3300983397e46805ed7bd44dc5 Mon Sep 17 00:00:00 2001 From: Pawel Osciak Date: Tue, 11 Nov 2014 20:44:28 +0900 Subject: [PATCH] CHROMIUM: [media] v4l: Add private compound control type. V4L2_CTRL_TYPE_PRIVATE is to be used for private driver compound controls that use the "ptr" member of struct v4l2_ext_control. BUG=chrome-os-partner:33728 TEST=build Signed-off-by: Pawel Osciak Reviewed-on: https://chromium-review.googlesource.com/228988 Trybot-Ready: Tomasz Figa Tested-by: Tomasz Figa Reviewed-by: Wu-cheng Li Commit-Queue: Tomasz Figa Change-Id: I44083b0216ef32629d12f0910e972a3e827a599a Signed-off-by: Jeffy Chen Signed-off-by: Yakir Yang --- 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 a14b9976cce7..4a712bc853e6 100644 --- a/drivers/media/v4l2-core/v4l2-ctrls.c +++ b/drivers/media/v4l2-core/v4l2-ctrls.c @@ -1435,6 +1435,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 dc28e10f9985..fe6ba812ad56 100644 --- a/include/uapi/linux/videodev2.h +++ b/include/uapi/linux/videodev2.h @@ -1516,6 +1516,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.34.1