v4l: tuner update
PATCH 1/1 v4l: tuner update
Hi,
This is an update for the v4l tuner modules (tuner.o + tda9887.o). Changes:
* fix two tuner config entries.
* switch insmod options to new 2.6-ish style.
* add suspend/resume functions.
The patch also removes all trailing whitespaces. I've a script to remove them from my sources now, that should kill those no-op whitespace changes in my patches after merging this initial cleanup.
Gerd
Signed-off-by Gerd Knorr <[email protected]>
--- drivers/media/video/tda9887.c | 31 +++++- drivers/media/video/tuner.c | 169 ++++++++++++++++++++-------------- include/media/tuner.h | 2 3 files changed, 131 insertions(+), 71 deletions(-)
include/media/tuner.h +1 -1
@@ -1,5 +1,5 @@ -/* +/* tuner.h - definition for different tuners Copyright (C) 1997 Markus Schroeder ([email protected])
drivers/media/video/tuner.c +102 -67
389 lines not on this page · raw message
drivers/media/video/tda9887.c +28 -3
@@ -535,6 +535,11 @@ static int tda9887_configure(struct tda9tda9887_set_config (t,buf);tda9887_set_insmod (t,buf); +if (t->std &V4L2_STD_SECAM_L ) { +/* secam fixup (FIXME: move this to tvnorms array?) */ + buf[1 ] &= ~cOutputPort2Inactive; + } +dprintk (PREFIX "writing: b=0x%02x c=0x%02x e=0x%02x\n" , buf[1 ],buf[2 ],buf[3 ]);if (debug >1 )
@@ -565,11 +570,11 @@ static int tda9887_attach(struct i2c_adareturn -ENOMEM ;memset (t,0 ,sizeof (*t)); t->client = client_template; - t->std =0 ;; + t->std =0 ; t->pinnacle_id =UNSET ;i2c_set_clientdata (&t->client, t);i2c_attach_client (&t->client); - +return 0 ; }
@@ -618,7 +623,7 @@ tda9887_command(struct i2c_client *clien t->radio =1 ;tda9887_configure (t);break ; - +case AUDC_CONFIG_PINNACLE : {int *i = arg;
@@ -712,6 +717,22 @@ tda9887_command(struct i2c_client *clienreturn 0 ; } +static int tda9887_suspend (struct device * dev,u32 state,u32 level) +{ +dprintk ("tda9887: suspend\n" ); +return 0 ; +} + +static int tda9887_resume (struct device * dev,u32 level) +{ + struct i2c_client *c = container_of(dev, struct i2c_client, dev); +struct tda9887 *t =i2c_get_clientdata (c); + +dprintk ("tda9887: resume\n" ); +tda9887_configure (t); +return 0 ; +} +/* ----------------------------------------------------------------------- */ static struct i2c_driver driver = {
@@ -722,6 +743,10 @@ static struct i2c_driver driver = { .attach_adapter = tda9887_probe, .detach_client = tda9887_detach, .command = tda9887_command, + .driver = { + .suspend = tda9887_suspend, + .resume = tda9887_resume, + }, };static struct i2c_client client_template = {
Signature · 1 line
return -ENOSIG;