sx937x:change offset val bit mask

offset reg use D13~D0 bit
change the mask to 0x3fff

Change-Id: Ibc5b021d27c2bf52df1b579be8134f38c65c036d
Signed-off-by: cuijy1 <cuijy2@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1956900
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Minghui Wei <weimh1@motorola.com>
Reviewed-by: Hong Zhang <zhangh12@motorola.com>
Reviewed-by: Tao Sun <suntao2@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
cuijy1 2021-05-21 18:20:45 +08:00 • committed by Jiyue Cui
commit 25ad59d3e7

View file

@ -301,7 +301,7 @@ static void read_dbg_raw(psx93XX_t this)
sx937x_i2c_read_16bit(this, SX937X_DIFF_PH0 + ph*4, &uData);
diff = (s32)uData>>10;
sx937x_i2c_read_16bit(this, SX937X_OFFSET_PH0 + ph*4*3, &uData);
off = (u16)(uData & 0x7FFF);
off = (u16)(uData & 0x3FFF);
state = psmtcButtons[ph].state;
dev_info(this->pdev,
@ -364,7 +364,7 @@ static void read_rawData(psx93XX_t this)
sx937x_i2c_read_16bit(this, SX937X_DIFF_PH0 + index, &uData);
diff = (s32)uData>>10;
sx937x_i2c_read_16bit(this, SX937X_OFFSET_PH0 + index*3, &uData);
offset = (u16)(uData & 0x7FFF);
offset = (u16)(uData & 0x3FFF);
state = psmtcButtons[csx].state;
@ -463,7 +463,7 @@ static ssize_t capsense_raw_data_show(struct class *class,
sx937x_i2c_read_16bit(this, SX937X_DIFF_PH0 + csx*4, &uData);
diff = (s32)uData>>10;
sx937x_i2c_read_16bit(this, SX937X_OFFSET_PH0 + csx*12, &uData);
offset = (u16)(uData & 0x7FFF);
offset = (u16)(uData & 0x3FFF);
p += snprintf(p, PAGE_SIZE, "PH= %d Useful = %d Average = %d DIFF = %d Offset = %d \n",
csx,useful,average,diff,offset);
}