aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/pci/cx23885/cx23885-dvb.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2018-02-21 02:49:25 -0500
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2018-03-21 12:05:39 -0400
commit3aab15af9ad8fa8dc0399cb4b679d7cb85c20a56 (patch)
treeacd07cf67ae4ab9c752774d71a55489974359974 /drivers/media/pci/cx23885/cx23885-dvb.c
parentmedia: vb2-core: vb2_ops: document non-interrupt-context calling (diff)
downloadlinux-dev-3aab15af9ad8fa8dc0399cb4b679d7cb85c20a56.tar.xz
linux-dev-3aab15af9ad8fa8dc0399cb4b679d7cb85c20a56.zip
media: add tuner standby op, use where needed
The v4l2_subdev core s_power op was used for two different things: power on/off sensors or video decoders/encoders and to put a tuner in standby (and only the tuner!). There is no 'tuner wakeup' op, that's done automatically when the tuner is accessed. The danger with calling (s_power, 0) to put a tuner into standby is that it is usually broadcast for all subdevs. So a video receiver subdev that supports s_power will also be powered off, and since there is no corresponding (s_power, 1) they will never be powered on again. In addition, this is specifically meant for tuners only since they draw the most current. This patch adds a new tuner op called 'standby' and replaces all calls to (core, s_power, 0) by (tuner, standby). This prevents confusion between the two uses of s_power. Note that there is no overlap: bridge drivers either just want to put the tuner into standby, or they deal with powering on/off sensors. Never both. This also makes it easier to replace s_power for the remaining bridge drivers with some PM code later. Whether we want something cleaner for tuners in the future is a separate topic. There is a lot of legacy code surrounding tuners, and I am very hesitant about making changes there. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/pci/cx23885/cx23885-dvb.c')
-rw-r--r--drivers/media/pci/cx23885/cx23885-dvb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/pci/cx23885/cx23885-dvb.c b/drivers/media/pci/cx23885/cx23885-dvb.c
index 7bb1febb1cb2..114d9bcbe4f4 100644
--- a/drivers/media/pci/cx23885/cx23885-dvb.c
+++ b/drivers/media/pci/cx23885/cx23885-dvb.c
@@ -2568,8 +2568,8 @@ static int dvb_register(struct cx23885_tsport *port)
fe1->dvb.frontend->ops.ts_bus_ctrl = cx23885_dvb_bus_ctrl;
#endif
- /* Put the analog decoder in standby to keep it quiet */
- call_all(dev, core, s_power, 0);
+ /* Put the tuner in standby to keep it quiet */
+ call_all(dev, tuner, standby);
if (fe0->dvb.frontend->ops.analog_ops.standby)
fe0->dvb.frontend->ops.analog_ops.standby(fe0->dvb.frontend);