Lines Matching refs:rv
164 int rv, val; in smm665_read16() local
166 rv = i2c_smbus_read_byte_data(client, reg); in smm665_read16()
167 if (rv < 0) in smm665_read16()
168 return rv; in smm665_read16()
169 val = rv << 8; in smm665_read16()
170 rv = i2c_smbus_read_byte_data(client, reg + 1); in smm665_read16()
171 if (rv < 0) in smm665_read16()
172 return rv; in smm665_read16()
173 val |= rv; in smm665_read16()
183 int rv; in smm665_read_adc() local
199 rv = i2c_smbus_read_byte_data(client, adc << 3); in smm665_read_adc()
200 if (rv != -ENXIO) { in smm665_read_adc()
207 "Unexpected return code %d when setting ADC index", rv); in smm665_read_adc()
208 return (rv < 0) ? rv : -EIO; in smm665_read_adc()
222 rv = i2c_smbus_read_word_swapped(client, 0); in smm665_read_adc()
223 if (rv < 0) { in smm665_read_adc()
224 dev_dbg(&client->dev, "Failed to read ADC value: error %d", rv); in smm665_read_adc()
230 radc = (rv >> 11) & 0x0f; in smm665_read_adc()
237 return rv & SMM665_ADC_MASK; in smm665_read_adc()