From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Nocera Subject: Re: [PATCH v8 2/9] Input: goodix - reset device at init Date: Fri, 09 Oct 2015 16:22:58 +0200 Message-ID: <1444400578.28661.28.camel@hadess.net> References: <1444314231-19206-1-git-send-email-irina.tirdea@intel.com> <1444314231-19206-3-git-send-email-irina.tirdea@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Received: from relay4-d.mail.gandi.net ([217.70.183.196]:42031 "EHLO relay4-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754731AbbJIOXE (ORCPT ); Fri, 9 Oct 2015 10:23:04 -0400 In-Reply-To: <1444314231-19206-3-git-send-email-irina.tirdea@intel.com> Sender: linux-input-owner@vger.kernel.org List-Id: linux-input@vger.kernel.org To: Irina Tirdea , Dmitry Torokhov , Aleksei Mamlin , Arnd Bergmann , linux-input@vger.kernel.org Cc: Mark Rutland , Octavian Purdila , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org 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. >=20 > 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). >=20 > 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. >=20 > 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). >=20 > For ACPI, the pins can be specified using ACPI 5.1: > Device (STAC) > { > =C2=A0=C2=A0=C2=A0=C2=A0Name (_HID, "GDIX1001") > =C2=A0=C2=A0=C2=A0=C2=A0... >=20 > =C2=A0=C2=A0=C2=A0=C2=A0Method (_CRS, 0, Serialized) > =C2=A0=C2=A0=C2=A0=C2=A0{ > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0Name (RBUF, ResourceT= emplate () > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0{ > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0I2cSerialBus (0x0014, ControllerInitiated, 0x00061A80, > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0AddressingMode7Bit, "\\I2C0", > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A00x00, ResourceConsumer, , > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0) >=20 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0GpioInt (Edge, ActiveHigh, Exclusive, PullNone, 0x0000, > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0"\\I2C0", 0x00, ResourceConsumer, , > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A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A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A01 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0} > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0}) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0Return (RBUF) > =C2=A0=C2=A0=C2=A0=C2=A0} >=20 > =C2=A0=C2=A0=C2=A0=C2=A0Name (_DSD,=C2=A0=C2=A0Package () > =C2=A0=C2=A0=C2=A0=C2=A0{ > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0ToUUID("daffd814-6eba= -4d8c-8a91-bc9bbf4aa301"), > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0Package () > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0{ > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0Package (2) {"irq-gpio", Package() {^STAC, 0, 0, 0 }}, > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0Package (2) {"reset-gpio", Package() {^STAC, 1, 0, 0 }}, > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0... > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0} > =C2=A0=C2=A0=C2=A0=C2=A0} >=20 > Signed-off-by: Octavian Purdila > Signed-off-by: Irina Tirdea Didn't actually cause problems on my system, and the documentation looks good. Acked-by: Bastien Nocera -- 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