From patchwork Wed May 24 11:23:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sakari Ailus X-Patchwork-Id: 685552 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 55011C77B7A for ; Wed, 24 May 2023 11:25:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231349AbjEXLZj (ORCPT ); Wed, 24 May 2023 07:25:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48758 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229547AbjEXLZi (ORCPT ); Wed, 24 May 2023 07:25:38 -0400 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 062A218E for ; Wed, 24 May 2023 04:25:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1684927534; x=1716463534; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Gd7HLGVvz+OjG/PZbl0woujGyowsfis9oXa7ZUQbEH8=; b=QoEFd1S8Jd2Xmshf6JX3pjdJbMUCJ6+gk9p2yJy/qDpF0Myxx/63JqCJ jtdEFRScH7MqN1jFTDPONdFOsYM9+ZCiqueIDllA8I67+9y2izyrR6DvN AyjPhWShtodBjpd1jX9JK7DqTqpPm4nnGEuCTPUwE+kJTgrcQuriD+oxS UF4NijP9OMFd8p3XQFld7127q3Qv5cLiwbc8dJnDpZquiNCpogYpoQMTu gtxydfxdqSMBaFCUmIRlSBu2N/3TE/QUNdocIZf/f49ZsSC13DE0ULfU1 f4xNFf2+IUWn7Wq5POlZu626ReaKodiw1gaROXlOp/yJ3JBh1tS6Axb1J g==; X-IronPort-AV: E=McAfee;i="6600,9927,10719"; a="356758438" X-IronPort-AV: E=Sophos;i="6.00,189,1681196400"; d="scan'208";a="356758438" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 May 2023 04:24:38 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10719"; a="816540636" X-IronPort-AV: E=Sophos;i="6.00,189,1681196400"; d="scan'208";a="816540636" Received: from turnipsi.fi.intel.com (HELO kekkonen.fi.intel.com) ([10.237.72.44]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 May 2023 04:24:33 -0700 Received: from punajuuri.localdomain (punajuuri.localdomain [192.168.240.130]) by kekkonen.fi.intel.com (Postfix) with ESMTP id EF60C12302B; Wed, 24 May 2023 14:24:21 +0300 (EEST) Received: from sailus by punajuuri.localdomain with local (Exim 4.94.2) (envelope-from ) id 1q1mb2-008z7r-Cf; Wed, 24 May 2023 14:24:00 +0300 From: Sakari Ailus To: linux-media@vger.kernel.org Cc: laurent.pinchart@ideasonboard.com, Philipp Zabel , hverkuil@xs4all.nl, Francesco Dolcini , aishwarya.kothari@toradex.com, Robert Foss , Todor Tomov , Hyun Kwon , bingbu.cao@intel.com, niklas.soderlund@ragnatech.se Subject: [PATCH v3 32/32] media: Documentation: v4l: Document sub-device notifiers Date: Wed, 24 May 2023 14:23:49 +0300 Message-Id: <20230524112349.2141396-33-sakari.ailus@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230524112349.2141396-1-sakari.ailus@linux.intel.com> References: <20230524112349.2141396-1-sakari.ailus@linux.intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Document that sub-device notifiers are now registered using v4l2_async_subdev_nf_init(). No documentation is changed as it seems that sub-device notifiers were not documented apart from kernel-doc comments. Signed-off-by: Sakari Ailus --- Documentation/driver-api/media/v4l2-subdev.rst | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Documentation/driver-api/media/v4l2-subdev.rst b/Documentation/driver-api/media/v4l2-subdev.rst index 83d3d29608136..d62b341642c96 100644 --- a/Documentation/driver-api/media/v4l2-subdev.rst +++ b/Documentation/driver-api/media/v4l2-subdev.rst @@ -193,9 +193,7 @@ picked up by bridge drivers. Bridge drivers in turn have to register a notifier object. This is performed using the :c:func:`v4l2_async_nf_register` call. To unregister the notifier the driver has to call -:c:func:`v4l2_async_nf_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`. +:c:func:`v4l2_async_nf_unregister`. Before registering the notifier, bridge drivers must do two things: first, the notifier must be initialized using the :c:func:`v4l2_async_nf_init`. @@ -204,6 +202,12 @@ that the bridge device needs for its operation. Several functions are available to add subdevice descriptors to a notifier, depending on the type of device and the needs of the driver. +For a sub-device driver to register a notifier, the process is otherwise similar +to that of a bridge driver, apart from that the notifier is initialised using +:c:func:`v4l2_async_subdev_nf_init` instead. A sub-device notifier may complete +only after the V4L2 device becomes available, i.e. there's a path via async +sub-devices and notifiers to that root notifier. + :c:func:`v4l2_async_nf_add_fwnode`, :c:func:`v4l2_async_nf_add_fwnode_remote` :c:and func:`v4l2_async_nf_add_i2c` are for registering their async sub-devices :c:with the notifier.