diff options
author | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-08-10 04:47:19 +0400 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-08-22 00:25:09 +0400 |
commit | 59d7889ae49f6e3e9d9cff8c0de7ad95d9ca068b (patch) | |
tree | ba67f1e8e6825e9f7108c5a8a55e380602fa97af /drivers/media/v4l2-core | |
parent | 811872404bb021b73ecb4b78de88bd2d7f26548e (diff) | |
download | linux-59d7889ae49f6e3e9d9cff8c0de7ad95d9ca068b.tar.xz |
[media] dvb-frontend: add core support for tuner suspend/resume
While several tuners have some sort of suspend/resume
implementation, this is currently mangled with an optional
.sleep callback that it is also used to put the device on
low power mode.
Not all drivers implement it, as returning the driver from
low power may require to re-load the firmware, with takes
some time. Also, some drivers may delay it.
So, the more coherent is to add two new optional callbacks
that will let the tuners to directy implement suspend and
resume callbacks if they need.
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/v4l2-core')
-rw-r--r-- | drivers/media/v4l2-core/tuner-core.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/media/v4l2-core/tuner-core.c b/drivers/media/v4l2-core/tuner-core.c index 06c18ba16fa0..177023200737 100644 --- a/drivers/media/v4l2-core/tuner-core.c +++ b/drivers/media/v4l2-core/tuner-core.c @@ -1260,7 +1260,9 @@ static int tuner_suspend(struct device *dev) tuner_dbg("suspend\n"); - if (!t->standby && analog_ops->standby) + if (t->fe.ops.tuner_ops.suspend) + t->fe.ops.tuner_ops.suspend(&t->fe); + else if (!t->standby && analog_ops->standby) analog_ops->standby(&t->fe); return 0; @@ -1273,7 +1275,9 @@ static int tuner_resume(struct device *dev) tuner_dbg("resume\n"); - if (!t->standby) + if (t->fe.ops.tuner_ops.resume) + t->fe.ops.tuner_ops.resume(&t->fe); + else if (!t->standby) if (set_mode(t, t->mode) == 0) set_freq(t, 0); |