Lines Matching refs:ret
30 int ret; in hd29l2_wr_regs() local
47 ret = i2c_transfer(priv->i2c, msg, 1); in hd29l2_wr_regs()
48 if (ret == 1) { in hd29l2_wr_regs()
49 ret = 0; in hd29l2_wr_regs()
53 KBUILD_MODNAME, ret, reg, len); in hd29l2_wr_regs()
54 ret = -EREMOTEIO; in hd29l2_wr_regs()
57 return ret; in hd29l2_wr_regs()
63 int ret; in hd29l2_rd_regs() local
79 ret = i2c_transfer(priv->i2c, msg, 2); in hd29l2_rd_regs()
80 if (ret == 2) { in hd29l2_rd_regs()
81 ret = 0; in hd29l2_rd_regs()
85 KBUILD_MODNAME, ret, reg, len); in hd29l2_rd_regs()
86 ret = -EREMOTEIO; in hd29l2_rd_regs()
89 return ret; in hd29l2_rd_regs()
107 int ret; in hd29l2_wr_reg_mask() local
112 ret = hd29l2_rd_regs(priv, reg, &tmp, 1); in hd29l2_wr_reg_mask()
113 if (ret) in hd29l2_wr_reg_mask()
114 return ret; in hd29l2_wr_reg_mask()
127 int ret, i; in hd29l2_rd_reg_mask() local
130 ret = hd29l2_rd_regs(priv, reg, &tmp, 1); in hd29l2_rd_reg_mask()
131 if (ret) in hd29l2_rd_reg_mask()
132 return ret; in hd29l2_rd_reg_mask()
148 int ret; in hd29l2_soft_reset() local
151 ret = hd29l2_rd_reg(priv, 0x26, &tmp); in hd29l2_soft_reset()
152 if (ret) in hd29l2_soft_reset()
155 ret = hd29l2_wr_reg(priv, 0x26, 0x0d); in hd29l2_soft_reset()
156 if (ret) in hd29l2_soft_reset()
161 ret = hd29l2_wr_reg(priv, 0x26, tmp); in hd29l2_soft_reset()
162 if (ret) in hd29l2_soft_reset()
167 dev_dbg(&priv->i2c->dev, "%s: failed=%d\n", __func__, ret); in hd29l2_soft_reset()
168 return ret; in hd29l2_soft_reset()
173 int ret, i; in hd29l2_i2c_gate_ctrl() local
182 ret = hd29l2_wr_reg(priv, 0x9d, priv->cfg.tuner_i2c_addr << 1); in hd29l2_i2c_gate_ctrl()
183 if (ret) in hd29l2_i2c_gate_ctrl()
190 ret = hd29l2_wr_reg(priv, 0x9f, enable); in hd29l2_i2c_gate_ctrl()
191 if (ret) in hd29l2_i2c_gate_ctrl()
196 ret = hd29l2_rd_reg(priv, 0x9e, &tmp); in hd29l2_i2c_gate_ctrl()
197 if (ret) in hd29l2_i2c_gate_ctrl()
208 return ret; in hd29l2_i2c_gate_ctrl()
210 dev_dbg(&priv->i2c->dev, "%s: failed=%d\n", __func__, ret); in hd29l2_i2c_gate_ctrl()
211 return ret; in hd29l2_i2c_gate_ctrl()
216 int ret; in hd29l2_read_status() local
222 ret = hd29l2_rd_reg(priv, 0x05, &buf[0]); in hd29l2_read_status()
223 if (ret) in hd29l2_read_status()
231 ret = hd29l2_rd_reg(priv, 0x0d, &buf[1]); in hd29l2_read_status()
232 if (ret) in hd29l2_read_status()
245 dev_dbg(&priv->i2c->dev, "%s: failed=%d\n", __func__, ret); in hd29l2_read_status()
246 return ret; in hd29l2_read_status()
251 int ret; in hd29l2_read_snr() local
258 ret = 0; in hd29l2_read_snr()
262 ret = hd29l2_rd_regs(priv, 0x0b, buf, 2); in hd29l2_read_snr()
263 if (ret) in hd29l2_read_snr()
277 dev_dbg(&priv->i2c->dev, "%s: failed=%d\n", __func__, ret); in hd29l2_read_snr()
278 return ret; in hd29l2_read_snr()
283 int ret; in hd29l2_read_signal_strength() local
290 ret = hd29l2_rd_regs(priv, 0xd5, buf, 2); in hd29l2_read_signal_strength()
291 if (ret) in hd29l2_read_signal_strength()
302 dev_dbg(&priv->i2c->dev, "%s: failed=%d\n", __func__, ret); in hd29l2_read_signal_strength()
303 return ret; in hd29l2_read_signal_strength()
308 int ret; in hd29l2_read_ber() local
314 ret = 0; in hd29l2_read_ber()
318 ret = hd29l2_rd_regs(priv, 0xd9, buf, 2); in hd29l2_read_ber()
319 if (ret) { in hd29l2_read_ber()
329 dev_dbg(&priv->i2c->dev, "%s: failed=%d\n", __func__, ret); in hd29l2_read_ber()
330 return ret; in hd29l2_read_ber()
342 int ret, i; in hd29l2_search() local
393 ret = hd29l2_wr_regs(priv, 0x14, buf, 3); in hd29l2_search()
394 if (ret) in hd29l2_search()
398 ret = hd29l2_wr_reg(priv, 0xab, tmp); in hd29l2_search()
399 if (ret) in hd29l2_search()
411 ret = hd29l2_wr_reg_mask(priv, 0xac, 0 << 7, 0x80); in hd29l2_search()
412 if (ret) in hd29l2_search()
415 ret = hd29l2_wr_reg_mask(priv, 0x82, 1 << 1, 0x02); in hd29l2_search()
416 if (ret) in hd29l2_search()
420 ret = hd29l2_wr_reg_mask(priv, 0x7d, 1 << 6, 0x40); in hd29l2_search()
421 if (ret) in hd29l2_search()
424 ret = hd29l2_wr_reg_mask(priv, 0x81, 1 << 3, 0x08); in hd29l2_search()
425 if (ret) in hd29l2_search()
429 ret = hd29l2_soft_reset(priv); in hd29l2_search()
430 if (ret) in hd29l2_search()
437 ret = hd29l2_rd_reg(priv, 0x0d, &tmp); in hd29l2_search()
438 if (ret) in hd29l2_search()
453 ret = hd29l2_rd_reg_mask(priv, 0x7d, &modulation, 0x07); in hd29l2_search()
454 if (ret) in hd29l2_search()
468 ret = hd29l2_wr_reg_mask(priv, 0x7d, tmp, 0x5f); in hd29l2_search()
469 if (ret) in hd29l2_search()
473 ret = hd29l2_wr_reg_mask(priv, 0x81, tmp, 0x0f); in hd29l2_search()
474 if (ret) in hd29l2_search()
478 ret = hd29l2_wr_reg_mask(priv, 0x82, tmp, 0x03); in hd29l2_search()
479 if (ret) in hd29l2_search()
493 ret = hd29l2_wr_reg(priv, reg_mod_vals_tab[i].reg, in hd29l2_search()
495 if (ret) in hd29l2_search()
500 ret = hd29l2_rd_reg_mask(priv, 0x81, &guard_interval, 0x03); in hd29l2_search()
501 if (ret) in hd29l2_search()
505 ret = hd29l2_rd_reg_mask(priv, 0x81, &carrier, 0x04); in hd29l2_search()
506 if (ret) in hd29l2_search()
518 ret = hd29l2_wr_reg(priv, 0x42, 0x33); in hd29l2_search()
519 if (ret) in hd29l2_search()
522 ret = hd29l2_wr_reg(priv, 0xdd, 0x01); in hd29l2_search()
523 if (ret) in hd29l2_search()
530 ret = hd29l2_soft_reset(priv); in hd29l2_search()
531 if (ret) in hd29l2_search()
539 ret = hd29l2_rd_reg_mask(priv, 0x05, &tmp, 0x01); in hd29l2_search()
540 if (ret) in hd29l2_search()
554 dev_dbg(&priv->i2c->dev, "%s: failed=%d\n", __func__, ret); in hd29l2_search()
565 int ret; in hd29l2_get_frontend() local
574 ret = hd29l2_rd_reg(priv, 0x7d, &buf[0]); in hd29l2_get_frontend()
575 if (ret) in hd29l2_get_frontend()
578 ret = hd29l2_rd_regs(priv, 0x81, &buf[1], 2); in hd29l2_get_frontend()
579 if (ret) in hd29l2_get_frontend()
710 ret = hd29l2_rd_regs(priv, 0xb1, &buf[0], 3); in hd29l2_get_frontend()
711 if (ret) in hd29l2_get_frontend()
723 dev_dbg(&priv->i2c->dev, "%s: failed=%d\n", __func__, ret); in hd29l2_get_frontend()
724 return ret; in hd29l2_get_frontend()
729 int ret, i; in hd29l2_init() local
747 ret = fe->callback(fe, DVB_FRONTEND_COMPONENT_DEMOD, 0, 0); in hd29l2_init()
748 if (ret) in hd29l2_init()
757 ret = hd29l2_wr_reg(priv, tab[i].reg, tab[i].val); in hd29l2_init()
758 if (ret) in hd29l2_init()
763 ret = hd29l2_rd_reg(priv, 0x36, &tmp); in hd29l2_init()
764 if (ret) in hd29l2_init()
769 ret = hd29l2_wr_reg(priv, 0x36, tmp); in hd29l2_init()
770 if (ret) in hd29l2_init()
773 ret = hd29l2_rd_reg(priv, 0x31, &tmp); in hd29l2_init()
780 ret = hd29l2_wr_reg(priv, 0x31, tmp); in hd29l2_init()
781 if (ret) in hd29l2_init()
784 return ret; in hd29l2_init()
786 dev_dbg(&priv->i2c->dev, "%s: failed=%d\n", __func__, ret); in hd29l2_init()
787 return ret; in hd29l2_init()
801 int ret; in hd29l2_attach() local
816 ret = hd29l2_rd_reg(priv, 0x00, &tmp); in hd29l2_attach()
817 if (ret) in hd29l2_attach()