Lines Matching defs:ret
56 int ret = i2c_smbus_write_byte(client, TSL2550_MODE_RANGE[mode]);
60 return ret;
66 int ret;
69 ret = i2c_smbus_write_byte(client, TSL2550_POWER_DOWN);
71 ret = i2c_smbus_write_byte(client, TSL2550_POWER_UP);
79 return ret;
84 int ret;
86 ret = i2c_smbus_read_byte_data(client, cmd);
87 if (ret < 0)
88 return ret;
89 if (!(ret & 0x80))
91 return ret & 0x7f; /* remove the "valid" bit */
189 int ret;
195 ret = tsl2550_set_power_state(client, val);
198 if (ret < 0)
199 return ret;
221 int ret;
230 ret = tsl2550_set_operating_mode(client, val);
233 if (ret < 0)
234 return ret;
246 int ret;
248 ret = tsl2550_get_adc_value(client, TSL2550_READ_ADC0);
249 if (ret < 0)
250 return ret;
251 ch0 = ret;
253 ret = tsl2550_get_adc_value(client, TSL2550_READ_ADC1);
254 if (ret < 0)
255 return ret;
256 ch1 = ret;
259 ret = tsl2550_calculate_lux(ch0, ch1);
260 if (ret < 0)
261 return ret;
263 ret *= 5;
265 return sprintf(buf, "%d\n", ret);
273 int ret;
280 ret = __tsl2550_show_lux(client, buf);
283 return ret;