Skip to content

Commit 43b7029

Browse files
jwrdegoedeJiri Kosina
authored andcommitted
HID: i2c-hid: Send power-on command after reset
Before commit 67b18df ("HID: i2c-hid: Remove runtime power management"), any i2c-hid touchscreens would typically be runtime-suspended between the driver loading and Xorg or a Wayland compositor opening it, causing it to be resumed again. This means that before this change, we would call i2c_hid_set_power(OFF), i2c_hid_set_power(ON) before the graphical session would start listening to the touchscreen. It turns out that at least some SIS touchscreens, such as the one found on the Asus T100HA, need a power-on command after reset, otherwise they will not send any events. Fixes: 67b18df ("HID: i2c-hid: Remove runtime power management") Cc: Kai-Heng Feng <[email protected]> Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent 09f3dbe commit 43b7029

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/hid/i2c-hid/i2c-hid-core.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,8 +447,12 @@ static int i2c_hid_hwreset(struct i2c_client *client)
447447
if (ret) {
448448
dev_err(&client->dev, "failed to reset device.\n");
449449
i2c_hid_set_power(client, I2C_HID_PWR_SLEEP);
450+
goto out_unlock;
450451
}
451452

453+
/* At least some SIS devices need this after reset */
454+
ret = i2c_hid_set_power(client, I2C_HID_PWR_ON);
455+
452456
out_unlock:
453457
mutex_unlock(&ihid->reset_lock);
454458
return ret;

0 commit comments

Comments
 (0)