From: Antonio Ospite <ao2@ao2.it>
To: Mika Westerberg <mika.westerberg@intel.com>
Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com>,
linux-input@vger.kernel.org, linux-acpi@vger.kernel.org,
Bastien Nocera <hadess@hadess.net>,
Mathias Nyman <mathias.nyman@linux.intel.com>
Subject: Re: About Goodix-TS on Bay Trail, and ACPI and interrupts
Date: Tue, 20 Jan 2015 17:56:45 +0100 [thread overview]
Message-ID: <20150120175645.f0f95b83da0355b8fdc7dd0d@ao2.it> (raw)
In-Reply-To: <20150120100548.GG1850@lahna.fi.intel.com>
On Tue, 20 Jan 2015 12:05:48 +0200
Mika Westerberg <mika.westerberg@intel.com> wrote:
> 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:
> > > 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 ID
> >
[...]
> > > 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.
Hi Mika, I tested the patch but I still can't get the IRQ.
The new code in i2c-hid does more or less what I was trying to do in
the goodix driver as proof of concept:
http://ao2.it/tmp/Goodix-TS_Teclast-X98-Air-3G/0001-XXX-goodix-add-support-for-GODX0911.patch
The gpio chip correspondent to the pin can be retrieved, but the gpio
descriptor can't be obtained and so the conversion from gpio to irq
can't happen, here is the full dmesg:
http://ao2.it/tmp/Goodix-TS_Teclast-X98-Air-3G/dmesg_Teclast_X98_Air_3G_mainline_i2c-hid_patch.log
I am pasting here the interesting parts, with some more printouts I
added to understand what was going on:
[ 9.056071] i2c_hid i2c-GODX0911:01: GPIO lookup for consumer irq
[ 9.056080] i2c_hid i2c-GODX0911:01: using ACPI for GPIO lookup
[ 9.056086] acpi GODX0911:01: GPIO: looking up irq-gpios
[ 9.056093] acpi GODX0911:01: GPIO: _DSD returned GODX0911:01 3 0 0 1
[ 9.056160] acpi_find_gpio: ares->type: 19
[ 9.056164] acpi_find_gpio: ares->type: 17
[ 9.056167] acpi_find_gpio: pin_index: 0, agpio->pin_table_length: 1
[ 9.056170] acpi_get_gpiod: path: \_SB.GPO2 pin: 68
[ 9.056176] acpi_get_gpiod: handle found
[ 9.056180] acpi_get_gpiod: gpiochip found
[ 9.056183] acpi_get_gpiod: pin: 68
[ 9.056186] acpi_get_gpiod: offset: 68
[ 9.056189] gpiochip_get_desc: hwnum: 68 chip->ngpio: 44
[ 9.056192] acpi_find_gpio: desc_error: -22
[ 9.056195] acpi_find_gpio: ares->type: 17
[ 9.056198] acpi_find_gpio: ares->type: 7
[ 9.056204] acpi GODX0911:01: GPIO: looking up irq-gpio
[ 9.056209] acpi GODX0911:01: GPIO: looking up 0 in _CRS
[ 9.056272] acpi_find_gpio: ares->type: 19
[ 9.056276] acpi_find_gpio: ares->type: 17
[ 9.056280] acpi_find_gpio: pin_index: 0, agpio->pin_table_length: 1
[ 9.056283] acpi_get_gpiod: path: \_SB.GPO2 pin: 68
[ 9.056288] acpi_get_gpiod: handle found
[ 9.056291] acpi_get_gpiod: gpiochip found
[ 9.056294] acpi_get_gpiod: pin: 68
[ 9.056297] acpi_get_gpiod: offset: 68
[ 9.056300] gpiochip_get_desc: hwnum: 68 chip->ngpio: 44
[ 9.056303] acpi_find_gpio: desc_error: -22
[ 9.056306] acpi_find_gpio: ares->type: 17
[ 9.056308] acpi_find_gpio: ares->type: 7
[ 9.056314] i2c_hid i2c-GODX0911:01: lookup for GPIO irq failed
[ 9.056319] i2c_hid i2c-GODX0911:01: Failed to get GPIO interrupt
[ 9.073895] i2c_hid: probe of i2c-GODX0911:01 failed with error -22
As I was trying to say in the original mail, the DSDT declares a gpio
pin number (68) grater than the number of gpios for GPO2 (which on Bay
Trail is 44, isn't it?).
Is the DSDT just wrong? Or could there be anything missing in the
pinctrl-baytrail driver?
Thanks,
Antonio
--
Antonio Ospite
http://ao2.it
A: Because it messes up the order in which people normally read text.
See http://en.wikipedia.org/wiki/Posting_style
Q: Why is top-posting such a bad thing?
next prev parent reply other threads:[~2015-01-20 16:56 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-17 0:03 About Goodix-TS on Bay Trail, and ACPI and interrupts Antonio Ospite
2015-01-19 15:37 ` Benjamin Tissoires
2015-01-20 10:05 ` Mika Westerberg
2015-01-20 16:31 ` Benjamin Tissoires
2015-01-21 10:09 ` Mika Westerberg
2015-01-20 16:56 ` Antonio Ospite [this message]
2015-01-21 10:16 ` Mika Westerberg
2015-01-27 14:45 ` Antonio Ospite
2015-02-06 16:00 ` Antonio Ospite
2015-02-09 13:25 ` Mika Westerberg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150120175645.f0f95b83da0355b8fdc7dd0d@ao2.it \
--to=ao2@ao2.it \
--cc=benjamin.tissoires@redhat.com \
--cc=hadess@hadess.net \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=mathias.nyman@linux.intel.com \
--cc=mika.westerberg@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox