Lines Matching +full:cmd +full:- +full:cnt +full:- +full:name
1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * MPRLS0025PA - Honeywell MicroPressure pressure sensor series driver
5 * Copyright (c) Andreas Klinger <ak@it-klinger.de>
8 …-edam.honeywell.com/content/dam/honeywell-edam/sps/siot/en-us/products/sensors/pressure-sensors/bo…
25 static int mpr_i2c_read(struct mpr_data *data, const u8 unused, const u8 cnt) in mpr_i2c_read() argument
28 struct i2c_client *client = to_i2c_client(data->dev); in mpr_i2c_read()
30 if (cnt > MPR_MEASUREMENT_RD_SIZE) in mpr_i2c_read()
31 return -EOVERFLOW; in mpr_i2c_read()
33 memset(data->buffer, 0, MPR_MEASUREMENT_RD_SIZE); in mpr_i2c_read()
34 ret = i2c_master_recv(client, data->buffer, cnt); in mpr_i2c_read()
37 else if (ret != cnt) in mpr_i2c_read()
38 return -EIO; in mpr_i2c_read()
43 static int mpr_i2c_write(struct mpr_data *data, const u8 cmd, const u8 unused) in mpr_i2c_write() argument
46 struct i2c_client *client = to_i2c_client(data->dev); in mpr_i2c_write()
50 wdata[0] = cmd; in mpr_i2c_write()
56 return -EIO; in mpr_i2c_write()
69 if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_READ_BYTE)) in mpr_i2c_probe()
70 return -EOPNOTSUPP; in mpr_i2c_probe()
72 return mpr_common_probe(&client->dev, &mpr_i2c_ops, client->irq); in mpr_i2c_probe()
91 .name = "mprls0025pa",
97 MODULE_AUTHOR("Andreas Klinger <ak@it-klinger.de>");