Skip to content

smiapp: Don't rely on s_power()

Sakari Ailus linux-media 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2smiapp: Use __v4l2_ctrl_handler_setup()drivers/media/i2c/smiapp/smiapp-core.c+12 -80 replies
2/2smiapp: Rely on runtime PMdrivers/media/i2c/smiapp/smiapp-core.c drivers/media/i2c/smiapp/smiapp-regs.c drivers/media/i2c/smiapp/smiapp.h+40 -650 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] smiapp: Don't rely on s_power()

Hi everyone,

These two patches make the smiapp driver independent of the s_power() core sub-device callback, and instead use runtime PM to control the device's power state.

This should be the model for future sensor drivers: the s_power() callback is really something we want to get rid of.

A cleaner implementation would naturally be nicer. The underlying problem is that the set_ctrl() callback is called through the control handler so there's no way to figure out in the set_ctrl() callback itself where the call came from: via the device's power_on() callback or from the user calling VIDIOC_S_CTRL.

Another option would be to postpone writing control values until s_stream() callback but that introduces an additional delay for streaming which is always better to avoid.

Sakari Ailus (2):
smiapp: Use __v4l2_ctrl_handler_setup()
smiapp: Rely on runtime PM

 drivers/media/i2c/smiapp/smiapp-core.c | 97 +++++++++++++---------------------
 drivers/media/i2c/smiapp/smiapp-regs.c |  3 ++
 drivers/media/i2c/smiapp/smiapp.h      |  1 +
 3 files changed, 40 insertions(+), 61 deletions(-)
Signature · 1 line
2.11.0