All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>
To: Irina Tirdea <irina.tirdea-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: Dmitry Torokhov
	<dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Bastien Nocera <hadess-0MeiytkfxGOsTnJN9+BGXg@public.gmane.org>,
	"linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Octavian Purdila
	<octavian.purdila-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Subject: Re: [PATCH 5/9] input: goodix: reset device at init
Date: Thu, 28 May 2015 14:19:34 +0100	[thread overview]
Message-ID: <20150528131934.GH23176@leverpostej> (raw)
In-Reply-To: <1432817265-23891-6-git-send-email-irina.tirdea-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>

Hi,

On Thu, May 28, 2015 at 01:47:41PM +0100, Irina Tirdea wrote:
> After power on, it is recommended that the driver resets the device.
> For reset the driver needs to control the interrupt and
> reset gpio pins (configured through ACPI/device tree).

Why is it necessary to mess with the GPIO the interrupts is wired up to?
What exactly does the device expect at reset w.r.t. the interrupt line?

> 
> Signed-off-by: Octavian Purdila <octavian.purdila-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> Signed-off-by: Irina Tirdea <irina.tirdea-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> ---
>  .../bindings/input/touchscreen/goodix.txt          |  5 ++
>  drivers/input/touchscreen/goodix.c                 | 99 ++++++++++++++++++++++
>  2 files changed, 104 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/input/touchscreen/goodix.txt b/Documentation/devicetree/bindings/input/touchscreen/goodix.txt
> index 8ba98ee..7137881 100644
> --- a/Documentation/devicetree/bindings/input/touchscreen/goodix.txt
> +++ b/Documentation/devicetree/bindings/input/touchscreen/goodix.txt
> @@ -12,6 +12,8 @@ Required properties:
>   - reg			: I2C address of the chip. Should be 0x5d or 0x14
>   - interrupt-parent	: Interrupt controller to which the chip is connected
>   - interrupts		: Interrupt to which the chip is connected
> + - irq-gpio		: GPIO pin used for IRQ
> + - reset-gpio		: GPIO pin used for reset
>  
>  Example:
>  
> @@ -23,6 +25,9 @@ Example:
>  			reg = <0x5d>;
>  			interrupt-parent = <&gpio>;
>  			interrupts = <0 0>;
> +
> +			irq-gpio = <&gpio1 0 0>;
> +			reset-gpio = <&gpio1 1 0>;
>  		};
>  
>  		/* ... */
> diff --git a/drivers/input/touchscreen/goodix.c b/drivers/input/touchscreen/goodix.c
> index 9e7d215..4405c55 100644
> --- a/drivers/input/touchscreen/goodix.c
> +++ b/drivers/input/touchscreen/goodix.c
> @@ -26,6 +26,7 @@
>  #include <linux/acpi.h>
>  #include <linux/of.h>
>  #include <asm/unaligned.h>
> +#include <linux/gpio.h>

Nit: weird include ordering.

Mark.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

WARNING: multiple messages have this Message-ID (diff)
From: Mark Rutland <mark.rutland@arm.com>
To: Irina Tirdea <irina.tirdea@intel.com>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Bastien Nocera <hadess@hadess.net>,
	"linux-input@vger.kernel.org" <linux-input@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Octavian Purdila <octavian.purdila@intel.com>
Subject: Re: [PATCH 5/9] input: goodix: reset device at init
Date: Thu, 28 May 2015 14:19:34 +0100	[thread overview]
Message-ID: <20150528131934.GH23176@leverpostej> (raw)
In-Reply-To: <1432817265-23891-6-git-send-email-irina.tirdea@intel.com>

Hi,

On Thu, May 28, 2015 at 01:47:41PM +0100, Irina Tirdea wrote:
> After power on, it is recommended that the driver resets the device.
> For reset the driver needs to control the interrupt and
> reset gpio pins (configured through ACPI/device tree).

Why is it necessary to mess with the GPIO the interrupts is wired up to?
What exactly does the device expect at reset w.r.t. the interrupt line?

> 
> Signed-off-by: Octavian Purdila <octavian.purdila@intel.com>
> Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
> ---
>  .../bindings/input/touchscreen/goodix.txt          |  5 ++
>  drivers/input/touchscreen/goodix.c                 | 99 ++++++++++++++++++++++
>  2 files changed, 104 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/input/touchscreen/goodix.txt b/Documentation/devicetree/bindings/input/touchscreen/goodix.txt
> index 8ba98ee..7137881 100644
> --- a/Documentation/devicetree/bindings/input/touchscreen/goodix.txt
> +++ b/Documentation/devicetree/bindings/input/touchscreen/goodix.txt
> @@ -12,6 +12,8 @@ Required properties:
>   - reg			: I2C address of the chip. Should be 0x5d or 0x14
>   - interrupt-parent	: Interrupt controller to which the chip is connected
>   - interrupts		: Interrupt to which the chip is connected
> + - irq-gpio		: GPIO pin used for IRQ
> + - reset-gpio		: GPIO pin used for reset
>  
>  Example:
>  
> @@ -23,6 +25,9 @@ Example:
>  			reg = <0x5d>;
>  			interrupt-parent = <&gpio>;
>  			interrupts = <0 0>;
> +
> +			irq-gpio = <&gpio1 0 0>;
> +			reset-gpio = <&gpio1 1 0>;
>  		};
>  
>  		/* ... */
> diff --git a/drivers/input/touchscreen/goodix.c b/drivers/input/touchscreen/goodix.c
> index 9e7d215..4405c55 100644
> --- a/drivers/input/touchscreen/goodix.c
> +++ b/drivers/input/touchscreen/goodix.c
> @@ -26,6 +26,7 @@
>  #include <linux/acpi.h>
>  #include <linux/of.h>
>  #include <asm/unaligned.h>
> +#include <linux/gpio.h>

