On controllers with the LPSS "additional registers" (Skylake and later,
IG4_HAS_ADDREGS), ig4iic_suspend() places the controller in the device
idle state (IG4_DEVICE_IDLE) and asserts core reset. While idle the
DesignWare core is power-gated: its register bank reads back as zero and
writes are dropped until the core is taken out of the idle state again.
ig4iic_set_config(), called from ig4iic_resume(), only performs that
un-idle handshake when it observes IG4_RESTORE_REQUIRED set in
DEVIDLE_CTRL. Some platforms (e.g. Intel Alder Lake-P) do not raise
that status across suspend-to-idle (S0ix). The core is then left gated:
set_config()'s register writes have no effect, it nevertheless returns
success, and every subsequent transfer fails with IIC_ETIMEOUT, leaving
child I2C-HID devices (touchpad, touchscreen) dead after resume.
Perform the un-idle handshake unconditionally in ig4iic_resume() for
IG4_HAS_ADDREGS controllers, symmetric with ig4iic_suspend(), so the
core is reliably restored before reconfiguration regardless of the
RESTORE_REQUIRED status.
While integrating these I2C-HID touch devices, also raise hid(4)'s
MAXLOCCNT from 2048 to 4096: the report-descriptor parser truncates any
variable main item whose usage count exceeds MAXLOCCNT, silently
dropping the trailing report fields. Some contemporary touch devices
declare variable items with more than 2048 entries, so part of their
input reports was being discarded.
MFC after: 2 weeks