From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: linux-input@vger.kernel.org, Denis Carikli <denis@eukrea.com>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
NXP Linux Team <linux-imx@nxp.com>,
"H . Nikolaus Schaller" <hns@goldelico.com>,
devicetree@vger.kernel.org
Subject: Re: [PATCH v2] Input: tsc2007 - use GPIO descriptor
Date: Mon, 26 Aug 2019 15:00:22 -0700 [thread overview]
Message-ID: <20190826220022.GA7663@dtor-ws> (raw)
In-Reply-To: <20190823071021.5598-1-linus.walleij@linaro.org>
Hi Linus,
On Fri, Aug 23, 2019 at 09:10:21AM +0200, Linus Walleij wrote:
> This switches the TSC2007 to use a GPIO descriptor to read
> the pendown GPIO line.
>
> As this will make the gpiolib start to respect polarity
> inversion flags on the GPIO lines, drop the inversion when
> reading the line with gpio_get_value(), fix two offenders
> in the i.MX device trees, and also emphasize the importance
> of marking the polarity right in the device tree bindings.
>
> Cc: Denis Carikli <denis@eukrea.com>
> Cc: Pengutronix Kernel Team <kernel@pengutronix.de>
> Cc: NXP Linux Team <linux-imx@nxp.com>
> Cc: H. Nikolaus Schaller <hns@goldelico.com>
> Cc: devicetree@vger.kernel.org
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
> ChangeLog v1->v2:
> - Drop inversion on the GPIO descriptor value, rely on the
> gpiolib to handle polarity inversion.
> - Comb through device trees, identify two offenders, fix
> them as part of the patch for a clean cut.
> - Also fix the device tree bindings.
> ---
> .../bindings/input/touchscreen/tsc2007.txt | 5 +++--
> arch/arm/boot/dts/imx35-eukrea-cpuimx35.dtsi | 3 ++-
> arch/arm/boot/dts/imx51-eukrea-cpuimx51.dtsi | 3 ++-
> drivers/input/touchscreen/tsc2007.h | 4 +++-
> drivers/input/touchscreen/tsc2007_core.c | 14 +++++++-------
> 5 files changed, 17 insertions(+), 12 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/input/touchscreen/tsc2007.txt b/Documentation/devicetree/bindings/input/touchscreen/tsc2007.txt
> index ed00f61b8c08..b08b54d49699 100644
> --- a/Documentation/devicetree/bindings/input/touchscreen/tsc2007.txt
> +++ b/Documentation/devicetree/bindings/input/touchscreen/tsc2007.txt
> @@ -7,7 +7,8 @@ Required properties:
>
> Optional properties:
> - gpios: the interrupt gpio the chip is connected to (trough the penirq pin).
> - The penirq pin goes to low when the panel is touched.
> + The penirq pin goes to low when the panel is touched, so make sure to tag
> + the GPIO line with GPIO_ACTIVE_LOW.
I think this is too strong. I am sure that one can come up with a way to
connect the attention signal though polarity inverter and then one would
have to specify GPIO_ACTIVE_HIGH in the DT.
Can we say:
The penirq pin goes to low when the panel is touched, so GPIO line
should normally be tagged with GPIO_ACTIVE_LOW.
Thanks.
--
Dmitry
next prev parent reply other threads:[~2019-08-26 22:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-23 7:10 [PATCH v2] Input: tsc2007 - use GPIO descriptor Linus Walleij
2019-08-26 22:00 ` Dmitry Torokhov [this message]
2019-08-27 7:42 ` Linus Walleij
2019-09-02 15:48 ` Dmitry Torokhov
2019-09-02 15:51 ` Dmitry Torokhov
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=20190826220022.GA7663@dtor-ws \
--to=dmitry.torokhov@gmail.com \
--cc=denis@eukrea.com \
--cc=devicetree@vger.kernel.org \
--cc=hns@goldelico.com \
--cc=kernel@pengutronix.de \
--cc=linus.walleij@linaro.org \
--cc=linux-imx@nxp.com \
--cc=linux-input@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox