[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200810142928.12552-1-kai.heng.feng@canonical.com>
Date: Mon, 10 Aug 2020 22:29:26 +0800
From: Kai-Heng Feng <kai.heng.feng@...onical.com>
To: jikos@...nel.org, benjamin.tissoires@...hat.com
Cc: Kai-Heng Feng <kai.heng.feng@...onical.com>,
Hans de Goede <hdegoede@...hat.com>,
Pavel Balan <admin@...ma.net>,
Daniel Playfair Cal <daniel.playfair.cal@...il.com>,
HungNien Chen <hn.chen@...dahitech.com>,
You-Sheng Yang <vicamo.yang@...onical.com>,
Aaron Ma <aaron.ma@...onical.com>,
linux-input@...r.kernel.org (open list:HID CORE LAYER),
linux-kernel@...r.kernel.org (open list)
Subject: [PATCH] HID: i2c-hid: Add 60ms delay after SET_POWER ON
Goodix touchpad fails to operate in I2C mode after system suspend.
According to the vendor, Windows is more forgiving and there's a 60ms
delay after SET_POWER ON command.
So let's do the same here, to workaround for the touchpads that depend
on the delay.
Signed-off-by: Kai-Heng Feng <kai.heng.feng@...onical.com>
---
drivers/hid/i2c-hid/i2c-hid-core.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/hid/i2c-hid/i2c-hid-core.c b/drivers/hid/i2c-hid/i2c-hid-core.c
index 294c84e136d7..7b24a27fad95 100644
--- a/drivers/hid/i2c-hid/i2c-hid-core.c
+++ b/drivers/hid/i2c-hid/i2c-hid-core.c
@@ -419,6 +419,9 @@ static int i2c_hid_set_power(struct i2c_client *client, int power_state)
if (ret)
dev_err(&client->dev, "failed to change power setting.\n");
+ if (!ret && power_state == I2C_HID_PWR_ON)
+ msleep(60);
+
set_pwr_exit:
return ret;
}
--
2.17.1
Powered by blists - more mailing lists