23 #include <linux/slab.h>
24 #include <linux/module.h>
26 #include <asm/types.h>
31 #define dprintk(args...) \
34 printk(KERN_DEBUG "stb6000: " args); \
65 if (fe->
ops.i2c_gate_ctrl)
66 fe->
ops.i2c_gate_ctrl(fe, 1);
70 dprintk(
"%s: i2c error\n", __func__);
72 if (fe->
ops.i2c_gate_ctrl)
73 fe->
ops.i2c_gate_ctrl(fe, 0);
75 return (ret == 1) ? 0 :
ret;
102 if ((freq_mhz > 949) && (freq_mhz < 2151)) {
125 if (freq_mhz < 1075) {
133 buf[3] = (
unsigned char)(((n & 1) << 7) |
134 (m * freq_mhz - n * 16) | 0x60);
138 buf[6] = (
unsigned char)(bandwidth);
146 if (fe->
ops.i2c_gate_ctrl)
147 fe->
ops.i2c_gate_ctrl(fe, 1);
151 dprintk(
"%s: i2c error\n", __func__);
154 if (fe->
ops.i2c_gate_ctrl)
155 fe->
ops.i2c_gate_ctrl(fe, 0);
164 if (fe->
ops.i2c_gate_ctrl)
165 fe->
ops.i2c_gate_ctrl(fe, 1);
169 dprintk(
"%s: i2c error\n", __func__);
172 if (fe->
ops.i2c_gate_ctrl)
173 fe->
ops.i2c_gate_ctrl(fe, 0);
177 return (ret == 1) ? 0 :
ret;
191 .name =
"ST STB6000",
192 .frequency_min = 950000,
193 .frequency_max = 2150000
195 .release = stb6000_release,
196 .sleep = stb6000_sleep,
197 .set_params = stb6000_set_params,
198 .get_frequency = stb6000_get_frequency,
224 if (fe->
ops.i2c_gate_ctrl)
225 fe->
ops.i2c_gate_ctrl(fe, 1);
229 if (fe->
ops.i2c_gate_ctrl)
230 fe->
ops.i2c_gate_ctrl(fe, 0);
242 memcpy(&fe->
ops.tuner_ops, &stb6000_tuner_ops,