Commit 71a2ee37 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

V4L/DVB (6660): Allow fully configuring xc3028 during xc2028_attach

xc3028 can be used on some DTV only designs (for example, DVB-S boards). Before
this patch, a DTV only board would need to call set_tuner_config callback.

This patch allows to optionally pass a xc3028_ctrl parameter, via xc3028_config
struct, fully initializing the driver for DTV.
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent 5add9a6f
...@@ -1061,7 +1061,7 @@ void *xc2028_attach(struct dvb_frontend *fe, struct xc2028_config *cfg) ...@@ -1061,7 +1061,7 @@ void *xc2028_attach(struct dvb_frontend *fe, struct xc2028_config *cfg)
if (debug) if (debug)
printk(KERN_DEBUG PREFIX ": Xcv2028/3028 init called!\n"); printk(KERN_DEBUG PREFIX ": Xcv2028/3028 init called!\n");
if (NULL == cfg->video_dev) if (NULL == cfg || NULL == cfg->video_dev)
return NULL; return NULL;
if (!fe) { if (!fe) {
...@@ -1106,6 +1106,9 @@ void *xc2028_attach(struct dvb_frontend *fe, struct xc2028_config *cfg) ...@@ -1106,6 +1106,9 @@ void *xc2028_attach(struct dvb_frontend *fe, struct xc2028_config *cfg)
tuner_info("type set to %s\n", "XCeive xc2028/xc3028 tuner"); tuner_info("type set to %s\n", "XCeive xc2028/xc3028 tuner");
if (cfg->ctrl)
xc2028_set_config(fe, cfg->ctrl);
mutex_unlock(&xc2028_list_mutex); mutex_unlock(&xc2028_list_mutex);
return fe; return fe;
......
...@@ -23,6 +23,7 @@ struct xc2028_config { ...@@ -23,6 +23,7 @@ struct xc2028_config {
struct i2c_adapter *i2c_adap; struct i2c_adapter *i2c_adap;
u8 i2c_addr; u8 i2c_addr;
void *video_dev; void *video_dev;
struct xc2028_ctrl *ctrl;
int (*callback) (void *dev, int command, int arg); int (*callback) (void *dev, int command, int arg);
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment