4ce1567892
The last user of dvb_pll_configure was the dvb-usb function dvb_usb_tuner_calc_regs(), which was nothing more than a wrapper around dvb_pll_configure(). It's just a copy of the functionality provided by the tuner_ops calc_regs method, and can be deleted. There were two users of dvb_usb_tuner_calc_regs(). One was dvb_usb_tuner_set_params_i2c(), which is converted to use fe->ops.tuner_ops.calc_regs(). The other was the digitv driver. This driver can use one of two demods, mt352 or nxt6000. For the mt352, the driver would set tuner_ops.calc_regs to dvb_usb_tuner_calc_regs(). We can just attach dvb_pll and use the tuner_ops.calc_regs() provided by that module. For the nxt600, the driver would set tuner_ops.set_params to digitv_nxt6000_tuner_set_params. That function would in turn use dvb_usb_tuner_calc_regs(). We convert it to use tuner_ops.calc_regs() instead, and use dvb_pll_attach. The digitv_tuner_attach() needs to know which frontend was attached by digitv_frontend_attach(), since the nxt6000 needs tuner_ops.set_params() to be overridden with digitv_nxt6000_tuner_set_params(). So, to do this a digitv_state that says which frontend was used is added to the dvb_usb_device private state field. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
79 lines
2.2 KiB
C
79 lines
2.2 KiB
C
/*
|
|
* descriptions + helper functions for simple dvb plls.
|
|
*/
|
|
|
|
#ifndef __DVB_PLL_H__
|
|
#define __DVB_PLL_H__
|
|
|
|
#include <linux/i2c.h>
|
|
#include "dvb_frontend.h"
|
|
|
|
struct dvb_pll_desc {
|
|
char *name;
|
|
u32 min;
|
|
u32 max;
|
|
u32 iffreq;
|
|
void (*set)(u8 *buf, const struct dvb_frontend_parameters *params);
|
|
u8 *initdata;
|
|
u8 *sleepdata;
|
|
int count;
|
|
struct {
|
|
u32 limit;
|
|
u32 stepsize;
|
|
u8 config;
|
|
u8 cb;
|
|
} entries[12];
|
|
};
|
|
|
|
extern struct dvb_pll_desc dvb_pll_thomson_dtt7579;
|
|
extern struct dvb_pll_desc dvb_pll_thomson_dtt759x;
|
|
extern struct dvb_pll_desc dvb_pll_thomson_dtt7610;
|
|
extern struct dvb_pll_desc dvb_pll_lg_z201;
|
|
extern struct dvb_pll_desc dvb_pll_microtune_4042;
|
|
extern struct dvb_pll_desc dvb_pll_thomson_dtt761x;
|
|
extern struct dvb_pll_desc dvb_pll_unknown_1;
|
|
|
|
extern struct dvb_pll_desc dvb_pll_tua6010xs;
|
|
extern struct dvb_pll_desc dvb_pll_env57h1xd5;
|
|
extern struct dvb_pll_desc dvb_pll_tua6034;
|
|
extern struct dvb_pll_desc dvb_pll_lg_tdvs_h06xf;
|
|
extern struct dvb_pll_desc dvb_pll_tda665x;
|
|
extern struct dvb_pll_desc dvb_pll_fmd1216me;
|
|
extern struct dvb_pll_desc dvb_pll_tded4;
|
|
|
|
extern struct dvb_pll_desc dvb_pll_tuv1236d;
|
|
extern struct dvb_pll_desc dvb_pll_tdhu2;
|
|
extern struct dvb_pll_desc dvb_pll_samsung_tbmv;
|
|
extern struct dvb_pll_desc dvb_pll_philips_sd1878_tda8261;
|
|
extern struct dvb_pll_desc dvb_pll_philips_td1316;
|
|
|
|
extern struct dvb_pll_desc dvb_pll_thomson_fe6600;
|
|
extern struct dvb_pll_desc dvb_pll_opera1;
|
|
|
|
/**
|
|
* Attach a dvb-pll to the supplied frontend structure.
|
|
*
|
|
* @param fe Frontend to attach to.
|
|
* @param pll_addr i2c address of the PLL (if used).
|
|
* @param i2c i2c adapter to use (set to NULL if not used).
|
|
* @param desc dvb_pll_desc to use.
|
|
* @return Frontend pointer on success, NULL on failure
|
|
*/
|
|
#if defined(CONFIG_DVB_PLL) || (defined(CONFIG_DVB_PLL_MODULE) && defined(MODULE))
|
|
extern struct dvb_frontend *dvb_pll_attach(struct dvb_frontend *fe,
|
|
int pll_addr,
|
|
struct i2c_adapter *i2c,
|
|
struct dvb_pll_desc *desc);
|
|
#else
|
|
static inline struct dvb_frontend *dvb_pll_attach(struct dvb_frontend *fe,
|
|
int pll_addr,
|
|
struct i2c_adapter *i2c,
|
|
struct dvb_pll_desc *desc)
|
|
{
|
|
printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __FUNCTION__);
|
|
return NULL;
|
|
}
|
|
#endif
|
|
|
|
#endif
|