public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] media: Documentation: Initialisation finishes before subdev registration
@ 2023-11-01  8:05 Sakari Ailus
  2023-11-01 12:53 ` Laurent Pinchart
  0 siblings, 1 reply; 7+ messages in thread
From: Sakari Ailus @ 2023-11-01  8:05 UTC (permalink / raw)
  To: linux-media
  Cc: Cao, Bingbu, Hans de Goede, Laurent Pinchart, Daniel Scally,
	Mauro Carvalho Chehab, Andy Shevchenko, Kate Hsuan, hverkuil

Document that sub-device initialisation needs to complete before the async
sub-device is registered as there is no further driver action needed
before the sensor becomes accessible via the UAPI.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 Documentation/driver-api/media/camera-sensor.rst | 3 ++-
 Documentation/driver-api/media/v4l2-subdev.rst   | 4 ++++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/Documentation/driver-api/media/camera-sensor.rst b/Documentation/driver-api/media/camera-sensor.rst
index 6456145f96ed..c675ce77c4d6 100644
--- a/Documentation/driver-api/media/camera-sensor.rst
+++ b/Documentation/driver-api/media/camera-sensor.rst
@@ -60,7 +60,8 @@ management over the pipeline.
 Camera sensor drivers are responsible for controlling the power state of the
 device they otherwise control as well. They shall use runtime PM to manage
 power states. Runtime PM shall be enabled at probe time and disabled at remove
-time. Drivers should enable runtime PM autosuspend.
+time. Drivers should enable runtime PM autosuspend. Note that runtime PM has to
+be enabled before registering the sensor's async sub-device.
 
 The runtime PM handlers shall handle clocks, regulators, GPIOs, and other
 system resources required to power the sensor up and down. For drivers that
diff --git a/Documentation/driver-api/media/v4l2-subdev.rst b/Documentation/driver-api/media/v4l2-subdev.rst
index e56b50b3f203..b22d1b075fd6 100644
--- a/Documentation/driver-api/media/v4l2-subdev.rst
+++ b/Documentation/driver-api/media/v4l2-subdev.rst
@@ -195,6 +195,10 @@ 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.
 
+Note that all sensor initialisation has to complete before registering the async
+sub-device, including enabling runtime PM. This is because the sensor becomes
+accessible via the UAPI without further action by the sensor driver.
+
 Asynchronous sub-device notifiers
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-11-02  8:02 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-01  8:05 [PATCH 1/1] media: Documentation: Initialisation finishes before subdev registration Sakari Ailus
2023-11-01 12:53 ` Laurent Pinchart
2023-11-01 13:31   ` Sakari Ailus
2023-11-01 13:45     ` Laurent Pinchart
2023-11-01 14:08       ` Sakari Ailus
2023-11-01 15:36         ` Laurent Pinchart
2023-11-02  7:54           ` Sakari Ailus

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox