[...]
+struct mpr_data {
+ struct device *dev;
+ void *client;
+ struct mutex lock;The tx buffer is `u8`, the rx buffer is `char`. This should be consistent.
+ s32 pmin;
+ s32 pmax;
+ struct gpio_desc *gpiod_reset;
+ int irq;
+ struct completion completion;
+ s64 channel[2] __aligned(8);
+};
+
[...]
+static int mpr_read_pressure(struct mpr_data *data, s64 *press)
+{
+ int ret, i;
+ u8 wdata[] = {0xAA, 0x00, 0x00};
+ s32 status;
+ int nloops = 10;
+ char buf[5];
+ s64 press_cnt;
+ s64 outputmin = 1677722;
+ s64 outputmax = 15099494;
+
+ reinit_completion(&data->completion);
+
+ ret = i2c_master_send(data->client, wdata, sizeof(wdata));