23 #include <linux/slab.h>
24 #include <linux/module.h>
26 #include <asm/types.h>
31 #define dprintk(args...) \
33 if (debug) printk(KERN_DEBUG "tda826x: " args); \
55 u8 buf [] = { 0x00, 0x8d };
63 if (fe->
ops.i2c_gate_ctrl)
64 fe->
ops.i2c_gate_ctrl(fe, 1);
66 dprintk(
"%s: i2c error\n", __func__);
68 if (fe->
ops.i2c_gate_ctrl)
69 fe->
ops.i2c_gate_ctrl(fe, 0);
71 return (ret == 1) ? 0 :
ret;
92 bandwidth = (878 * ksyms + 6500000) / 1000000 + 1;
95 else if (bandwidth > 36)
102 buf[2] = (1<<5) | 0x0b;
105 buf[5] = ((bandwidth - 5) << 3) | 7;
112 if (fe->
ops.i2c_gate_ctrl)
113 fe->
ops.i2c_gate_ctrl(fe, 1);
115 dprintk(
"%s: i2c error\n", __func__);
117 if (fe->
ops.i2c_gate_ctrl)
118 fe->
ops.i2c_gate_ctrl(fe, 0);
122 return (ret == 1) ? 0 :
ret;
134 .name =
"Philips TDA826X",
135 .frequency_min = 950000,
136 .frequency_max = 2175000
138 .release = tda826x_release,
139 .sleep = tda826x_sleep,
140 .set_params = tda826x_set_params,
141 .get_frequency = tda826x_get_frequency,
150 { .addr =
addr, .flags =
I2C_M_RD, .buf = b1, .len = 2 }
156 if (fe->
ops.i2c_gate_ctrl)
157 fe->
ops.i2c_gate_ctrl(fe, 1);
159 if (fe->
ops.i2c_gate_ctrl)
160 fe->
ops.i2c_gate_ctrl(fe, 0);