Lines Matching refs:rc

56 	int rc;  in stk1160_i2c_write_reg()  local
59 rc = stk1160_write_reg(dev, STK1160_SICTL_SDA, addr); in stk1160_i2c_write_reg()
60 if (rc < 0) in stk1160_i2c_write_reg()
61 return rc; in stk1160_i2c_write_reg()
64 rc = stk1160_write_reg(dev, STK1160_SBUSW_WA, reg); in stk1160_i2c_write_reg()
65 if (rc < 0) in stk1160_i2c_write_reg()
66 return rc; in stk1160_i2c_write_reg()
69 rc = stk1160_write_reg(dev, STK1160_SBUSW_WD, value); in stk1160_i2c_write_reg()
70 if (rc < 0) in stk1160_i2c_write_reg()
71 return rc; in stk1160_i2c_write_reg()
74 rc = stk1160_write_reg(dev, STK1160_SICTL, 0x01); in stk1160_i2c_write_reg()
75 if (rc < 0) in stk1160_i2c_write_reg()
76 return rc; in stk1160_i2c_write_reg()
78 rc = stk1160_i2c_busy_wait(dev, 0x04); in stk1160_i2c_write_reg()
79 if (rc < 0) in stk1160_i2c_write_reg()
80 return rc; in stk1160_i2c_write_reg()
88 int rc; in stk1160_i2c_read_reg() local
91 rc = stk1160_write_reg(dev, STK1160_SICTL_SDA, addr); in stk1160_i2c_read_reg()
92 if (rc < 0) in stk1160_i2c_read_reg()
93 return rc; in stk1160_i2c_read_reg()
96 rc = stk1160_write_reg(dev, STK1160_SBUSR_RA, reg); in stk1160_i2c_read_reg()
97 if (rc < 0) in stk1160_i2c_read_reg()
98 return rc; in stk1160_i2c_read_reg()
101 rc = stk1160_write_reg(dev, STK1160_SICTL, 0x20); in stk1160_i2c_read_reg()
102 if (rc < 0) in stk1160_i2c_read_reg()
103 return rc; in stk1160_i2c_read_reg()
105 rc = stk1160_i2c_busy_wait(dev, 0x01); in stk1160_i2c_read_reg()
106 if (rc < 0) in stk1160_i2c_read_reg()
107 return rc; in stk1160_i2c_read_reg()
109 rc = stk1160_read_reg(dev, STK1160_SBUSR_RD, value); in stk1160_i2c_read_reg()
110 if (rc < 0) in stk1160_i2c_read_reg()
111 return rc; in stk1160_i2c_read_reg()
123 int rc; in stk1160_i2c_check_for_device() local
126 rc = stk1160_write_reg(dev, STK1160_SICTL_SDA, addr); in stk1160_i2c_check_for_device()
127 if (rc < 0) in stk1160_i2c_check_for_device()
128 return rc; in stk1160_i2c_check_for_device()
131 rc = stk1160_write_reg(dev, STK1160_SBUSR_RA, 0x00); in stk1160_i2c_check_for_device()
132 if (rc < 0) in stk1160_i2c_check_for_device()
133 return rc; in stk1160_i2c_check_for_device()
136 rc = stk1160_write_reg(dev, STK1160_SICTL, 0x20); in stk1160_i2c_check_for_device()
137 if (rc < 0) in stk1160_i2c_check_for_device()
138 return rc; in stk1160_i2c_check_for_device()
140 rc = stk1160_i2c_busy_wait(dev, 0x01); in stk1160_i2c_check_for_device()
141 if (rc < 0) in stk1160_i2c_check_for_device()
155 int addr, rc, i; in stk1160_i2c_xfer() local
163 rc = stk1160_i2c_check_for_device(dev, addr); in stk1160_i2c_xfer()
164 if (rc < 0) { in stk1160_i2c_xfer()
166 return rc; in stk1160_i2c_xfer()
172 rc = -EOPNOTSUPP; in stk1160_i2c_xfer()
181 rc = -EOPNOTSUPP; in stk1160_i2c_xfer()
187 rc = stk1160_i2c_read_reg(dev, addr, msgs[i].buf[0], in stk1160_i2c_xfer()
198 rc = -EOPNOTSUPP; in stk1160_i2c_xfer()
205 rc = stk1160_i2c_write_reg(dev, addr, msgs[i].buf[0], in stk1160_i2c_xfer()
209 if (rc < 0) in stk1160_i2c_xfer()
216 dprintk_i2c(" ERROR: %d\n", rc); in stk1160_i2c_xfer()
249 int rc; in stk1160_i2c_register() local
258 rc = i2c_add_adapter(&dev->i2c_adap); in stk1160_i2c_register()
259 if (rc < 0) { in stk1160_i2c_register()
260 stk1160_err("cannot add i2c adapter (%d)\n", rc); in stk1160_i2c_register()
261 return rc; in stk1160_i2c_register()