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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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(-)

-- 
2.11.0




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux