I have recently updated to 5.8.15-1 (from unstable), and the I2C touchpad does not function after resuming from suspend. Since the 5.8.15 changelog on LKML contains no relevant changes, I went looking for a cause in the Manjaro Gitlab, and I believe I found it. The
0304-i2c-hid.patch seems to be incorrect: in
i2c_hid_resume() it does the opposite of what it should: it modifies IRQs when polling is enabled (it shouldn’t), and it does not manage IRQs when polling is disabled (it should).
The following lines are to blame:
- enable_irq(client->irq); + if (polling_mode != I2C_POLLING_DISABLED) + enable_irq(client->irq);
This causes the IRQ not to be enabled if polling is disabled. The comparison should be
polling_mode == I2C_POLLING_DISABLED instead of what it is now.
Furthermore, in the
(ihid->irq_wake_enabled && polling_mode != I2C_POLLING_DISABLED)
i2c_hid_resume(), I am not sure that the
&& polling_mode != I2C_POLLING_DISABLED part is needed since it makes
i2c_hid_resume() “asymmetric” which may cause problems in some configurations.
@schinfo please take a look at it.
Paging @coiby as well.