Skip to contentSkip to conversation

media: v4l: subdev: Document s_power() callback is deprecated

PATCH Superseded Sakari Ailus 2 participants 3 messages Sep 19, 2022 Media (V4L/DVB)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 media: v4l: subdev: Document s_power() callback is deprecated

Runtime PM has been around for a decade or more, there's hardly a need to use the V4L2 specific s_power() callback in drivers anymore. Document this in s_power() callback documentation as well.

---
 include/media/v4l2-subdev.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
include/media/v4l2-subdev.h +2 -1
index 2f80c9c818ed0..ed14ce5864cac 100644
@@ -176,7 +176,8 @@ struct v4l2_subdev_io_pin_config {
  * @s_register: callback for VIDIOC_DBG_S_REGISTER() ioctl handler code.
  *
  * @s_power: puts subdevice in power saving mode (on == 0) or normal operation
- *	mode (on == 1).
+ *	mode (on == 1). DEPRECATED. See
+ *	Documentation/driver-api/media/camera-sensor.rst .
  *
  * @interrupt_service_routine: Called by the bridge chip's interrupt service
  *	handler, when an interrupt status has be raised due to this subdev,
Signature · 1 line
2.30.2
Reviewed-by on v1 1/1
#1 lore raw

Hi Sakari,

Thank you for the patch.

Quoted 14 lines · Sakari Ailus

Runtime PM has been around for a decade or more, there's hardly a need to use the V4L2 specific s_power() callback in drivers anymore. Document this in s_power() callback documentation as well.

---
 include/media/v4l2-subdev.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
include/media/v4l2-subdev.h +0 -0
index 2f80c9c818ed0..ed14ce5864cac 100644

include/media/v4l2-subdev.h struct v4l2_subdev_io_pin_config { · line 180

Quoted 6 lines
include/media/v4l2-subdev.h +2 -1
@@ -176,7 +176,8 @@ struct v4l2_subdev_io_pin_config {
  * @s_register: callback for VIDIOC_DBG_S_REGISTER() ioctl handler code.
  *
  * @s_power: puts subdevice in power saving mode (on == 0) or normal operation
- *	mode (on == 1).
+ *	mode (on == 1). DEPRECATED. See
+ *	Documentation/driver-api/media/camera-sensor.rst .

Could you mention that pre_streamon/post_streamoff cover the use case of bus initialization ? s_stream is commonly used for that purpose. With that,

Quoted 3 lines
include/media/v4l2-subdev.h +0 -0
  *
  * @interrupt_service_routine: Called by the bridge chip's interrupt service
  *	handler, when an interrupt status has be raised due to this subdev,
Signature · 3 lines
Regards,

Laurent Pinchart
#2 lore raw

Hi Laurent,

Quoted 14 lines · Laurent Pinchart

Hi Sakari,

Thank you for the patch.

Quoted 9 lines · Sakari Ailus

Runtime PM has been around for a decade or more, there's hardly a need to use the V4L2 specific s_power() callback in drivers anymore. Document this in s_power() callback documentation as well.

---
 include/media/v4l2-subdev.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Quoted 15 lines

include/media/v4l2-subdev.h struct v4l2_subdev_io_pin_config { · line 180

Quoted 11 lines
include/media/v4l2-subdev.h +2 -1
index 2f80c9c818ed0..ed14ce5864cac 100644
@@ -176,7 +176,8 @@ struct v4l2_subdev_io_pin_config {
  * @s_register: callback for VIDIOC_DBG_S_REGISTER() ioctl handler code.
  *
  * @s_power: puts subdevice in power saving mode (on == 0) or normal operation
- *	mode (on == 1).
+ *	mode (on == 1). DEPRECATED. See
+ *	Documentation/driver-api/media/camera-sensor.rst .

Could you mention that pre_streamon/post_streamoff cover the use case of bus initialization ? s_stream is commonly used for that purpose. With that,

I'll add:

pre_streamon and post_streamoff callbacks can be used for e.g. setting the bus to LP-11 mode before s_stream is called.

Quoted 2 lines

Thanks!

Signature · 1 line
Sakari Ailus