Lines Matching refs:ret_val
42 int ret_val, val;
57 ret_val = i2c_smbus_read_byte_data(client, 0x01); /* LSB data */
60 if (ret_val < 0) {
62 return ret_val;
65 ret_val |= temp << 8;
70 lux = ((((1 << (2 * (val & 3))))*1000) * ret_val) / 65536;
78 int ret_val;
81 ret_val = kstrtoul(buf, 10, &val);
82 if (ret_val)
83 return ret_val;
98 ret_val = i2c_smbus_read_byte_data(client, 0x00);
99 if (ret_val < 0)
100 return ret_val;
102 ret_val &= 0xFC; /*reset the bit before setting them */
103 ret_val |= val - 1;
104 ret_val = i2c_smbus_write_byte_data(client, 0x00, ret_val);
106 if (ret_val < 0)
107 return ret_val;
113 int ret_val;
115 ret_val = i2c_smbus_read_byte_data(client, 0x00);
116 if (ret_val < 0)
120 ret_val |= 0x80;
122 ret_val &= 0x7F;
124 i2c_smbus_write_byte_data(client, 0x00, ret_val);