aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/em28xx/em28xx-dvb.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2008-11-27 07:10:40 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-12-29 14:53:43 -0500
commit2fe3e2ee72ef17daad1d3769321bb7dd69a003a9 (patch)
tree1d2e7a225417759a5ad55408d76416af5e7e6eb8 /drivers/media/video/em28xx/em28xx-dvb.c
parentf502e861849ade3a128964410c87acedf437a6a1 (diff)
V4L/DVB (9764): em28xx: Add support for suspend the device when not used
Several chips may be turned off when the device is not used, like audio, video and dvb demods. This patch adds a gpio callback at the core structs to allow turning off such devices. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/em28xx/em28xx-dvb.c')
-rw-r--r--drivers/media/video/em28xx/em28xx-dvb.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/media/video/em28xx/em28xx-dvb.c b/drivers/media/video/em28xx/em28xx-dvb.c
index 09c15cc088a6..211156d458f0 100644
--- a/drivers/media/video/em28xx/em28xx-dvb.c
+++ b/drivers/media/video/em28xx/em28xx-dvb.c
@@ -161,7 +161,7 @@ static int stop_streaming(struct em28xx_dvb *dvb)
161 161
162 em28xx_uninit_isoc(dev); 162 em28xx_uninit_isoc(dev);
163 163
164 em28xx_set_mode(dev, EM28XX_MODE_UNDEFINED); 164 em28xx_set_mode(dev, EM28XX_SUSPEND);
165 165
166 return 0; 166 return 0;
167} 167}
@@ -215,7 +215,7 @@ static int em28xx_dvb_bus_ctrl(struct dvb_frontend *fe, int acquire)
215 if (acquire) 215 if (acquire)
216 return em28xx_set_mode(dev, EM28XX_DIGITAL_MODE); 216 return em28xx_set_mode(dev, EM28XX_DIGITAL_MODE);
217 else 217 else
218 return em28xx_set_mode(dev, EM28XX_MODE_UNDEFINED); 218 return em28xx_set_mode(dev, EM28XX_SUSPEND);
219} 219}
220 220
221/* ------------------------------------------------------------------ */ 221/* ------------------------------------------------------------------ */
@@ -466,12 +466,12 @@ static int dvb_init(struct em28xx *dev)
466 if (result < 0) 466 if (result < 0)
467 goto out_free; 467 goto out_free;
468 468
469 em28xx_set_mode(dev, EM28XX_MODE_UNDEFINED); 469 em28xx_set_mode(dev, EM28XX_SUSPEND);
470 printk(KERN_INFO "Successfully loaded em28xx-dvb\n"); 470 printk(KERN_INFO "Successfully loaded em28xx-dvb\n");
471 return 0; 471 return 0;
472 472
473out_free: 473out_free:
474 em28xx_set_mode(dev, EM28XX_MODE_UNDEFINED); 474 em28xx_set_mode(dev, EM28XX_SUSPEND);
475 kfree(dvb); 475 kfree(dvb);
476 dev->dvb = NULL; 476 dev->dvb = NULL;
477 return result; 477 return result;