Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp1234703imm; Fri, 29 Jun 2018 14:02:30 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIscOZ4BHTqAEsZcM6rPeD5MRdwmh/Y5JlatKObzFNB2YN/tCQKxy0JxaddJtYKX56GkB/V X-Received: by 2002:a63:26c3:: with SMTP id m186-v6mr13894934pgm.56.1530306150114; Fri, 29 Jun 2018 14:02:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530306150; cv=none; d=google.com; s=arc-20160816; b=OxYgjmNNszg2LxSRH9DsNTL36hO0rO3pz1e5botdXJWj6JxbFT3kpeSUyd66Saq1b3 dJQsP0hrWkanoINgAdyLmIDzV7tbaoFpjiwMBWXJ9bArWCXQXq6PvtJ1DZa/TxQFqMR/ BQwVuWSIaeF/bvJMtWf6SieYsNDGk/LIkDusuf4JZlHn6FYqNbU0TSvC0IXEz7557yhz F19iaRfWsozgTwwsfGb03jEs9p7EisefqVZOan/aoDkmHunEFKW9SHMrfqRETdl+VWDj q3tjN4EipqCUOkjfY8hUlz73PE8hNXE0BSpvDCFzvW5rMP1+0jACisfSINipqkhm1ZRi Q8xw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=45ToJvq9+6cqBBBLfKH8+TVwq7TYPCfSi3VQEHlyhZM=; b=kkAxXnQ5whkXw7/IP3ZbfAm3UN8nv96vJxSdheoNWAbdX8j+Gxxm1yFPMG1zLxtZER Xd5SGsgrUnrSg1tBO+XEzzGPQQHzlJv56d1AweCtVrzKdN30NTgeUv8Z17lJ2YY1v+pU lB+aW3iymmtlG7eIeRBrwGHyjXQSfZfZXBPkdfy8FpcXuO0+7oxdnTwlj9N8zHpcSFNC oRa4Vv5bSxlWpuz/0gzh/yNxCNMJfzqnuV2//bgbkvui1mYZiAVTnbCWACYn7amyGsjg UgMNPPZf9RTaXALDuQxlPrVWi+7RSzbNPAqg5Kg2hNa3jWxrb4LxRD4PWdlPJa9jVwiu H4cg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=DJiWecW5; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 143-v6si11203508pfa.178.2018.06.29.14.02.14; Fri, 29 Jun 2018 14:02:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=DJiWecW5; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966553AbeF2Sxi (ORCPT + 99 others); Fri, 29 Jun 2018 14:53:38 -0400 Received: from mail-pl0-f65.google.com ([209.85.160.65]:34660 "EHLO mail-pl0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965133AbeF2Sxd (ORCPT ); Fri, 29 Jun 2018 14:53:33 -0400 Received: by mail-pl0-f65.google.com with SMTP id z9-v6so4872241plo.1; Fri, 29 Jun 2018 11:53:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=45ToJvq9+6cqBBBLfKH8+TVwq7TYPCfSi3VQEHlyhZM=; b=DJiWecW5ITZO/UwL/4R9lGRDIO3Wi8filk+4VE2frc2l0OXTyPVAuO68RiNIThD5Y3 dmwugmAtlxdYfCT5IiqRbCduc+cikBq+OSk643a7VtYl/mFf2PwKxKZYDj00yLW2UkI4 7lXM+N3mDDqoDoTRQWwZIizeAvxqx/Aa14Id57MPWIHTOPnwCgrCcgvafntNufeVA50l 599e9MVGuYgFqJNVQ6D99GUvfKEH8MJahJdX9ZC6kL857xRiXD/vVG+TJgZgdQYGC+cf k7HW0S7YG7uy0tootBvqdKbv43p9AwWk+mbBgFmYzPe3+M9RjsOw5RwxoR5SFWRkflP2 b5dg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=45ToJvq9+6cqBBBLfKH8+TVwq7TYPCfSi3VQEHlyhZM=; b=McGvPDF1Q82qkSvAdtKckW1UKA1MOGNlW9vp6Xe5uSiHr3Qe3jJeQiqVwAPZVQsgR8 eaOItueq4CcLIP96YdFSgiEuts3u2DqYma6OfMYVn4qoDyvdnXx5VnTeu7BI07jgkIPm rPocLKYrsF4+exkTmz0i0B02FSVyX2FlgowYRNYwQRDUAWU9YJlthXHLvmMVJXbLeRfJ /eO4dEmLFIgr+mamctjFO52m32e/PxJzZ6auRCpYLJ2KvbbvX6me2FP2gxSWeLgHCsvS RVOYAaqeDB9aLGFu82PuySezuseSCzLkU2DamgL28mL/ADeMN7WtQQF06ixBbSrhlHRV QgYQ== X-Gm-Message-State: APt69E04IO237OSSNqLr6UHOJ7ZRsCeTU+HphZGxoZxxeEZO8wOGPQFS 76KVW/FdZDSCvVt7DkjyCVUWJg== X-Received: by 2002:a17:902:18a:: with SMTP id b10-v6mr4279799plb.62.1530298411928; Fri, 29 Jun 2018 11:53:31 -0700 (PDT) Received: from mappy.world.mentorg.com ([2602:306:cc3b:f020:7cd8:9ad7:a375:e853]) by smtp.googlemail.com with ESMTPSA id k13-v6sm27672308pfg.130.2018.06.29.11.53.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 29 Jun 2018 11:53:31 -0700 (PDT) From: Steve Longerbeam X-Google-Original-From: Steve Longerbeam To: linux-media@vger.kernel.org Cc: Steve Longerbeam , linux-kernel@vger.kernel.org Subject: [PATCH v5 17/17] [media] v4l2-subdev.rst: Update doc regarding subdev descriptors Date: Fri, 29 Jun 2018 11:50:01 -0700 Message-Id: <1530298220-5097-18-git-send-email-steve_longerbeam@mentor.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1530298220-5097-1-git-send-email-steve_longerbeam@mentor.com> References: <1530298220-5097-1-git-send-email-steve_longerbeam@mentor.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Update the doc to describe the new method of adding subdevice descriptors to async notifiers. Signed-off-by: Steve Longerbeam --- Documentation/media/kapi/v4l2-subdev.rst | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/Documentation/media/kapi/v4l2-subdev.rst b/Documentation/media/kapi/v4l2-subdev.rst index e1f0b72..7197eeb 100644 --- a/Documentation/media/kapi/v4l2-subdev.rst +++ b/Documentation/media/kapi/v4l2-subdev.rst @@ -247,20 +247,26 @@ performed using the :c:func:`v4l2_async_unregister_subdev` call. Subdevices registered this way are stored in a global list of subdevices, ready to be picked up by bridge drivers. -Bridge drivers in turn have to register a notifier object with an array of -subdevice descriptors that the bridge device needs for its operation. This is +Bridge drivers in turn have to register a notifier object. This is performed using the :c:func:`v4l2_async_notifier_register` call. To unregister the notifier the driver has to call :c:func:`v4l2_async_notifier_unregister`. The former of the two functions -takes two arguments: a pointer to struct :c:type:`v4l2_device` and a pointer to -struct :c:type:`v4l2_async_notifier`. The latter contains a pointer to an array -of pointers to subdevice descriptors of type struct :c:type:`v4l2_async_subdev` -type. The V4L2 core will then use these descriptors to match asynchronously -registered -subdevices to them. If a match is detected the ``.bound()`` notifier callback -is called. After all subdevices have been located the .complete() callback is -called. When a subdevice is removed from the system the .unbind() method is -called. All three callbacks are optional. +takes two arguments: a pointer to struct :c:type:`v4l2_device` and a +pointer to struct :c:type:`v4l2_async_notifier`. + +Before registering the notifier, bridge drivers form a list of +subdevice descriptors that the bridge device needs for its operation. +Subdevice descriptors are added to the notifier using the +:c:func:`v4l2_async_notifier_add_subdev` call. This function takes +two arguments: a pointer to struct :c:type:`v4l2_async_notifier`, and +a pointer to the subdevice descripter, which is of type struct +:c:type:`v4l2_async_subdev`. + +The V4L2 core will then use these descriptors to match asynchronously +registered subdevices to them. If a match is detected the ``.bound()`` +notifier callback is called. After all subdevices have been located the +.complete() callback is called. When a subdevice is removed from the +system the .unbind() method is called. All three callbacks are optional. V4L2 sub-device userspace API ----------------------------- -- 2.7.4