Lines Matching +full:0 +full:xd0

16 		  .flags = 0, .buf = &reg, .len = 1 },  in qt1010_readreg()
26 return 0; in qt1010_readreg()
34 .flags = 0, .buf = buf, .len = 2 }; in qt1010_writereg()
41 return 0; in qt1010_writereg()
52 { QT1010_WR, 0x01, 0x80 }, in qt1010_set_params()
53 { QT1010_WR, 0x02, 0x3f }, in qt1010_set_params()
54 { QT1010_WR, 0x05, 0xff }, /* 02 c write */ in qt1010_set_params()
55 { QT1010_WR, 0x06, 0x44 }, in qt1010_set_params()
56 { QT1010_WR, 0x07, 0xff }, /* 04 c write */ in qt1010_set_params()
57 { QT1010_WR, 0x08, 0x08 }, in qt1010_set_params()
58 { QT1010_WR, 0x09, 0xff }, /* 06 c write */ in qt1010_set_params()
59 { QT1010_WR, 0x0a, 0xff }, /* 07 c write */ in qt1010_set_params()
60 { QT1010_WR, 0x0b, 0xff }, /* 08 c write */ in qt1010_set_params()
61 { QT1010_WR, 0x0c, 0xe1 }, in qt1010_set_params()
62 { QT1010_WR, 0x1a, 0xff }, /* 10 c write */ in qt1010_set_params()
63 { QT1010_WR, 0x1b, 0x00 }, in qt1010_set_params()
64 { QT1010_WR, 0x1c, 0x89 }, in qt1010_set_params()
65 { QT1010_WR, 0x11, 0xff }, /* 13 c write */ in qt1010_set_params()
66 { QT1010_WR, 0x12, 0xff }, /* 14 c write */ in qt1010_set_params()
67 { QT1010_WR, 0x22, 0xff }, /* 15 c write */ in qt1010_set_params()
68 { QT1010_WR, 0x1e, 0x00 }, in qt1010_set_params()
69 { QT1010_WR, 0x1e, 0xd0 }, in qt1010_set_params()
70 { QT1010_RD, 0x22, 0xff }, /* 16 c read */ in qt1010_set_params()
71 { QT1010_WR, 0x1e, 0x00 }, in qt1010_set_params()
72 { QT1010_RD, 0x05, 0xff }, /* 20 c read */ in qt1010_set_params()
73 { QT1010_RD, 0x22, 0xff }, /* 21 c read */ in qt1010_set_params()
74 { QT1010_WR, 0x23, 0xd0 }, in qt1010_set_params()
75 { QT1010_WR, 0x1e, 0x00 }, in qt1010_set_params()
76 { QT1010_WR, 0x1e, 0xe0 }, in qt1010_set_params()
77 { QT1010_RD, 0x23, 0xff }, /* 25 c read */ in qt1010_set_params()
78 { QT1010_RD, 0x23, 0xff }, /* 26 c read */ in qt1010_set_params()
79 { QT1010_WR, 0x1e, 0x00 }, in qt1010_set_params()
80 { QT1010_WR, 0x24, 0xd0 }, in qt1010_set_params()
81 { QT1010_WR, 0x1e, 0x00 }, in qt1010_set_params()
82 { QT1010_WR, 0x1e, 0xf0 }, in qt1010_set_params()
83 { QT1010_RD, 0x24, 0xff }, /* 31 c read */ in qt1010_set_params()
84 { QT1010_WR, 0x1e, 0x00 }, in qt1010_set_params()
85 { QT1010_WR, 0x14, 0x7f }, in qt1010_set_params()
86 { QT1010_WR, 0x15, 0x7f }, in qt1010_set_params()
87 { QT1010_WR, 0x05, 0xff }, /* 35 c write */ in qt1010_set_params()
88 { QT1010_WR, 0x06, 0x00 }, in qt1010_set_params()
89 { QT1010_WR, 0x15, 0x1f }, in qt1010_set_params()
90 { QT1010_WR, 0x16, 0xff }, in qt1010_set_params()
91 { QT1010_WR, 0x18, 0xff }, in qt1010_set_params()
92 { QT1010_WR, 0x1f, 0xff }, /* 40 c write */ in qt1010_set_params()
93 { QT1010_WR, 0x20, 0xff }, /* 41 c write */ in qt1010_set_params()
94 { QT1010_WR, 0x21, 0x53 }, in qt1010_set_params()
95 { QT1010_WR, 0x25, 0xff }, /* 43 c write */ in qt1010_set_params()
96 { QT1010_WR, 0x26, 0x15 }, in qt1010_set_params()
97 { QT1010_WR, 0x00, 0xff }, /* 45 c write */ in qt1010_set_params()
98 { QT1010_WR, 0x02, 0x00 }, in qt1010_set_params()
99 { QT1010_WR, 0x01, 0x00 } in qt1010_set_params()
117 if (freq < 290000000) reg05 = 0x14; /* 290 MHz */ in qt1010_set_params()
118 else if (freq < 610000000) reg05 = 0x34; /* 610 MHz */ in qt1010_set_params()
119 else if (freq < 802000000) reg05 = 0x54; /* 802 MHz */ in qt1010_set_params()
120 else reg05 = 0x74; in qt1010_set_params()
122 /* 0x5 */ in qt1010_set_params()
129 if (mod1 < 8000000) rd[6].val = 0x1d; in qt1010_set_params()
130 else rd[6].val = 0x1c; in qt1010_set_params()
132 /* 0a - set frequency: 4 MHz scale (max 28 MHz) */ in qt1010_set_params()
133 if (mod1 < 1*FREQ2) rd[7].val = 0x09; /* +0 MHz */ in qt1010_set_params()
134 else if (mod1 < 2*FREQ2) rd[7].val = 0x08; /* +4 MHz */ in qt1010_set_params()
135 else if (mod1 < 3*FREQ2) rd[7].val = 0x0f; /* +8 MHz */ in qt1010_set_params()
136 else if (mod1 < 4*FREQ2) rd[7].val = 0x0e; /* +12 MHz */ in qt1010_set_params()
137 else if (mod1 < 5*FREQ2) rd[7].val = 0x0d; /* +16 MHz */ in qt1010_set_params()
138 else if (mod1 < 6*FREQ2) rd[7].val = 0x0c; /* +20 MHz */ in qt1010_set_params()
139 else if (mod1 < 7*FREQ2) rd[7].val = 0x0b; /* +24 MHz */ in qt1010_set_params()
140 else rd[7].val = 0x0a; /* +28 MHz */ in qt1010_set_params()
142 /* 0b - changes every 2/2 MHz */ in qt1010_set_params()
143 if (mod2 < 2000000) rd[8].val = 0x45; in qt1010_set_params()
144 else rd[8].val = 0x44; in qt1010_set_params()
147 tmpval = 0x78; /* byte, overflows intentionally */ in qt1010_set_params()
148 rd[10].val = tmpval-((mod2/QT1010_STEP)*0x08); in qt1010_set_params()
151 rd[13].val = 0xfd; /* TODO: correct value calculation */ in qt1010_set_params()
154 rd[14].val = 0x91; /* TODO: correct value calculation */ in qt1010_set_params()
157 if (freq < 450000000) rd[15].val = 0xd0; /* 450 MHz */ in qt1010_set_params()
158 else if (freq < 482000000) rd[15].val = 0xd1; /* 482 MHz */ in qt1010_set_params()
159 else if (freq < 514000000) rd[15].val = 0xd4; /* 514 MHz */ in qt1010_set_params()
160 else if (freq < 546000000) rd[15].val = 0xd7; /* 546 MHz */ in qt1010_set_params()
161 else if (freq < 610000000) rd[15].val = 0xda; /* 610 MHz */ in qt1010_set_params()
162 else rd[15].val = 0xd0; in qt1010_set_params()
165 rd[35].val = (reg05 & 0xf0); in qt1010_set_params()
168 if (mod1 < 8000000) tmpval = 0x00; in qt1010_set_params()
169 else if (mod1 < 12000000) tmpval = 0x01; in qt1010_set_params()
170 else if (mod1 < 16000000) tmpval = 0x02; in qt1010_set_params()
171 else if (mod1 < 24000000) tmpval = 0x03; in qt1010_set_params()
172 else if (mod1 < 28000000) tmpval = 0x04; in qt1010_set_params()
173 else tmpval = 0x05; in qt1010_set_params()
174 rd[40].val = (priv->reg1f_init_val + 0x0e + tmpval); in qt1010_set_params()
177 if (mod1 < 8000000) tmpval = 0x00; in qt1010_set_params()
178 else if (mod1 < 12000000) tmpval = 0x01; in qt1010_set_params()
179 else if (mod1 < 20000000) tmpval = 0x02; in qt1010_set_params()
180 else if (mod1 < 24000000) tmpval = 0x03; in qt1010_set_params()
181 else if (mod1 < 28000000) tmpval = 0x04; in qt1010_set_params()
182 else tmpval = 0x05; in qt1010_set_params()
183 rd[41].val = (priv->reg20_init_val + 0x0d + tmpval); in qt1010_set_params()
189 rd[45].val = 0x92; /* TODO: correct value calculation */ in qt1010_set_params()
192 "%s: freq:%u 05:%02x 07:%02x 09:%02x 0a:%02x 0b:%02x " \ in qt1010_set_params()
200 for (i = 0; i < ARRAY_SIZE(rd); i++) { in qt1010_set_params()
210 fe->ops.i2c_gate_ctrl(fe, 0); /* close i2c_gate */ in qt1010_set_params()
212 return 0; in qt1010_set_params()
223 { QT1010_WR, 0x1e, 0x00 }, in qt1010_init_meas1()
224 { QT1010_WR, 0x1e, oper }, in qt1010_init_meas1()
227 for (i = 0; i < ARRAY_SIZE(i2c_data); i++) { in qt1010_init_meas1()
248 return qt1010_writereg(priv, 0x1e, 0x00); in qt1010_init_meas1()
254 u8 i, val = 0xff; in qt1010_init_meas2()
257 { QT1010_WR, 0x07, reg_init_val }, in qt1010_init_meas2()
258 { QT1010_WR, 0x22, 0xd0 }, in qt1010_init_meas2()
259 { QT1010_WR, 0x1e, 0x00 }, in qt1010_init_meas2()
260 { QT1010_WR, 0x1e, 0xd0 }, in qt1010_init_meas2()
261 { QT1010_RD, 0x22, 0xff }, in qt1010_init_meas2()
262 { QT1010_WR, 0x1e, 0x00 }, in qt1010_init_meas2()
263 { QT1010_WR, 0x22, 0xff } in qt1010_init_meas2()
266 for (i = 0; i < ARRAY_SIZE(i2c_data); i++) { in qt1010_init_meas2()
277 return 0; in qt1010_init_meas2()
284 int err = 0; in qt1010_init()
288 { QT1010_WR, 0x01, 0x80 }, in qt1010_init()
289 { QT1010_WR, 0x0d, 0x84 }, in qt1010_init()
290 { QT1010_WR, 0x0e, 0xb7 }, in qt1010_init()
291 { QT1010_WR, 0x2a, 0x23 }, in qt1010_init()
292 { QT1010_WR, 0x2c, 0xdc }, in qt1010_init()
293 { QT1010_M1, 0x25, 0x40 }, /* get reg 25 init value */ in qt1010_init()
294 { QT1010_M1, 0x81, 0xff }, /* get reg 25 init value */ in qt1010_init()
295 { QT1010_WR, 0x2b, 0x70 }, in qt1010_init()
296 { QT1010_WR, 0x2a, 0x23 }, in qt1010_init()
297 { QT1010_M1, 0x26, 0x08 }, in qt1010_init()
298 { QT1010_M1, 0x82, 0xff }, in qt1010_init()
299 { QT1010_WR, 0x05, 0x14 }, in qt1010_init()
300 { QT1010_WR, 0x06, 0x44 }, in qt1010_init()
301 { QT1010_WR, 0x07, 0x28 }, in qt1010_init()
302 { QT1010_WR, 0x08, 0x0b }, in qt1010_init()
303 { QT1010_WR, 0x11, 0xfd }, in qt1010_init()
304 { QT1010_M1, 0x22, 0x0d }, in qt1010_init()
305 { QT1010_M1, 0xd0, 0xff }, in qt1010_init()
306 { QT1010_WR, 0x06, 0x40 }, in qt1010_init()
307 { QT1010_WR, 0x16, 0xf0 }, in qt1010_init()
308 { QT1010_WR, 0x02, 0x38 }, in qt1010_init()
309 { QT1010_WR, 0x03, 0x18 }, in qt1010_init()
310 { QT1010_WR, 0x20, 0xe0 }, in qt1010_init()
311 { QT1010_M1, 0x1f, 0x20 }, /* get reg 1f init value */ in qt1010_init()
312 { QT1010_M1, 0x84, 0xff }, /* get reg 1f init value */ in qt1010_init()
313 { QT1010_RD, 0x20, 0x20 }, /* get reg 20 init value */ in qt1010_init()
314 { QT1010_WR, 0x03, 0x19 }, in qt1010_init()
315 { QT1010_WR, 0x02, 0x3f }, in qt1010_init()
316 { QT1010_WR, 0x21, 0x53 }, in qt1010_init()
317 { QT1010_RD, 0x21, 0xff }, in qt1010_init()
318 { QT1010_WR, 0x11, 0xfd }, in qt1010_init()
319 { QT1010_WR, 0x05, 0x34 }, in qt1010_init()
320 { QT1010_WR, 0x06, 0x44 }, in qt1010_init()
321 { QT1010_WR, 0x08, 0x08 } in qt1010_init()
327 for (i = 0; i < ARRAY_SIZE(i2c_data); i++) { in qt1010_init()
334 if (i2c_data[i].val == 0x20) in qt1010_init()
341 if (i2c_data[i].val == 0x25) in qt1010_init()
343 else if (i2c_data[i].val == 0x1f) in qt1010_init()
361 for (i = 0x31; i < 0x3a; i++) /* 0x31 - 0x39 */ in qt1010_init()
381 return 0; in qt1010_get_frequency()
387 return 0; in qt1010_get_if_frequency()
426 if (qt1010_readreg(priv, 0x29, &id) != 0 || (id != 0x39)) { in qt1010_attach()
432 fe->ops.i2c_gate_ctrl(fe, 0); /* close i2c_gate */ in qt1010_attach()