Hi, On 1/11/23 17:38, Jiaxun Yang wrote: > > > 在2022年11月9日十一月 下午8:59,Hans de Goede写道: >> Hi All, >> >> I'm emailing you all because you have written patches or >> reported bugs related to the ideapad-laptop touchpad >> handling the past. > > Hi all, > > Sorry for chime in this old thread, but I'm able to get some input from a > Lenovo engineer. > > Quoting him: > > "For newer Lenovo laptops we use TPRD/TPWR methods under touchpad's ACPI I2C HID > device to sync touchpad state with EC. TPRD will return current touchpad state known > by EC and OS can use TPWR to switch EC's touchpad state. This state will be used by EC > to control LEDs and touchpad power saving signals." > > According to my understanding we only need replace read write to VPCCMD_R_TOUCHPAD > with calling TPRD/TPWR methods to get all new ideapads work. > > As per my reverse engineering on ASLs this method actually reads a flag from EC's > LPC memory space and it do work on some early ideapads (The earliest one I can > trace is Ideapad 320-15ISK which is released on 2018). > > I'm going to try to implement it in kernel. Though I haven't decide which part of > driver should handle this, as those methods are under ACPI I2C HID device perhaps > we should put this function under i2c-hid-acpi driver. However as the method is very > ideated specific, putting in ideapad-acpi seems more reasonable... Any thoughts? This really should be handled in ideapad-acpi, but that means figuring out a way to find the touchpad device in ideapad-apci. For starters you can search for ACPI devs which match: static const struct acpi_device_id i2c_hid_acpi_match[] = { {"ACPI0C50", 0 }, {"PNP0C50", 0 }, { }, }; And then check if they have the TPRD/TPWR methods. This does risk piking another device then the actual touchpad though, most likely a touchscreen (in case where the ACPI tables accidentally also have TPRD/TPWR methods on the touchscreen). Once you have find the right ACPI device, we can call the methods (when found) from: ideapad_sync_touchpad_state() Note that only ever reads the touchpad state... > He also told me how to get VPC2004 device's BIOS interface version, though the > differences between versions remains unclear to me. I think we can expose it > in dmesg and debugfs to help with future debugging and hopefully reduce the amount > of DMI quirks. Yes reading + logging (in dmesg) the BIOS interface version would be good. Thank you for all your work on this! Regards, Hans