Re: About Goodix-TS on Bay Trail, and ACPI and interrupts
From: Mika Westerberg <hidden>
Date: 2015-01-20 10:06:30
Also in:
linux-acpi
On Mon, Jan 19, 2015 at 10:37:58AM -0500, Benjamin Tissoires wrote:
Hi Antonio, [adding Mika in CC, he implemented most of the ACPI and GPIO for i2c-hid] On Jan 17 2015 or thereabouts, Antonio Ospite wrote:quoted
Hi, I am trying to make the Goodix driver (drivers/input/touchscreen/goodix.c) working with a Teclast X98 Air 3G, a tablet based on Intel Bay Trail, but I am new to ACPI and I could use some help. I am working with a 3.19-rc4 kernel compiled for x86_64. This is the DSDT section in the UEFI firmware: Device (TCS0) { Name (_ADR, Zero) // _ADR: Address Name (_HID, "GODX0911") // _HID: Hardware ID Name (_CID, "PNP0C50" /* HID Protocol Device (I2C bus) */) // _CID: Compatible IDurgh, this is bad. It declares itself as i2c-hid, but it is not :( Anyway, according to your logs, i2c-hid probe() just fails, so it's not a big problem.
Actually, I think this device should use i2c-hid. All the ACPI plumbing is there including _DSM. What makes you think it should use the goodix driver?
quoted
Name (_S0W, Zero) // _S0W: S0 Device Wake State Name (_DEP, Package (0x02) // _DEP: Dependencies { GPO1, I2C5 }) Method (_PS3, 0, Serialized) // _PS3: Power State 3 { If ((^^^I2C5.PMIC.AVBG == One)) {} } Method (_PS0, 0, Serialized) // _PS0: Power State 0 { If ((^^^GPO1.AVBL == One)) { ^^^GPO1.TCD3 = Zero } Sleep (0x05) If ((^^^I2C5.PMIC.AVBG == One)) {} Sleep (0x1E) If ((^^^GPO1.AVBL == One)) { ^^^GPO1.TCD3 = One } Sleep (0x78) } Method (_CRS, 0, NotSerialized) // _CRS: Current Resource Settings { Name (RBUF, ResourceTemplate () { I2cSerialBus (0x0014, ControllerInitiated, 0x0019F0A0, AddressingMode7Bit, "\\_SB.I2C4", 0x00, ResourceConsumer, , ) GpioIo (Exclusive, PullDefault, 0x0000, 0x0000, IoRestrictionInputOnly, "\\_SB.GPO2", 0x00, ResourceConsumer, , ) { // Pin list 0x0044 } }) Name (ABUF, ResourceTemplate () { I2cSerialBus (0x0014, ControllerInitiated, 0x0019F0A0, AddressingMode7Bit, "\\_SB.I2C4", 0x00, ResourceConsumer, , ) GpioIo (Exclusive, PullDefault, 0x0000, 0x0000, IoRestrictionInputOnly, "\\_SB.GPO2", 0x00, ResourceConsumer, , ) { // Pin list 0x0044 } GpioIo (Exclusive, PullDefault, 0x0000, 0x0000, IoRestrictionOutputOnly, "\\_SB.GPO1", 0x00, ResourceConsumer, , ) { // Pin list 0x001A } })It looks like the GPIOs are correctly declared. The ACPI code should set the client->irq auto-magically. It's not the case, so I guess Mika should be able to tell us more on that.
The current i2c-hid.c does not cope with GPIO interrupts. I've attached an experimental patch that should convert the driver to use them. Antonio, can you try that out and check if i2c-hid driver gets you working touch screen? Also please add "i2c_hid.debug=1" to the kernel command line so we can see if it returns proper HID descriptor.
Attachments
- 0001-HID-i2c-hid-Preliminary-support-for-GPIO-interrupts.patch [text/plain] 5600 bytes · preview