diff options
author | Michael Krufky <mkrufky@linuxtv.org> | 2007-12-02 14:36:05 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-01-25 16:03:13 -0500 |
commit | b5f3e1e153b60f7bc338cdd6eefacd59c2dfb375 (patch) | |
tree | 75a18d39c89b415c10aaa2152730944135e5ff7c /drivers/media/dvb/frontends/tda18271-priv.h | |
parent | aaeccba68a60eedee5fe90f9e1478367b1f97345 (diff) |
V4L/DVB (6727): tda18271: convert table lookup loops to functions
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/dvb/frontends/tda18271-priv.h')
-rw-r--r-- | drivers/media/dvb/frontends/tda18271-priv.h | 46 |
1 files changed, 26 insertions, 20 deletions
diff --git a/drivers/media/dvb/frontends/tda18271-priv.h b/drivers/media/dvb/frontends/tda18271-priv.h index a3158eb25594..d56c2fe3efa2 100644 --- a/drivers/media/dvb/frontends/tda18271-priv.h +++ b/drivers/media/dvb/frontends/tda18271-priv.h | |||
@@ -21,6 +21,7 @@ | |||
21 | #ifndef __TDA18271_PRIV_H__ | 21 | #ifndef __TDA18271_PRIV_H__ |
22 | #define __TDA18271_PRIV_H__ | 22 | #define __TDA18271_PRIV_H__ |
23 | 23 | ||
24 | #include <linux/kernel.h> | ||
24 | #include <linux/types.h> | 25 | #include <linux/types.h> |
25 | 26 | ||
26 | #define R_ID 0x00 /* ID byte */ | 27 | #define R_ID 0x00 /* ID byte */ |
@@ -65,26 +66,31 @@ | |||
65 | 66 | ||
66 | #define TDA18271_NUM_REGS 39 | 67 | #define TDA18271_NUM_REGS 39 |
67 | 68 | ||
68 | struct tda18271_pll_map { | 69 | extern int tda18271_debug; |
69 | u32 lomax; | 70 | |
70 | u8 pd; /* post div */ | 71 | #define dprintk(level, fmt, arg...) do {\ |
71 | u8 d; /* div */ | 72 | if (tda18271_debug & level) \ |
72 | }; | 73 | printk(KERN_DEBUG "%s: " fmt, __FUNCTION__, ##arg); } while (0) |
73 | 74 | ||
74 | extern struct tda18271_pll_map tda18271_main_pll[]; | 75 | #define DBG_INFO 1 |
75 | extern struct tda18271_pll_map tda18271_cal_pll[]; | 76 | #define DBG_MAP 2 |
76 | 77 | #define DBG_REG 4 | |
77 | struct tda18271_map { | 78 | |
78 | u32 rfmax; | 79 | #define dbg_info(fmt, arg...) dprintk(DBG_INFO, fmt, ##arg) |
79 | u8 val; | 80 | #define dbg_map(fmt, arg...) dprintk(DBG_MAP, fmt, ##arg) |
80 | }; | 81 | #define dbg_reg(fmt, arg...) dprintk(DBG_REG, fmt, ##arg) |
81 | 82 | ||
82 | extern struct tda18271_map tda18271_bp_filter[]; | 83 | /*---------------------------------------------------------------------*/ |
83 | extern struct tda18271_map tda18271_km[]; | 84 | |
84 | extern struct tda18271_map tda18271_rf_band[]; | 85 | extern void tda18271_calc_cal_pll(u32 *freq, u8 *post_div, u8 *div); |
85 | extern struct tda18271_map tda18271_gain_taper[]; | 86 | extern void tda18271_calc_main_pll(u32 *freq, u8 *post_div, u8 *div); |
86 | extern struct tda18271_map tda18271_rf_cal[]; | 87 | |
87 | extern struct tda18271_map tda18271_ir_measure[]; | 88 | extern void tda18271_calc_bp_filter(u32 *freq, u8 *val); |
89 | extern void tda18271_calc_km(u32 *freq, u8 *val); | ||
90 | extern void tda18271_calc_rf_band(u32 *freq, u8 *val); | ||
91 | extern void tda18271_calc_gain_taper(u32 *freq, u8 *val); | ||
92 | extern void tda18271_calc_rf_cal(u32 *freq, u8 *val); | ||
93 | extern void tda18271_calc_ir_measure(u32 *freq, u8 *val); | ||
88 | 94 | ||
89 | #endif /* __TDA18271_PRIV_H__ */ | 95 | #endif /* __TDA18271_PRIV_H__ */ |
90 | 96 | ||