Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 43dff42a authored by Oliver Wang's avatar Oliver Wang
Browse files

input: sensors: fix proximity raw data not correct issue



The proximity data needs to be calibrated according to the raw data.
Fix the proximity raw data not correct issue for better debugging.

Change-Id: Ieae0b547d6d086774ec35604350c53716199f792
Signed-off-by: default avatarOliver Wang <mengmeng@codeaurora.org>
parent 60d75479
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -1546,7 +1546,10 @@ static ssize_t apds993x_show_pdata(struct device *dev,
	int pdata;

	mutex_lock(&data->update_lock);
	pdata = i2c_smbus_read_word_data(client, CMD_WORD|APDS993X_PDATAL_REG);
	pdata = i2c_smbus_read_word_data(client,
			CMD_WORD|APDS993X_PDATAL_REG);
	pdata |= i2c_smbus_read_word_data(client,
			CMD_WORD|APDS993X_PDATAH_REG) << 8;
	mutex_unlock(&data->update_lock);

	return sprintf(buf, "%d\n", pdata);