smiapp: Don't rely on s_power()
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | smiapp: Use __v4l2_ctrl_handler_setup()drivers/ | +12 | 0 replies | |
| 2/2 | smiapp: Rely on runtime PMdrivers/ drivers/ drivers/ | +40 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
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