From: Bastien Nocera <hadess@hadess.net>
To: Irina Tirdea <irina.tirdea@intel.com>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Aleksei Mamlin <mamlinav@gmail.com>,
Arnd Bergmann <arnd@arndb.de>,
linux-input@vger.kernel.org
Cc: Mark Rutland <mark.rutland@arm.com>,
Octavian Purdila <octavian.purdila@intel.com>,
linux-kernel@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v8 2/9] Input: goodix - reset device at init
Date: Fri, 09 Oct 2015 16:22:58 +0200 [thread overview]
Message-ID: <1444400578.28661.28.camel@hadess.net> (raw)
In-Reply-To: <1444314231-19206-3-git-send-email-irina.tirdea@intel.com>
On Thu, 2015-10-08 at 17:23 +0300, Irina Tirdea wrote:
> After power on, it is recommended that the driver resets the device.
> The reset procedure timing is described in the datasheet and is used
> at device init (before writing device configuration) and
> for power management. It is a sequence of setting the interrupt
> and reset pins high/low at specific timing intervals. This procedure
> also includes setting the slave address to the one specified in the
> ACPI/device tree.
>
> This is based on Goodix datasheets for GT911 and GT9271 and on Goodix
> driver gt9xx.c for Android (publicly available in Android kernel
> trees for various devices).
>
> For reset the driver needs to control the interrupt and
> reset gpio pins (configured through ACPI/device tree). For devices
> that do not have the gpio pins properly declared, the functionality
> depending on these pins will not be available, but the device can
> still
> be used with basic functionality.
>
> For both device tree and ACPI, the interrupt gpio pin configuration
> is
> read from the "irq-gpio" property and the reset pin configuration is
> read from the "reset-gpio" property. For ACPI 5.1, named properties
> can be specified using the _DSD section. This functionality will not
> be
> available for devices that use indexed gpio pins declared in the _CRS
> section (we need to provide backward compatibility with devices
> that do not support using the interrupt gpio pin as output).
>
> For ACPI, the pins can be specified using ACPI 5.1:
> Device (STAC)
> {
> Name (_HID, "GDIX1001")
> ...
>
> Method (_CRS, 0, Serialized)
> {
> Name (RBUF, ResourceTemplate ()
> {
> I2cSerialBus (0x0014, ControllerInitiated, 0x00061A80,
> AddressingMode7Bit, "\\I2C0",
> 0x00, ResourceConsumer, ,
> )
>
> GpioInt (Edge, ActiveHigh, Exclusive, PullNone, 0x0000,
> "\\I2C0", 0x00, ResourceConsumer, ,
> )
> { // Pin list
> 0
> }
>
> GpioIo (Exclusive, PullDown, 0x0000, 0x0000,
> IoRestrictionOutputOnly, "\\I2C0", 0x00,
> ResourceConsumer, ,
> )
> {
> 1
> }
> })
> Return (RBUF)
> }
>
> Name (_DSD, Package ()
> {
> ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
> Package ()
> {
> Package (2) {"irq-gpio", Package() {^STAC, 0, 0, 0 }},
> Package (2) {"reset-gpio", Package() {^STAC, 1, 0, 0 }},
> ...
> }
> }
>
> Signed-off-by: Octavian Purdila <octavian.purdila@intel.com>
> Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
Didn't actually cause problems on my system, and the documentation
looks good.
Acked-by: Bastien Nocera <hadess@hadess.net>
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2015-10-09 14:23 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-08 14:23 [PATCH v8 0/9] Goodix touchscreen enhancements Irina Tirdea
2015-10-08 14:23 ` [PATCH v8 1/9] Input: goodix - use actual config length for each device type Irina Tirdea
2015-10-08 14:23 ` [PATCH v8 2/9] Input: goodix - reset device at init Irina Tirdea
2015-10-09 14:22 ` Bastien Nocera [this message]
2015-10-10 23:35 ` kbuild test robot
2015-10-08 14:23 ` [PATCH v8 4/9] Input: goodix - add power management support Irina Tirdea
2015-10-08 14:23 ` [PATCH v8 5/9] Input: goodix - use goodix_i2c_write_u8 instead of i2c_master_send Irina Tirdea
2015-10-08 14:23 ` [PATCH v8 6/9] Input: goodix - add support for ESD Irina Tirdea
2015-10-08 14:23 ` [PATCH v8 7/9] Input: goodix - add sysfs interface to dump config Irina Tirdea
2015-10-08 14:23 ` [PATCH v8 8/9] Input: goodix - add runtime power management support Irina Tirdea
2015-10-08 14:23 ` [PATCH v8 9/9] Input: goodix - sort includes using inverse Xmas tree order Irina Tirdea
2015-10-08 14:32 ` [PATCH v8 0/9] Goodix touchscreen enhancements Arnd Bergmann
2015-10-09 11:02 ` Tirdea, Irina
2015-10-09 11:54 ` Arnd Bergmann
2015-10-09 14:27 ` Bastien Nocera
[not found] ` <1444314231-19206-1-git-send-email-irina.tirdea-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-10-08 14:23 ` [PATCH v8 3/9] Input: goodix - write configuration data to device Irina Tirdea
2015-10-09 16:10 ` [PATCH v8 0/9] Goodix touchscreen enhancements Aleksei Mamlin
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=1444400578.28661.28.camel@hadess.net \
--to=hadess@hadess.net \
--cc=arnd@arndb.de \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=irina.tirdea@intel.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mamlinav@gmail.com \
--cc=mark.rutland@arm.com \
--cc=octavian.purdila@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;
as well as URLs for NNTP newsgroup(s).