From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751552AbdH1MyS (ORCPT ); Mon, 28 Aug 2017 08:54:18 -0400 Received: from ec2-52-27-115-49.us-west-2.compute.amazonaws.com ([52.27.115.49]:58246 "EHLO osg.samsung.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751280AbdH1MyJ (ORCPT ); Mon, 28 Aug 2017 08:54:09 -0400 X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" From: Mauro Carvalho Chehab To: Linux Doc Mailing List , Linux Media Mailing List Cc: Mauro Carvalho Chehab , Mauro Carvalho Chehab , linux-kernel@vger.kernel.org, Jonathan Corbet , Hans Verkuil , Laurent Pinchart , Sakari Ailus Subject: [PATCH v5 6/7] media: videodev2: add a flag for MC-centric devices Date: Mon, 28 Aug 2017 09:54:00 -0300 Message-Id: <0e6be4ede7935ac3a277dcba0d9b13712a3f690c.1503924361.git.mchehab@s-opensource.com> X-Mailer: git-send-email 2.13.5 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org As both vdev-centric and MC-centric devices may implement the same APIs, we need a flag to allow userspace to distinguish between them. Signed-off-by: Mauro Carvalho Chehab --- Documentation/media/uapi/v4l/open.rst | 7 +++++++ Documentation/media/uapi/v4l/vidioc-querycap.rst | 5 +++++ Documentation/media/videodev2.h.rst.exceptions | 1 + include/uapi/linux/videodev2.h | 2 ++ 4 files changed, 15 insertions(+) diff --git a/Documentation/media/uapi/v4l/open.rst b/Documentation/media/uapi/v4l/open.rst index 2575b6aea029..275d934d2659 100644 --- a/Documentation/media/uapi/v4l/open.rst +++ b/Documentation/media/uapi/v4l/open.rst @@ -47,6 +47,13 @@ the periferal can be used. For such devices, the sub-devices' configuration can be controlled via the :ref:`sub-device API `, which creates one device node per sub-device. +.. attention:: + + Devices that require **MC-centric** hardware peripheral control should + report a ``V4L2_MC_CENTRIC`` :c:type:`v4l2_capability` flag + (see :ref:`VIDIOC_QUERYCAP`). + + .. _v4l2_device_naming: V4L2 Device Node Naming diff --git a/Documentation/media/uapi/v4l/vidioc-querycap.rst b/Documentation/media/uapi/v4l/vidioc-querycap.rst index 12e0d9a63cd8..3675f484b7ef 100644 --- a/Documentation/media/uapi/v4l/vidioc-querycap.rst +++ b/Documentation/media/uapi/v4l/vidioc-querycap.rst @@ -252,6 +252,11 @@ specification the ioctl returns an ``EINVAL`` error code. * - ``V4L2_CAP_TOUCH`` - 0x10000000 - This is a touch device. + * - ``V4L2_MC_CENTRIC`` + - 0x20000000 + - Indicates that the device require **MC-centric** hardware + control, and thus can't be used by **vdev-centric** applications. + See :ref:`v4l2_hardware_control` for more details. * - ``V4L2_CAP_DEVICE_CAPS`` - 0x80000000 - The driver fills the ``device_caps`` field. This capability can diff --git a/Documentation/media/videodev2.h.rst.exceptions b/Documentation/media/videodev2.h.rst.exceptions index a5cb0a8686ac..b51a575f9f75 100644 --- a/Documentation/media/videodev2.h.rst.exceptions +++ b/Documentation/media/videodev2.h.rst.exceptions @@ -157,6 +157,7 @@ replace define V4L2_CAP_META_CAPTURE device-capabilities replace define V4L2_CAP_READWRITE device-capabilities replace define V4L2_CAP_ASYNCIO device-capabilities replace define V4L2_CAP_STREAMING device-capabilities +replace define V4L2_CAP_MC_CENTRIC device-capabilities replace define V4L2_CAP_DEVICE_CAPS device-capabilities replace define V4L2_CAP_TOUCH device-capabilities diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h index 45cf7359822c..a35d762c3eef 100644 --- a/include/uapi/linux/videodev2.h +++ b/include/uapi/linux/videodev2.h @@ -460,6 +460,8 @@ struct v4l2_capability { #define V4L2_CAP_TOUCH 0x10000000 /* Is a touch device */ +#define V4L2_CAP_MC_CENTRIC 0x20000000 /* Device require MC-centric hardware control */ + #define V4L2_CAP_DEVICE_CAPS 0x80000000 /* sets device capabilities field */ /* -- 2.13.5