Lines Matching refs:ret

36 	int ret;
47 ret = i2c_transfer(state->i2c, msg, 1);
48 if (ret == 1) {
49 ret = 0;
52 KBUILD_MODNAME, ret, reg);
53 ret = -EREMOTEIO;
56 return ret;
62 int ret;
77 ret = i2c_transfer(state->i2c, msg, 2);
78 if (ret == 2) {
79 ret = 0;
82 KBUILD_MODNAME, ret, reg);
83 ret = -EREMOTEIO;
86 return ret;
93 int ret;
103 ret = ec100_write_reg(state, 0x04, 0x06);
104 if (ret)
106 ret = ec100_write_reg(state, 0x67, 0x58);
107 if (ret)
109 ret = ec100_write_reg(state, 0x05, 0x18);
110 if (ret)
136 ret = ec100_write_reg(state, 0x1b, tmp);
137 if (ret)
139 ret = ec100_write_reg(state, 0x1c, tmp2);
140 if (ret)
143 ret = ec100_write_reg(state, 0x0c, 0xbb); /* if freq */
144 if (ret)
146 ret = ec100_write_reg(state, 0x0d, 0x31); /* if freq */
147 if (ret)
150 ret = ec100_write_reg(state, 0x08, 0x24);
151 if (ret)
154 ret = ec100_write_reg(state, 0x00, 0x00); /* go */
155 if (ret)
157 ret = ec100_write_reg(state, 0x00, 0x20); /* go */
158 if (ret)
161 return ret;
163 dev_dbg(&state->i2c->dev, "%s: failed=%d\n", __func__, ret);
164 return ret;
180 int ret;
184 ret = ec100_read_reg(state, 0x42, &tmp);
185 if (ret)
193 ret = ec100_read_reg(state, 0x01, &tmp);
194 if (ret)
207 return ret;
209 dev_dbg(&state->i2c->dev, "%s: failed=%d\n", __func__, ret);
210 return ret;
216 int ret;
222 ret = ec100_read_reg(state, 0x65, &tmp);
223 if (ret)
225 ret = ec100_read_reg(state, 0x66, &tmp2);
226 if (ret)
239 return ret;
241 dev_dbg(&state->i2c->dev, "%s: failed=%d\n", __func__, ret);
242 return ret;
248 int ret;
251 ret = ec100_read_reg(state, 0x24, &tmp);
252 if (ret) {
259 return ret;
261 dev_dbg(&state->i2c->dev, "%s: failed=%d\n", __func__, ret);
262 return ret;
288 int ret;
302 ret = ec100_read_reg(state, 0x33, &tmp);
303 if (ret || tmp != 0x0b)