31 #include <linux/slab.h>
32 #include <linux/module.h>
34 #include <asm/types.h>
56 u8 reg0[] = { 0x00, 0x00 };
59 if (fe->
ops.i2c_gate_ctrl)
60 fe->
ops.i2c_gate_ctrl(fe, 1);
62 printk(
"%s: i2c error\n", __func__);
64 if (fe->
ops.i2c_gate_ctrl)
65 fe->
ops.i2c_gate_ctrl(fe, 0);
67 return (ret == 1) ? 0 :
ret;
76 u8 reg0[] = { 0x00, 0x00 };
77 u8 reg1[] = { 0x01, 0x00, 0x00, 0x00 };
78 u8 reg2[] = { 0x02, 0x00, 0x00 };
105 reg2[1] = (
_R >> 8) & 0x03;
120 reg1[1] |= (div >> 9) & 0x03;
122 reg1[3] = (div << 7);
123 priv->
frequency = ((div *
_P) * (_ri / 1000)) / _R;
126 reg1[3] |= (prediv - (div*
_P)) & 0x7f;
132 if (fe->
ops.i2c_gate_ctrl)
133 fe->
ops.i2c_gate_ctrl(fe, 1);
137 if (fe->
ops.i2c_gate_ctrl)
138 fe->
ops.i2c_gate_ctrl(fe, 1);
142 if (fe->
ops.i2c_gate_ctrl)
143 fe->
ops.i2c_gate_ctrl(fe, 1);
147 if (fe->
ops.i2c_gate_ctrl)
148 fe->
ops.i2c_gate_ctrl(fe, 0);
162 .name =
"Infineon TUA6100",
163 .frequency_min = 950000,
164 .frequency_max = 2150000,
165 .frequency_step = 1000,
167 .release = tua6100_release,
168 .sleep = tua6100_sleep,
169 .set_params = tua6100_set_params,
170 .get_frequency = tua6100_get_frequency,
178 struct i2c_msg msg [] = { { .
addr =
addr, .flags = 0, .buf = b1, .len = 1 },
182 if (fe->
ops.i2c_gate_ctrl)
183 fe->
ops.i2c_gate_ctrl(fe, 1);
185 if (fe->
ops.i2c_gate_ctrl)
186 fe->
ops.i2c_gate_ctrl(fe, 0);