Skip to content

Commit 2e00b8b

Browse files
jlabundydtor
authored andcommitted
Input: iqs7222 - configure power mode before triggering ATI
If the device drops into ultra-low-power mode before being placed into normal-power mode as part of ATI being triggered, the device does not assert any interrupts until the ATI routine is restarted two seconds later. Solve this problem by adopting the vendor's recommendation, which calls for the device to be placed into normal-power mode prior to being configured and ATI being triggered. The original implementation followed this sequence, but the order was inadvertently changed as part of the resolution of a separate erratum. Fixes: 1e4189d ("Input: iqs7222 - protect volatile registers") Signed-off-by: Jeff LaBundy <[email protected]> Link: https://lore.kernel.org/r/ZKrpHc2Ji9qR25r2@nixie71 Signed-off-by: Dmitry Torokhov <[email protected]>
1 parent 80c268c commit 2e00b8b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/input/misc/iqs7222.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1381,9 +1381,6 @@ static int iqs7222_ati_trigger(struct iqs7222_private *iqs7222)
13811381
if (error)
13821382
return error;
13831383

1384-
sys_setup &= ~IQS7222_SYS_SETUP_INTF_MODE_MASK;
1385-
sys_setup &= ~IQS7222_SYS_SETUP_PWR_MODE_MASK;
1386-
13871384
for (i = 0; i < IQS7222_NUM_RETRIES; i++) {
13881385
/*
13891386
* Trigger ATI from streaming and normal-power modes so that
@@ -1561,8 +1558,11 @@ static int iqs7222_dev_init(struct iqs7222_private *iqs7222, int dir)
15611558
return error;
15621559
}
15631560

1564-
if (dir == READ)
1561+
if (dir == READ) {
1562+
iqs7222->sys_setup[0] &= ~IQS7222_SYS_SETUP_INTF_MODE_MASK;
1563+
iqs7222->sys_setup[0] &= ~IQS7222_SYS_SETUP_PWR_MODE_MASK;
15651564
return 0;
1565+
}
15661566

15671567
return iqs7222_ati_trigger(iqs7222);
15681568
}

0 commit comments

Comments
 (0)