Lines Matching +full:0 +full:x2a
40 dev_dbg(&priv->i2c->dev, "horus3a: I2C %s reg 0x%02x size %d\n", in horus3a_i2c_debug()
41 (write == 0 ? "read" : "write"), reg, len); in horus3a_i2c_debug()
54 .flags = 0, in horus3a_write_regs()
67 buf[0] = reg; in horus3a_write_regs()
70 if (ret >= 0 && ret != 1) in horus3a_write_regs()
72 if (ret < 0) { in horus3a_write_regs()
78 return 0; in horus3a_write_regs()
94 return 0; in horus3a_enter_power_save()
96 horus3a_write_reg(priv, 0x2a, 0x79); in horus3a_enter_power_save()
97 /* MDIV_EN = 0 */ in horus3a_enter_power_save()
98 horus3a_write_reg(priv, 0x29, 0x70); in horus3a_enter_power_save()
100 horus3a_write_reg(priv, 0x28, 0x3e); in horus3a_enter_power_save()
102 horus3a_write_reg(priv, 0x2a, 0x19); in horus3a_enter_power_save()
104 horus3a_write_reg(priv, 0x1c, 0x00); in horus3a_enter_power_save()
106 data[0] = 0xC0; in horus3a_enter_power_save()
108 data[1] = 0xA7; in horus3a_enter_power_save()
109 /* 0x11 - 0x12 */ in horus3a_enter_power_save()
110 horus3a_write_regs(priv, 0x11, data, sizeof(data)); in horus3a_enter_power_save()
112 return 0; in horus3a_enter_power_save()
121 return 0; in horus3a_leave_power_save()
123 data[0] = 0x00; in horus3a_leave_power_save()
125 data[1] = 0xa7; in horus3a_leave_power_save()
126 /* 0x11 - 0x12 */ in horus3a_leave_power_save()
127 horus3a_write_regs(priv, 0x11, data, sizeof(data)); in horus3a_leave_power_save()
129 horus3a_write_reg(priv, 0x2a, 0x79); in horus3a_leave_power_save()
131 horus3a_write_reg(priv, 0x1c, 0xc0); in horus3a_leave_power_save()
133 horus3a_write_reg(priv, 0x29, 0x71); in horus3a_leave_power_save()
136 return 0; in horus3a_leave_power_save()
144 return 0; in horus3a_init()
162 return 0; in horus3a_sleep()
171 u8 mixdiv = 0; in horus3a_set_params()
172 u8 mdiv = 0; in horus3a_set_params()
173 u32 ms = 0; in horus3a_set_params()
174 u8 f_ctl = 0; in horus3a_set_params()
175 u8 g_ctl = 0; in horus3a_set_params()
176 u8 fc_lpf = 0; in horus3a_set_params()
182 priv->set_tuner(priv->set_tuner_data, 0); in horus3a_set_params()
193 mdiv = 0; in horus3a_set_params()
197 if (ms > 0x7FFF) { /* 15 bit */ in horus3a_set_params()
204 f_ctl = 0x1C; in horus3a_set_params()
205 g_ctl = 0x01; in horus3a_set_params()
208 f_ctl = 0x18; in horus3a_set_params()
209 g_ctl = 0x02; in horus3a_set_params()
212 f_ctl = 0x14; in horus3a_set_params()
213 g_ctl = 0x02; in horus3a_set_params()
216 f_ctl = 0x10; in horus3a_set_params()
217 g_ctl = 0x03; in horus3a_set_params()
220 f_ctl = 0x0C; in horus3a_set_params()
221 g_ctl = 0x04; in horus3a_set_params()
224 f_ctl = 0x0A; in horus3a_set_params()
225 g_ctl = 0x04; in horus3a_set_params()
228 f_ctl = 0x07; in horus3a_set_params()
229 g_ctl = 0x05; in horus3a_set_params()
232 f_ctl = 0x04; in horus3a_set_params()
233 g_ctl = 0x02; in horus3a_set_params()
236 f_ctl = 0x02; in horus3a_set_params()
237 g_ctl = 0x01; in horus3a_set_params()
240 f_ctl = 0x00; in horus3a_set_params()
241 g_ctl = 0x00; in horus3a_set_params()
291 /* 0x00 - 0x04 */ in horus3a_set_params()
292 data[0] = (u8)((ms >> 7) & 0xFF); in horus3a_set_params()
293 data[1] = (u8)((ms << 1) & 0xFF); in horus3a_set_params()
294 data[2] = 0x00; in horus3a_set_params()
295 data[3] = 0x00; in horus3a_set_params()
297 horus3a_write_regs(priv, 0x00, data, sizeof(data)); in horus3a_set_params()
299 horus3a_write_reg(priv, 0x09, (u8)((g_ctl << 5) | f_ctl)); in horus3a_set_params()
301 horus3a_write_reg(priv, 0x37, (u8)(0x80 | (fc_lpf << 1))); in horus3a_set_params()
303 horus3a_write_reg(priv, 0x05, 0x80); in horus3a_set_params()
305 horus3a_write_reg(priv, 0x2a, 0x7b); in horus3a_set_params()
310 return 0; in horus3a_set_params()
318 return 0; in horus3a_get_frequency()
356 horus3a_write_reg(priv, 0x2a, 0x79); in horus3a_attach()
358 buf[0] = config->xtal_freq_mhz; in horus3a_attach()
360 buf[2] = 0; in horus3a_attach()
361 /* 0x6 - 0x8 */ in horus3a_attach()
362 horus3a_write_regs(priv, 0x6, buf, 3); in horus3a_attach()
364 horus3a_write_reg(priv, 0x0a, 0x40); in horus3a_attach()
367 val = 0x1f; in horus3a_attach()
370 val = 0x10; in horus3a_attach()
373 val = 0xc; in horus3a_attach()
376 val = 0; in horus3a_attach()
383 horus3a_write_reg(priv, 0x0e, val); in horus3a_attach()
388 fe->ops.i2c_gate_ctrl(fe, 0); in horus3a_attach()