Re: [linux-sunxi] Re: [PATCH 1/4] ARM: dts: sun7i: Enable touchscreen on Wexler TAB7200 tablet

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Fri, Dec 18, 2015 at 10:25:25PM +0100, Maxime Ripard wrote:
> On Fri, Dec 18, 2015 at 11:51:50AM +0300, Aleksei Mamlin wrote:
> > Add a node for the Goodix GT911 touchscreen found on the Wexler TAB7200 tablet
> > 
> > Signed-off-by: Aleksei Mamlin <mamlinav@xxxxxxxxx>
> > ---
> >  arch/arm/boot/dts/sun7i-a20-wexler-tab7200.dts | 19 +++++++++++++++++++
> >  1 file changed, 19 insertions(+)
> > 
> > diff --git a/arch/arm/boot/dts/sun7i-a20-wexler-tab7200.dts b/arch/arm/boot/dts/sun7i-a20-wexler-tab7200.dts
> > index 239b5d2..ec3b837 100644
> > --- a/arch/arm/boot/dts/sun7i-a20-wexler-tab7200.dts
> > +++ b/arch/arm/boot/dts/sun7i-a20-wexler-tab7200.dts
> > @@ -102,6 +102,18 @@
> >  	pinctrl-names = "default";
> >  	pinctrl-0 = <&i2c2_pins_a>;
> >  	status = "okay";
> > +
> > +	gt911: touchscreen@5d {
> > +		compatible = "goodix,gt911";
> > +		reg = <0x5d>;
> > +		interrupt-parent = <&pio>;
> > +		interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>; /* EINT21 (PH21) */
> > +		pinctrl-names = "default";
> > +		pinctrl-0 = <&ts_reset_pin>;
> > +		irq-gpios = <&pio 7 21 GPIO_ACTIVE_HIGH>; /* INT (PH21) */
> 
> It seems odd that you need both irq-gpios and interrupts. These two
> are completely redundant, and you should even actually use only one in
> your driver, since the second request_irq will fail.

Hello,

there is a "specialty" on this type of touchscreen controller -
the irq pin on the GT9xx series of chips has two distinct
functions:

The first is the regular function for signalling interrupts to
the CPU, which is set up with the "interrupts" property.

The second function comes into play when initializing the chip. 
Without a special initialization procedure, the chip provides
basic touchscreen functionality, but several advanced functions
are unavailable.  To enable those advanced functions, the host
needs to temporarily configure the irq pin as a (host-side)
output and transmit a specific pattern on the reset and irq
lines.  This method doesn't work on all systems, so the driver
only attempts to reprogram the irq line on the host side as an
output if it is explicitly declared with the irq-gpios property.

Regards,
Karsten
-- 
Gem. Par. 28 Abs. 4 Bundesdatenschutzgesetz widerspreche ich der Nutzung
sowie der Weitergabe meiner personenbezogenen Daten für Zwecke der
Werbung sowie der Markt- oder Meinungsforschung.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux