Lines Matching refs:rd
51 qt1010_i2c_oper_t rd[48] = { in qt1010_set_params() local
123 rd[2].val = reg05; in qt1010_set_params()
126 rd[4].val = (freq + QT1010_OFFSET) / FREQ1; 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()
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()
143 if (mod2 < 2000000) rd[8].val = 0x45; in qt1010_set_params()
144 else rd[8].val = 0x44; 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()
174 rd[40].val = (priv->reg1f_init_val + 0x0e + tmpval); in qt1010_set_params()
183 rd[41].val = (priv->reg20_init_val + 0x0d + tmpval); in qt1010_set_params()
186 rd[43].val = priv->reg25_init_val; in qt1010_set_params()
189 rd[45].val = 0x92; /* TODO: correct value calculation */ in qt1010_set_params()
195 freq, rd[2].val, rd[4].val, rd[6].val, rd[7].val, \ in qt1010_set_params()
196 rd[8].val, rd[10].val, rd[13].val, rd[14].val, \ in qt1010_set_params()
197 rd[15].val, rd[35].val, rd[40].val, rd[41].val, \ in qt1010_set_params()
198 rd[43].val, rd[45].val); in qt1010_set_params()
200 for (i = 0; i < ARRAY_SIZE(rd); i++) { in qt1010_set_params()
201 if (rd[i].oper == QT1010_WR) { in qt1010_set_params()
202 err = qt1010_writereg(priv, rd[i].reg, rd[i].val); in qt1010_set_params()
204 err = qt1010_readreg(priv, rd[i].reg, &tmpval); in qt1010_set_params()