]> git.baikalelectronics.ru Git - kernel.git/commit
Input: psmouse - set up dependency between PS/2 and SMBus companions
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Tue, 15 Feb 2022 21:32:26 +0000 (13:32 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Fri, 18 Feb 2022 21:29:26 +0000 (13:29 -0800)
commitf250cbb1171063840a8478c8c130f677c6dc84ef
tree2a60276949a0d6a7625d32ce274fa63aed5ea36f
parent277b376a3a9f29501b1d57e90669c2f0ba543cac
Input: psmouse - set up dependency between PS/2 and SMBus companions

When we switch from emulated PS/2 to native (RMI4 or Elan) protocols, we
create SMBus companion devices that are attached to I2C/SMBus controllers.
However, when suspending and resuming, we also need to make sure that we
take into account the PS/2 device they are associated with, so that PS/2
device is suspended after the companion and resumed before it, otherwise
companions will not work properly. Before I2C devices were marked for
asynchronous suspend/resume, this ordering happened naturally, but now we
need to enforce it by establishing device links, with PS/2 devices being
suppliers and SMBus companions being consumers.

Fixes: 8ce331de5369 ("i2c: enable async suspend/resume on i2c client devices")
Reported-and-tested-by: Hugh Dickins <hughd@google.com>
Tested-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Link: https://lore.kernel.org/r/89456fcd-a113-4c82-4b10-a9bcaefac68f@google.com
Link: https://lore.kernel.org/r/YgwQN8ynO88CPMju@google.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/mouse/psmouse-smbus.c