Nit: weird include ordering.

Mark.

  parent reply	other threads:[~2015-05-28 13:19 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-28 12:47 [PATCH 0/9] Goodix touchscreen enhancements Irina Tirdea
2015-05-28 12:47 ` [PATCH 1/9] input: goodix: fix alignment issues Irina Tirdea
2015-06-04 12:48   ` Bastien Nocera
2015-06-05 16:49   ` Dmitry Torokhov
2015-06-05 17:07     ` Tirdea, Irina
2015-06-05 17:17     ` Joe Perches
2015-06-05 17:31       ` Dmitry Torokhov
2015-05-28 12:47 ` [PATCH 2/9] input: goodix: fix variable length array warning Irina Tirdea
2015-05-28 15:57   ` Antonio Ospite
2015-06-03 10:26     ` Tirdea, Irina
2015-06-03 20:49       ` Antonio Ospite
2015-06-03 20:49         ` Antonio Ospite
2015-06-05 16:34         ` Tirdea, Irina
2015-06-05 16:34           ` Tirdea, Irina
2015-06-05 16:40           ` Dmitry Torokhov
2015-06-05 16:40             ` Dmitry Torokhov
2015-06-05 17:00             ` Tirdea, Irina
2015-06-05 17:00               ` Tirdea, Irina
2015-06-05 17:11               ` Dmitry Torokhov
2015-06-05 17:11                 ` Dmitry Torokhov
2015-06-05 17:34                 ` Tirdea, Irina
2015-06-05 17:34                   ` Tirdea, Irina
2015-05-28 12:47 ` [PATCH 3/9] input: goodix: export id and version read from device Irina Tirdea
2015-05-28 12:47 ` [PATCH 4/9] input: goodix: add ACPI IDs for GT911 and GT9271 Irina Tirdea
2015-06-04 12:51   ` Bastien Nocera
2015-06-05 16:36     ` Tirdea, Irina
2015-06-05 16:36       ` Tirdea, Irina
2015-06-05 16:41       ` Dmitry Torokhov
2015-06-05 17:01         ` Tirdea, Irina
2015-06-05 17:01           ` Tirdea, Irina
2015-05-28 12:47 ` [PATCH 5/9] input: goodix: reset device at init Irina Tirdea
     [not found]   ` <1432817265-23891-6-git-send-email-irina.tirdea-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-05-28 13:19     ` Mark Rutland [this message]
2015-05-28 13:19       ` Mark Rutland
2015-05-28 13:42       ` Tirdea, Irina
2015-05-28 12:47 ` [PATCH 6/9] input: goodix: write configuration data to device Irina Tirdea
2015-05-28 13:21   ` Mark Rutland
2015-05-28 13:51     ` Tirdea, Irina
2015-06-04 12:55       ` Bastien Nocera
2015-06-05 16:36         ` Tirdea, Irina
2015-06-05 16:36           ` Tirdea, Irina
2015-06-05 16:43           ` Dmitry Torokhov
2015-06-05 17:05             ` Tirdea, Irina
2015-05-28 12:47 ` [PATCH 7/9] input: goodix: add power management support Irina Tirdea
2015-06-04 13:01   ` Bastien Nocera
2015-06-05 16:42     ` Tirdea, Irina
2015-06-05 16:42       ` Tirdea, Irina
     [not found] ` <1432817265-23891-1-git-send-email-irina.tirdea-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-05-28 12:47   ` [PATCH 8/9] input: goodix: add support for ESD Irina Tirdea
2015-05-28 12:47     ` Irina Tirdea
     [not found]     ` <1432817265-23891-9-git-send-email-irina.tirdea-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-05-28 13:23       ` Mark Rutland
2015-05-28 13:23         ` Mark Rutland
2015-05-28 14:26         ` Tirdea, Irina
2015-06-04 12:57           ` Bastien Nocera
2015-06-05 16:37             ` Tirdea, Irina
2015-06-05 16:37               ` Tirdea, Irina
2015-06-05 16:46               ` Dmitry Torokhov
2015-06-08 14:28                 ` Tirdea, Irina
2015-07-30 12:06                   ` Tirdea, Irina
2015-05-28 12:47   ` [PATCH 9/9] input: goodix: use goodix_i2c_write_u8 instead of i2c_master_send Irina Tirdea
2015-05-28 12:47     ` Irina Tirdea
2015-06-04 13:04 ` [PATCH 0/9] Goodix touchscreen enhancements Bastien Nocera
2015-06-05 16:36   ` Tirdea, Irina
2015-06-05 16:36     ` Tirdea, Irina

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=20150528131934.GH23176@leverpostej \
    --to=mark.rutland-5wv7dgnigg8@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=hadess-0MeiytkfxGOsTnJN9+BGXg@public.gmane.org \
    --cc=irina.tirdea-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=octavian.purdila-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.