dvb-pll.h 2.3 KB
Newer Older
L
Linus Torvalds 已提交
1
/*
2
 * descriptions + helper functions for simple dvb plls.
L
Linus Torvalds 已提交
3 4
 */

5 6 7
#ifndef __DVB_PLL_H__
#define __DVB_PLL_H__

8 9 10
#include <linux/i2c.h>
#include "dvb_frontend.h"

L
Linus Torvalds 已提交
11 12 13 14
struct dvb_pll_desc {
	char *name;
	u32  min;
	u32  max;
15
	u32  iffreq;
16
	void (*setbw)(u8 *buf, u32 freq, int bandwidth);
17
	u8   *initdata;
18
	u8   *sleepdata;
L
Linus Torvalds 已提交
19 20 21 22
	int  count;
	struct {
		u32 limit;
		u32 stepsize;
23 24
		u8  config;
		u8  cb;
25
	} entries[12];
L
Linus Torvalds 已提交
26 27 28 29 30 31
};

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;
32
extern struct dvb_pll_desc dvb_pll_microtune_4042;
33
extern struct dvb_pll_desc dvb_pll_thomson_dtt761x;
L
Linus Torvalds 已提交
34 35
extern struct dvb_pll_desc dvb_pll_unknown_1;

36 37 38
extern struct dvb_pll_desc dvb_pll_tua6010xs;
extern struct dvb_pll_desc dvb_pll_env57h1xd5;
extern struct dvb_pll_desc dvb_pll_tua6034;
39
extern struct dvb_pll_desc dvb_pll_lg_tdvs_h06xf;
40
extern struct dvb_pll_desc dvb_pll_tda665x;
41
extern struct dvb_pll_desc dvb_pll_fmd1216me;
42
extern struct dvb_pll_desc dvb_pll_tded4;
43

44 45
extern struct dvb_pll_desc dvb_pll_tuv1236d;
extern struct dvb_pll_desc dvb_pll_tdhu2;
46
extern struct dvb_pll_desc dvb_pll_samsung_tbmv;
47
extern struct dvb_pll_desc dvb_pll_philips_sd1878_tda8261;
48
extern struct dvb_pll_desc dvb_pll_philips_td1316;
49

50
extern struct dvb_pll_desc dvb_pll_thomson_fe6600;
51

52
extern int dvb_pll_configure(struct dvb_pll_desc *desc, u8 *buf,
53
			     u32 freq, int bandwidth);
L
Linus Torvalds 已提交
54

55 56 57 58 59 60 61
/**
 * 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.
62
 * @return Frontend pointer on success, NULL on failure
63
 */
64
#if defined(CONFIG_DVB_PLL) || (defined(CONFIG_DVB_PLL_MODULE) && defined(MODULE))
65 66 67 68
extern struct dvb_frontend *dvb_pll_attach(struct dvb_frontend *fe,
					   int pll_addr,
					   struct i2c_adapter *i2c,
					   struct dvb_pll_desc *desc);
69 70 71 72 73 74 75 76 77 78
#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
79

80
#endif