Lines Matching +full:two +full:-
1 // SPDX-License-Identifier: GPL-2.0
40 struct i2c_client *client = to_i2c_client(state->dev); in sps30_i2c_xfer()
45 * sending two i2c messages in a row we just send one by one. in sps30_i2c_xfer()
51 return -EIO; in sps30_i2c_xfer()
60 return -EIO; in sps30_i2c_xfer()
71 * PM1: upper two bytes, crc8, lower two bytes, crc8 in sps30_i2c_command()
72 * PM2P5: upper two bytes, crc8, lower two bytes, crc8 in sps30_i2c_command()
73 * PM4: upper two bytes, crc8, lower two bytes, crc8 in sps30_i2c_command()
74 * PM10: upper two bytes, crc8, lower two bytes, crc8 in sps30_i2c_command()
89 /* each two bytes are followed by a crc8 */ in sps30_i2c_command()
98 arg_size -= 2; in sps30_i2c_command()
112 dev_err(state->dev, "data integrity check failed\n"); in sps30_i2c_command()
113 return -EIO; in sps30_i2c_command()
143 * Power-on-reset causes sensor to produce some glitch on i2c bus and in sps30_i2c_reset()
169 return -EINTR; in sps30_i2c_read_meas()
172 return -ETIMEDOUT; in sps30_i2c_read_meas()
198 ret = sps30_i2c_command(state, SPS30_I2C_READ_SERIAL, NULL, 0, buf, sizeof(buf) - 1); in sps30_i2c_show_info()
202 dev_info(state->dev, "serial number: %s\n", buf); in sps30_i2c_show_info()
208 dev_info(state->dev, "fw version: %u.%u\n", buf[0], buf[1]); in sps30_i2c_show_info()
226 if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) in sps30_i2c_probe()
227 return -EOPNOTSUPP; in sps30_i2c_probe()
231 return sps30_probe(&client->dev, client->name, NULL, &sps30_i2c_ops); in sps30_i2c_probe()