Lines Matching refs:ret_val

71 	int ret_val;  in als_lux0_input_data_show()  local
84 ret_val = als_wait_for_data_ready(dev); in als_lux0_input_data_show()
85 if (ret_val < 0) in als_lux0_input_data_show()
90 ret_val = temp; in als_lux0_input_data_show()
93 ret_val = i2c_smbus_read_byte_data(client, 0x8D); /* MSB data */ in als_lux0_input_data_show()
94 if (ret_val < 0) in als_lux0_input_data_show()
100 temp = (ret_val << 8) | temp; in als_lux0_input_data_show()
105 return ret_val; in als_lux0_input_data_show()
113 int ret_val; in als_sensing_range_store() local
116 ret_val = kstrtoul(buf, 10, &val); in als_sensing_range_store()
117 if (ret_val) in als_sensing_range_store()
118 return ret_val; in als_sensing_range_store()
133 ret_val = i2c_smbus_read_byte_data(client, 0x81); in als_sensing_range_store()
134 if (ret_val < 0) in als_sensing_range_store()
138 ret_val = ret_val & 0xFA; in als_sensing_range_store()
141 ret_val = (ret_val | 0x01); in als_sensing_range_store()
143 ret_val = (ret_val | 0x00); in als_sensing_range_store()
145 ret_val = i2c_smbus_write_byte_data(client, 0x81, ret_val); in als_sensing_range_store()
147 if (ret_val >= 0) { in als_sensing_range_store()
156 return ret_val; in als_sensing_range_store()
161 int ret_val; in als_set_power_state() local
165 ret_val = i2c_smbus_read_byte_data(client, 0x80); in als_set_power_state()
166 if (ret_val < 0) in als_set_power_state()
169 ret_val = ret_val | 0x01; in als_set_power_state()
171 ret_val = ret_val & 0xFE; in als_set_power_state()
172 ret_val = i2c_smbus_write_byte_data(client, 0x80, ret_val); in als_set_power_state()
175 return ret_val; in als_set_power_state()
195 int ret_val; in als_set_default_config() local
197 ret_val = i2c_smbus_write_byte_data(client, 0x80, 0x01); in als_set_default_config()
198 if (ret_val < 0) { in als_set_default_config()
200 return ret_val; in als_set_default_config()
203 ret_val = i2c_smbus_write_byte_data(client, 0x81, 0x08); in als_set_default_config()
204 if (ret_val < 0) in als_set_default_config()
212 return ret_val; in als_set_default_config()