driver/sar-sensor: sx937x bring up

PH3 is used as IRQ,so we should not operate bit3
  or it will geneate too much irq.

Change-Id: I74b13cda139cc7ba8eeb87fe0bfab5d5f05debc3
Signed-off-by: weimh1 <weimh1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1791973
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
weimh1 2020-11-03 15:16:47 +08:00 • committed by Minghui Wei
commit 5fa133d16c

View file

@ -1068,7 +1068,7 @@ static int capsensor_set_enable(struct sensors_classdev *sensors_cdev,
if (enable == 1) {
LOG_INFO("enable cap sensor : %s\n", sensors_cdev->name);
sx937x_i2c_read_16bit(global_sx937x, SX937X_GENERAL_SETUP, &temp);
temp = temp | 0x000000FF;
temp = temp | 0x000000F7;
LOG_DBG("set reg 0x%x val 0x%x\n", SX937X_GENERAL_SETUP, temp);
sx937x_i2c_write_16bit(global_sx937x, SX937X_GENERAL_SETUP, temp);
psmtcButtons[i].enabled = true;
@ -1098,7 +1098,7 @@ static int capsensor_set_enable(struct sensors_classdev *sensors_cdev,
LOG_INFO("disable all chs\n");
sx937x_i2c_read_16bit(global_sx937x, SX937X_GENERAL_SETUP, &temp);
LOG_DBG("read reg 0x%x val 0x%x\n", SX937X_GENERAL_SETUP, temp);
temp = temp & 0xFFFFFF00;
temp = temp & 0xFFFFFF08;
LOG_DBG("set reg 0x%x val 0x%x\n", SX937X_GENERAL_SETUP, temp);
sx937x_i2c_write_16bit(global_sx937x, SX937X_GENERAL_SETUP, temp);
}