Lines Matching refs:rc
35 #define rc(args...) do { \ macro
213 int rc; in s921_i2c_writereg() local
215 rc = i2c_transfer(state->i2c, &msg, 1); in s921_i2c_writereg()
216 if (rc != 1) { in s921_i2c_writereg()
218 " data == 0x%02x)\n", __func__, rc, reg, data); in s921_i2c_writereg()
219 return rc; in s921_i2c_writereg()
228 int i, rc; in s921_i2c_writeregdata() local
231 rc = s921_i2c_writereg(state, i2c_addr, rd[i].reg, rd[i].data); in s921_i2c_writeregdata()
232 if (rc < 0) in s921_i2c_writeregdata()
233 return rc; in s921_i2c_writeregdata()
241 int rc; in s921_i2c_readreg() local
247 rc = i2c_transfer(state->i2c, msg, 2); in s921_i2c_readreg()
249 if (rc != 2) { in s921_i2c_readreg()
250 rc("%s: reg=0x%x (rcor=%d)\n", __func__, reg, rc); in s921_i2c_readreg()
251 return rc; in s921_i2c_readreg()
269 int band, rc, i; in s921_pll_tune() local
282 rc("%s: frequency out of range\n", __func__); in s921_pll_tune()
292 rc = s921_writeregdata(state, s921_prefreq); in s921_pll_tune()
293 if (rc < 0) in s921_pll_tune()
294 return rc; in s921_pll_tune()
296 rc = s921_writereg(state, 0xf2, (f_offset >> 8) & 0xff); in s921_pll_tune()
297 if (rc < 0) in s921_pll_tune()
298 return rc; in s921_pll_tune()
300 rc = s921_writereg(state, 0xf3, f_offset & 0xff); in s921_pll_tune()
301 if (rc < 0) in s921_pll_tune()
302 return rc; in s921_pll_tune()
304 rc = s921_writereg(state, 0xf4, f_switch); in s921_pll_tune()
305 if (rc < 0) in s921_pll_tune()
306 return rc; in s921_pll_tune()
308 rc = s921_writeregdata(state, s921_postfreq); in s921_pll_tune()
309 if (rc < 0) in s921_pll_tune()
310 return rc; in s921_pll_tune()
313 rc = s921_readreg(state, 0x80); in s921_pll_tune()
314 dprintk("status 0x80: %02x\n", rc); in s921_pll_tune()
316 rc = s921_writereg(state, 0x01, 0x40); in s921_pll_tune()
317 if (rc < 0) in s921_pll_tune()
318 return rc; in s921_pll_tune()
320 rc = s921_readreg(state, 0x01); in s921_pll_tune()
321 dprintk("status 0x01: %02x\n", rc); in s921_pll_tune()
323 rc = s921_readreg(state, 0x80); in s921_pll_tune()
324 dprintk("status 0x80: %02x\n", rc); in s921_pll_tune()
326 rc = s921_readreg(state, 0x80); in s921_pll_tune()
327 dprintk("status 0x80: %02x\n", rc); in s921_pll_tune()
329 rc = s921_readreg(state, 0x32); in s921_pll_tune()
330 dprintk("status 0x32: %02x\n", rc); in s921_pll_tune()
340 int rc; in s921_initfe() local
344 rc = s921_writeregdata(state, s921_init); in s921_initfe()
345 if (rc < 0) in s921_initfe()
346 return rc; in s921_initfe()
354 int regstatus, rc; in s921_read_status() local
358 rc = s921_readreg(state, 0x81); in s921_read_status()
359 if (rc < 0) in s921_read_status()
360 return rc; in s921_read_status()
362 regstatus = rc << 8; in s921_read_status()
364 rc = s921_readreg(state, 0x82); in s921_read_status()
365 if (rc < 0) in s921_read_status()
366 return rc; in s921_read_status()
368 regstatus |= rc; in s921_read_status()
394 int rc; in s921_read_signal_strength() local
397 rc = s921_read_status(fe, &status); in s921_read_signal_strength()
398 if (rc < 0) in s921_read_signal_strength()
399 return rc; in s921_read_signal_strength()
405 rc = s921_readreg(state, 0x01); in s921_read_signal_strength()
406 dprintk("status 0x01: %02x\n", rc); in s921_read_signal_strength()
408 rc = s921_readreg(state, 0x80); in s921_read_signal_strength()
409 dprintk("status 0x80: %02x\n", rc); in s921_read_signal_strength()
411 rc = s921_readreg(state, 0x32); in s921_read_signal_strength()
412 dprintk("status 0x32: %02x\n", rc); in s921_read_signal_strength()
421 int rc; in s921_set_frontend() local
427 rc = s921_pll_tune(fe); in s921_set_frontend()
428 if (rc < 0) in s921_set_frontend()
429 return rc; in s921_set_frontend()
454 int rc = 0; in s921_tune() local
459 rc = s921_set_frontend(fe); in s921_tune()
464 return rc; in s921_tune()
491 rc("Unable to kzalloc\n"); in s921_attach()