Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751330AbdH1MyM (ORCPT ); Mon, 28 Aug 2017 08:54:12 -0400 Received: from ec2-52-27-115-49.us-west-2.compute.amazonaws.com ([52.27.115.49]:58239 "EHLO osg.samsung.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751270AbdH1MyI (ORCPT ); Mon, 28 Aug 2017 08:54:08 -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 Subject: [PATCH v5 4/7] media: open.rst: document devnode-centric and mc-centric types Date: Mon, 28 Aug 2017 09:53:58 -0300 Message-Id: <828e47356d5c133a0a052f34e97be24ea3037df2.1503924361.git.mchehab@s-opensource.com> X-Mailer: git-send-email 2.13.5 In-Reply-To: References: MIME-Version: 1.0 In-Reply-To: References: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2783 Lines: 67 When we added support for omap3, back in 2010, we added a new type of V4L2 devices that aren't fully controlled via the V4L2 device node. Yet, we have never clearly documented in the V4L2 specification the differences between the two types. Let's document them based on the the current implementation. Signed-off-by: Mauro Carvalho Chehab --- Documentation/media/uapi/v4l/open.rst | 40 +++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/Documentation/media/uapi/v4l/open.rst b/Documentation/media/uapi/v4l/open.rst index 96ac972c1fa2..21b8f7c5ca55 100644 --- a/Documentation/media/uapi/v4l/open.rst +++ b/Documentation/media/uapi/v4l/open.rst @@ -7,6 +7,46 @@ Opening and Closing Devices *************************** +.. _v4l2_hardware_control: + + +Types of V4L2 hardware peripheral control +========================================= + +V4L2 hardware periferal is usually complex: support for it is +implemented via a V4L2 main driver and often by several additional drivers. +The main driver always exposes one or more **V4L2 device nodes** +(see :ref:`v4l2_device_naming`) with are responsible for implementing +data streaming, if applicable. + +The other drivers are called **V4L2 sub-devices** and provide control to +other hardware components usually connected via a serial bus (like +I²C, SMBus or SPI). Depending on the main driver, they can be implicitly +controlled directly by the main driver or explicitly via +the **V4L2 sub-device API** (see :ref:`subdev`). + +When V4L2 was originally designed, there was only one type of +peripheral control: via the **V4L2 device nodes**. We refer to this kind +of control as **V4L2 device node centric** (or, simply, "**vdev-centric**"). + +Later (kernel 2.6.39), a new type of periferal control was +added in order to support complex peripherals that are common for embedded +systems. This type of periferal is controlled mainly via the media +controller and V4L2 sub-devices. So, it is called +**Media controller centric** (or, simply, "**MC-centric**") control. + +For **vdev-centric** hardware peripheral control, the peripheral is +controlled via the **V4L2 device nodes**. They may optionally support the +:ref:`media controller API ` as well, +in order to inform the application which device nodes are available +(see :ref:`related`). + +For **MC-centric** hardware peripheral control it is required to configure +the pipelines via the :ref:`media controller API ` before +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. + .. _v4l2_device_naming: V4L2 Device Node Naming -- 2.13.5