diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-12-03 16:31:19 -0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-12-03 16:31:19 -0200 |
commit | 43fd2de310f83597e5a832b8cd8476631bd9e21b (patch) | |
tree | f5375b38731f6aa0ca0ddf9465b9070bd5d650a9 /linux/drivers/media | |
parent | 922aa12ba686eec51828927b546f9fab253a3f85 (diff) | |
parent | 71505e4c9a56607cc30704dc33fb3c53bb3c742e (diff) | |
download | mediapointer-dvb-s2-43fd2de310f83597e5a832b8cd8476631bd9e21b.tar.gz mediapointer-dvb-s2-43fd2de310f83597e5a832b8cd8476631bd9e21b.tar.bz2 |
merge: http://linuxtv.org/hg/~mkrufky/tda18271
From: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media')
-rw-r--r-- | linux/drivers/media/dvb/frontends/tda18271-fe.c | 169 | ||||
-rw-r--r-- | linux/drivers/media/dvb/frontends/tda18271-priv.h | 45 | ||||
-rw-r--r-- | linux/drivers/media/dvb/frontends/tda18271-tables.c | 112 |
3 files changed, 195 insertions, 131 deletions
diff --git a/linux/drivers/media/dvb/frontends/tda18271-fe.c b/linux/drivers/media/dvb/frontends/tda18271-fe.c index 08990ddaa..579229f3d 100644 --- a/linux/drivers/media/dvb/frontends/tda18271-fe.c +++ b/linux/drivers/media/dvb/frontends/tda18271-fe.c @@ -26,13 +26,9 @@ #include "tda18271.h" #include "tda18271-priv.h" -static int tda18271_debug; +int tda18271_debug; module_param_named(debug, tda18271_debug, int, 0644); -MODULE_PARM_DESC(debug, "Turn on/off frontend debugging (default:off)."); - -#define dprintk(level, fmt, arg...) do {\ - if (tda18271_debug >= level) \ - printk(KERN_DEBUG "%s: " fmt, __FUNCTION__, ##arg); } while (0) +MODULE_PARM_DESC(debug, "set debug level (info=1, map=2, reg=4 (or-able))"); /*---------------------------------------------------------------------*/ @@ -76,23 +72,23 @@ static void tda18271_dump_regs(struct dvb_frontend *fe) struct tda18271_priv *priv = fe->tuner_priv; unsigned char *regs = priv->tda18271_regs; - dprintk(1, "=== TDA18271 REG DUMP ===\n"); - dprintk(1, "ID_BYTE = 0x%x\n", 0xff & regs[R_ID]); - dprintk(1, "THERMO_BYTE = 0x%x\n", 0xff & regs[R_TM]); - dprintk(1, "POWER_LEVEL_BYTE = 0x%x\n", 0xff & regs[R_PL]); - dprintk(1, "EASY_PROG_BYTE_1 = 0x%x\n", 0xff & regs[R_EP1]); - dprintk(1, "EASY_PROG_BYTE_2 = 0x%x\n", 0xff & regs[R_EP2]); - dprintk(1, "EASY_PROG_BYTE_3 = 0x%x\n", 0xff & regs[R_EP3]); - dprintk(1, "EASY_PROG_BYTE_4 = 0x%x\n", 0xff & regs[R_EP4]); - dprintk(1, "EASY_PROG_BYTE_5 = 0x%x\n", 0xff & regs[R_EP5]); - dprintk(1, "CAL_POST_DIV_BYTE = 0x%x\n", 0xff & regs[R_CPD]); - dprintk(1, "CAL_DIV_BYTE_1 = 0x%x\n", 0xff & regs[R_CD1]); - dprintk(1, "CAL_DIV_BYTE_2 = 0x%x\n", 0xff & regs[R_CD2]); - dprintk(1, "CAL_DIV_BYTE_3 = 0x%x\n", 0xff & regs[R_CD3]); - dprintk(1, "MAIN_POST_DIV_BYTE = 0x%x\n", 0xff & regs[R_MPD]); - dprintk(1, "MAIN_DIV_BYTE_1 = 0x%x\n", 0xff & regs[R_MD1]); - dprintk(1, "MAIN_DIV_BYTE_2 = 0x%x\n", 0xff & regs[R_MD2]); - dprintk(1, "MAIN_DIV_BYTE_3 = 0x%x\n", 0xff & regs[R_MD3]); + dbg_reg("=== TDA18271 REG DUMP ===\n"); + dbg_reg("ID_BYTE = 0x%02x\n", 0xff & regs[R_ID]); + dbg_reg("THERMO_BYTE = 0x%02x\n", 0xff & regs[R_TM]); + dbg_reg("POWER_LEVEL_BYTE = 0x%02x\n", 0xff & regs[R_PL]); + dbg_reg("EASY_PROG_BYTE_1 = 0x%02x\n", 0xff & regs[R_EP1]); + dbg_reg("EASY_PROG_BYTE_2 = 0x%02x\n", 0xff & regs[R_EP2]); + dbg_reg("EASY_PROG_BYTE_3 = 0x%02x\n", 0xff & regs[R_EP3]); + dbg_reg("EASY_PROG_BYTE_4 = 0x%02x\n", 0xff & regs[R_EP4]); + dbg_reg("EASY_PROG_BYTE_5 = 0x%02x\n", 0xff & regs[R_EP5]); + dbg_reg("CAL_POST_DIV_BYTE = 0x%02x\n", 0xff & regs[R_CPD]); + dbg_reg("CAL_DIV_BYTE_1 = 0x%02x\n", 0xff & regs[R_CD1]); + dbg_reg("CAL_DIV_BYTE_2 = 0x%02x\n", 0xff & regs[R_CD2]); + dbg_reg("CAL_DIV_BYTE_3 = 0x%02x\n", 0xff & regs[R_CD3]); + dbg_reg("MAIN_POST_DIV_BYTE = 0x%02x\n", 0xff & regs[R_MPD]); + dbg_reg("MAIN_DIV_BYTE_1 = 0x%02x\n", 0xff & regs[R_MD1]); + dbg_reg("MAIN_DIV_BYTE_2 = 0x%02x\n", 0xff & regs[R_MD2]); + dbg_reg("MAIN_DIV_BYTE_3 = 0x%02x\n", 0xff & regs[R_MD3]); } static void tda18271_read_regs(struct dvb_frontend *fe) @@ -119,7 +115,7 @@ static void tda18271_read_regs(struct dvb_frontend *fe) printk("ERROR: %s: i2c_transfer returned: %d\n", __FUNCTION__, ret); - if (tda18271_debug > 2) + if (tda18271_debug & DBG_REG) tda18271_dump_regs(fe); } @@ -338,13 +334,10 @@ static int tda18271_init_regs(struct dvb_frontend *fe) return 0; } -static int tda18271_tune(struct dvb_frontend *fe, - u32 ifc, u32 freq, u32 bw, u8 std) +static int tda18271_init(struct dvb_frontend *fe) { struct tda18271_priv *priv = fe->tuner_priv; unsigned char *regs = priv->tda18271_regs; - u32 div, N = 0; - int i; tda18271_read_regs(fe); @@ -352,27 +345,33 @@ static int tda18271_tune(struct dvb_frontend *fe, if ((regs[R_EP1] & 0x08) == 0) tda18271_init_regs(fe); + return 0; +} + +static int tda18271_tune(struct dvb_frontend *fe, + u32 ifc, u32 freq, u32 bw, u8 std) +{ + struct tda18271_priv *priv = fe->tuner_priv; + unsigned char *regs = priv->tda18271_regs; + u32 div, N = 0; + u8 d, pd, val; + + tda18271_init(fe); #if 0 /* FIXME: FM Radio support */ if (t->mode == V4L2_TUNER_RADIO) freq = freq / 1000; #endif - dprintk(1, "freq = %d, ifc = %d\n", freq, ifc); + dbg_info("freq = %d, ifc = %d\n", freq, ifc); /* RF tracking filter calibration */ /* calculate BP_Filter */ - i = 0; - while ((tda18271_bp_filter[i].rfmax * 1000) < freq) { - if (tda18271_bp_filter[i + 1].rfmax == 0) - break; - i++; - } - dprintk(2, "bp filter = 0x%x, i = %d\n", tda18271_bp_filter[i].val, i); + tda18271_calc_bp_filter(&freq, &val); regs[R_EP1] &= ~0x07; /* clear bp filter bits */ - regs[R_EP1] |= tda18271_bp_filter[i].val; + regs[R_EP1] |= val; tda18271_write_regs(fe, R_EP1, 1); regs[R_EB4] &= 0x07; @@ -402,18 +401,11 @@ static int tda18271_tune(struct dvb_frontend *fe, break; } - i = 0; - while ((tda18271_cal_pll[i].lomax * 1000) < N) { - if (tda18271_cal_pll[i + 1].lomax == 0) - break; - i++; - } - dprintk(2, "cal pll, pd = 0x%x, d = 0x%x, i = %d\n", - tda18271_cal_pll[i].pd, tda18271_cal_pll[i].d, i); + tda18271_calc_cal_pll(&N, &pd, &d); - regs[R_CPD] = tda18271_cal_pll[i].pd; + regs[R_CPD] = pd; - div = ((tda18271_cal_pll[i].d * (N / 1000)) << 7) / 125; + div = ((d * (N / 1000)) << 7) / 125; regs[R_CD1] = 0xff & (div >> 16); regs[R_CD2] = 0xff & (div >> 8); regs[R_CD3] = 0xff & div; @@ -429,16 +421,9 @@ static int tda18271_tune(struct dvb_frontend *fe, break; } - i = 0; - while ((tda18271_main_pll[i].lomax * 1000) < N) { - if (tda18271_main_pll[i + 1].lomax == 0) - break; - i++; - } - dprintk(2, "main pll, pd = 0x%x, d = 0x%x, i = %d\n", - tda18271_main_pll[i].pd, tda18271_main_pll[i].d, i); + tda18271_calc_main_pll(&N, &pd, &d); - regs[R_MPD] = (0x7f & tda18271_main_pll[i].pd); + regs[R_MPD] = (0x7f & pd); switch (priv->mode) { case TDA18271_ANALOG: @@ -449,7 +434,7 @@ static int tda18271_tune(struct dvb_frontend *fe, break; } - div = ((tda18271_main_pll[i].d * (N / 1000)) << 7) / 125; + div = ((d * (N / 1000)) << 7) / 125; regs[R_MD1] = 0xff & (div >> 16); regs[R_MD2] = 0xff & (div >> 8); regs[R_MD3] = 0xff & div; @@ -458,42 +443,23 @@ static int tda18271_tune(struct dvb_frontend *fe, msleep(5); /* RF tracking filter calibration initialization */ /* search for K,M,CO for RF Calibration */ - i = 0; - while ((tda18271_km[i].rfmax * 1000) < freq) { - if (tda18271_km[i + 1].rfmax == 0) - break; - i++; - } - dprintk(2, "km = 0x%x, i = %d\n", tda18271_km[i].val, i); + tda18271_calc_km(&freq, &val); regs[R_EB13] &= 0x83; - regs[R_EB13] |= tda18271_km[i].val; + regs[R_EB13] |= val; tda18271_write_regs(fe, R_EB13, 1); /* search for RF_BAND */ - i = 0; - while ((tda18271_rf_band[i].rfmax * 1000) < freq) { - if (tda18271_rf_band[i + 1].rfmax == 0) - break; - i++; - } - dprintk(2, "rf band = 0x%x, i = %d\n", tda18271_rf_band[i].val, i); + tda18271_calc_rf_band(&freq, &val); regs[R_EP2] &= ~0xe0; /* clear rf band bits */ - regs[R_EP2] |= (tda18271_rf_band[i].val << 5); + regs[R_EP2] |= (val << 5); /* search for Gain_Taper */ - i = 0; - while ((tda18271_gain_taper[i].rfmax * 1000) < freq) { - if (tda18271_gain_taper[i + 1].rfmax == 0) - break; - i++; - } - dprintk(2, "gain taper = 0x%x, i = %d\n", - tda18271_gain_taper[i].val, i); + tda18271_calc_gain_taper(&freq, &val); regs[R_EP2] &= ~0x1f; /* clear gain taper bits */ - regs[R_EP2] |= tda18271_gain_taper[i].val; + regs[R_EP2] |= val; tda18271_write_regs(fe, R_EP2, 1); tda18271_write_regs(fe, R_EP1, 1); @@ -518,17 +484,11 @@ static int tda18271_tune(struct dvb_frontend *fe, tda18271_write_regs(fe, R_EP1, 1); /* RF tracking filer correction for VHF_Low band */ - i = 0; - while ((tda18271_rf_cal[i].rfmax * 1000) < freq) { - if (tda18271_rf_cal[i].rfmax == 0) - break; - i++; - } - dprintk(2, "rf cal = 0x%x, i = %d\n", tda18271_rf_cal[i].val, i); + tda18271_calc_rf_cal(&freq, &val); /* VHF_Low band only */ - if (tda18271_rf_cal[i].rfmax != 0) { - regs[R_EB14] = tda18271_rf_cal[i].val; + if (val != 0) { + regs[R_EB14] = val; tda18271_write_regs(fe, R_EB14, 1); } @@ -567,21 +527,18 @@ static int tda18271_tune(struct dvb_frontend *fe, regs[R_EP4] &= ~0x80; /* turn this bit on only for fm */ - /* FIXME: image rejection validity EP5[2:0] */ + /* image rejection validity EP5[2:0] */ + tda18271_calc_ir_measure(&freq, &val); + + regs[R_EP5] &= ~0x07; + regs[R_EP5] |= val; /* calculate MAIN PLL */ N = freq + ifc; - i = 0; - while ((tda18271_main_pll[i].lomax * 1000) < N) { - if (tda18271_main_pll[i + 1].lomax == 0) - break; - i++; - } - dprintk(2, "main pll, pd = 0x%x, d = 0x%x, i = %d\n", - tda18271_main_pll[i].pd, tda18271_main_pll[i].d, i); + tda18271_calc_main_pll(&N, &pd, &d); - regs[R_MPD] = (0x7f & tda18271_main_pll[i].pd); + regs[R_MPD] = (0x7f & pd); switch (priv->mode) { case TDA18271_ANALOG: regs[R_MPD] &= ~0x08; @@ -591,7 +548,7 @@ static int tda18271_tune(struct dvb_frontend *fe, break; } - div = ((tda18271_main_pll[i].d * (N / 1000)) << 7) / 125; + div = ((d * (N / 1000)) << 7) / 125; regs[R_MD1] = 0xff & (div >> 16); regs[R_MD2] = 0xff & (div >> 8); regs[R_MD3] = 0xff & div; @@ -714,7 +671,7 @@ static int tda18271_set_analog_params(struct dvb_frontend *fe, if (params->mode == V4L2_TUNER_RADIO) sgIF = 88; /* if frequency is 5.5 MHz */ - dprintk(1, "setting tda18271 to system %s\n", mode); + dbg_info("setting tda18271 to system %s\n", mode); return tda18271_tune(fe, sgIF * 62500, params->frequency * 62500, 0, std); @@ -748,7 +705,7 @@ static struct dvb_tuner_ops tda18271_tuner_ops = { .frequency_max = 864000000, .frequency_step = 62500 }, - .init = tda18271_init_regs, + .init = tda18271_init, .set_params = tda18271_set_params, .set_analog_params = tda18271_set_analog_params, .release = tda18271_release, @@ -761,7 +718,7 @@ struct dvb_frontend *tda18271_attach(struct dvb_frontend *fe, u8 addr, { struct tda18271_priv *priv = NULL; - dprintk(1, "@ %d-%04x\n", i2c_adapter_id(i2c), addr); + dbg_info("@ %d-%04x\n", i2c_adapter_id(i2c), addr); priv = kzalloc(sizeof(struct tda18271_priv), GFP_KERNEL); if (priv == NULL) return NULL; @@ -774,6 +731,8 @@ struct dvb_frontend *tda18271_attach(struct dvb_frontend *fe, u8 addr, fe->tuner_priv = priv; + tda18271_init_regs(fe); + return fe; } EXPORT_SYMBOL_GPL(tda18271_attach); diff --git a/linux/drivers/media/dvb/frontends/tda18271-priv.h b/linux/drivers/media/dvb/frontends/tda18271-priv.h index 71b4d7963..d56c2fe3e 100644 --- a/linux/drivers/media/dvb/frontends/tda18271-priv.h +++ b/linux/drivers/media/dvb/frontends/tda18271-priv.h @@ -21,6 +21,7 @@ #ifndef __TDA18271_PRIV_H__ #define __TDA18271_PRIV_H__ +#include <linux/kernel.h> #include <linux/types.h> #define R_ID 0x00 /* ID byte */ @@ -65,25 +66,31 @@ #define TDA18271_NUM_REGS 39 -struct tda18271_pll_map { - u32 lomax; - u8 pd; /* post div */ - u8 d; /* div */ -}; - -extern struct tda18271_pll_map tda18271_main_pll[]; -extern struct tda18271_pll_map tda18271_cal_pll[]; - -struct tda18271_map { - u32 rfmax; - u8 val; -}; - -extern struct tda18271_map tda18271_bp_filter[]; -extern struct tda18271_map tda18271_km[]; -extern struct tda18271_map tda18271_rf_band[]; -extern struct tda18271_map tda18271_gain_taper[]; -extern struct tda18271_map tda18271_rf_cal[]; +extern int tda18271_debug; + +#define dprintk(level, fmt, arg...) do {\ + if (tda18271_debug & level) \ + printk(KERN_DEBUG "%s: " fmt, __FUNCTION__, ##arg); } while (0) + +#define DBG_INFO 1 +#define DBG_MAP 2 +#define DBG_REG 4 + +#define dbg_info(fmt, arg...) dprintk(DBG_INFO, fmt, ##arg) +#define dbg_map(fmt, arg...) dprintk(DBG_MAP, fmt, ##arg) +#define dbg_reg(fmt, arg...) dprintk(DBG_REG, fmt, ##arg) + +/*---------------------------------------------------------------------*/ + +extern void tda18271_calc_cal_pll(u32 *freq, u8 *post_div, u8 *div); +extern void tda18271_calc_main_pll(u32 *freq, u8 *post_div, u8 *div); + +extern void tda18271_calc_bp_filter(u32 *freq, u8 *val); +extern void tda18271_calc_km(u32 *freq, u8 *val); +extern void tda18271_calc_rf_band(u32 *freq, u8 *val); +extern void tda18271_calc_gain_taper(u32 *freq, u8 *val); +extern void tda18271_calc_rf_cal(u32 *freq, u8 *val); +extern void tda18271_calc_ir_measure(u32 *freq, u8 *val); #endif /* __TDA18271_PRIV_H__ */ diff --git a/linux/drivers/media/dvb/frontends/tda18271-tables.c b/linux/drivers/media/dvb/frontends/tda18271-tables.c index a018b5140..65387bb05 100644 --- a/linux/drivers/media/dvb/frontends/tda18271-tables.c +++ b/linux/drivers/media/dvb/frontends/tda18271-tables.c @@ -20,7 +20,20 @@ #include "tda18271-priv.h" -struct tda18271_pll_map tda18271_main_pll[] = { +struct tda18271_pll_map { + u32 lomax; + u8 pd; /* post div */ + u8 d; /* div */ +}; + +struct tda18271_map { + u32 rfmax; + u8 val; +}; + +/*---------------------------------------------------------------------*/ + +static struct tda18271_pll_map tda18271_main_pll[] = { { .lomax = 32000, .pd = 0x5f, .d = 0xf0 }, { .lomax = 35000, .pd = 0x5e, .d = 0xe0 }, { .lomax = 37000, .pd = 0x5d, .d = 0xd0 }, @@ -64,7 +77,7 @@ struct tda18271_pll_map tda18271_main_pll[] = { { .lomax = 0, .pd = 0x00, .d = 0x00 }, /* end */ }; -struct tda18271_pll_map tda18271_cal_pll[] = { +static struct tda18271_pll_map tda18271_cal_pll[] = { { .lomax = 33000, .pd = 0xdd, .d = 0xd0 }, { .lomax = 36000, .pd = 0xdc, .d = 0xc0 }, { .lomax = 40000, .pd = 0xdb, .d = 0xb0 }, @@ -103,7 +116,7 @@ struct tda18271_pll_map tda18271_cal_pll[] = { { .lomax = 0, .pd = 0x00, .d = 0x00 }, /* end */ }; -struct tda18271_map tda18271_bp_filter[] = { +static struct tda18271_map tda18271_bp_filter[] = { { .rfmax = 62000, .val = 0x00 }, { .rfmax = 84000, .val = 0x01 }, { .rfmax = 100000, .val = 0x02 }, @@ -114,7 +127,7 @@ struct tda18271_map tda18271_bp_filter[] = { { .rfmax = 0, .val = 0x00 }, /* end */ }; -struct tda18271_map tda18271_km[] = { +static struct tda18271_map tda18271_km[] = { { .rfmax = 61100, .val = 0x74 }, { .rfmax = 350000, .val = 0x40 }, { .rfmax = 720000, .val = 0x30 }, @@ -122,7 +135,7 @@ struct tda18271_map tda18271_km[] = { { .rfmax = 0, .val = 0x00 }, /* end */ }; -struct tda18271_map tda18271_rf_band[] = { +static struct tda18271_map tda18271_rf_band[] = { { .rfmax = 47900, .val = 0x00 }, { .rfmax = 61100, .val = 0x01 }, /* { .rfmax = 152600, .val = 0x02 }, */ @@ -134,7 +147,7 @@ struct tda18271_map tda18271_rf_band[] = { { .rfmax = 0, .val = 0x00 }, /* end */ }; -struct tda18271_map tda18271_gain_taper[] = { +static struct tda18271_map tda18271_gain_taper[] = { { .rfmax = 45400, .val = 0x1f }, { .rfmax = 45800, .val = 0x1e }, { .rfmax = 46200, .val = 0x1d }, @@ -223,7 +236,7 @@ struct tda18271_map tda18271_gain_taper[] = { { .rfmax = 0, .val = 0x00 }, /* end */ }; -struct tda18271_map tda18271_rf_cal[] = { +static struct tda18271_map tda18271_rf_cal[] = { { .rfmax = 41000, .val = 0x1e }, { .rfmax = 43000, .val = 0x30 }, { .rfmax = 45000, .val = 0x43 }, @@ -244,6 +257,91 @@ struct tda18271_map tda18271_rf_cal[] = { { .rfmax = 0, .val = 0x00 }, /* end */ }; +static struct tda18271_map tda18271_ir_measure[] = { + { .rfmax = 30000, .val = 4}, + { .rfmax = 200000, .val = 5}, + { .rfmax = 600000, .val = 6}, + { .rfmax = 865000, .val = 7}, + { .rfmax = 0, .val = 0}, /* end */ +}; + +/*---------------------------------------------------------------------*/ + +static void tda18271_lookup_map(struct tda18271_map *map, + u32 *freq, u8 *val) +{ + int i = 0; + while ((map[i].rfmax * 1000) < *freq) { + if (map[i + 1].rfmax == 0) + break; + i++; + } + *val = map[i].val; +} + +static void tda18271_lookup_pll_map(struct tda18271_pll_map *map, + u32 *freq, u8 *post_div, u8 *div) +{ + int i = 0; + while ((map[i].lomax * 1000) < *freq) { + if (map[i + 1].lomax == 0) + break; + i++; + } + *post_div = map[i].pd; + *div = map[i].d; +} + +/*---------------------------------------------------------------------*/ + +void tda18271_calc_cal_pll(u32 *freq, u8 *post_div, u8 *div) +{ + tda18271_lookup_pll_map(tda18271_cal_pll, freq, post_div, div); + dbg_map("post div = 0x%02x, div = 0x%02x\n", *post_div, *div); +} + +void tda18271_calc_main_pll(u32 *freq, u8 *post_div, u8 *div) +{ + tda18271_lookup_pll_map(tda18271_main_pll, freq, post_div, div); + dbg_map("post div = 0x%02x, div = 0x%02x\n", *post_div, *div); +} + +void tda18271_calc_bp_filter(u32 *freq, u8 *val) +{ + tda18271_lookup_map(tda18271_bp_filter, freq, val); + dbg_map("0x%02x\n", *val); +} + +void tda18271_calc_km(u32 *freq, u8 *val) +{ + tda18271_lookup_map(tda18271_km, freq, val); + dbg_map("0x%02x\n", *val); +} + +void tda18271_calc_rf_band(u32 *freq, u8 *val) +{ + tda18271_lookup_map(tda18271_rf_band, freq, val); + dbg_map("0x%02x\n", *val); +} + +void tda18271_calc_gain_taper(u32 *freq, u8 *val) +{ + tda18271_lookup_map(tda18271_gain_taper, freq, val); + dbg_map("0x%02x\n", *val); +} + +void tda18271_calc_rf_cal(u32 *freq, u8 *val) +{ + tda18271_lookup_map(tda18271_rf_cal, freq, val); + dbg_map("0x%02x\n", *val); +} + +void tda18271_calc_ir_measure(u32 *freq, u8 *val) +{ + tda18271_lookup_map(tda18271_ir_measure, freq, val); + dbg_map("0x%02x\n", *val); +} + /* * Overrides for Emacs so that we follow Linus's tabbing style. * --------------------------------------------------------------------------- |