From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: Oleksij Rempel <o.rempel@pengutronix.de>,
Janusz Krzysztofik <jmkrzyszt@gmail.com>,
Tony Lindgren <tony@atomide.com>,
Linus Walleij <linusw@kernel.org>,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-omap@vger.kernel.org
Subject: Re: [PATCH v2 2/2] Input: ads7846 - fix up the pendown GPIO setup on Nokia 770
Date: Sun, 19 Apr 2026 17:06:53 -0700 [thread overview]
Message-ID: <aeVs2VUqPL1v0Vka@google.com> (raw)
In-Reply-To: <20260419161848.825831-3-aaro.koskinen@iki.fi>
Hi Aaro,
On Sun, Apr 19, 2026 at 07:18:48PM +0300, Aaro Koskinen wrote:
> Commit 767d83361aaa6 ("Input: ads7846 - Convert to use software nodes")
> added gpiod set up for the IRQ in the 770 board file, then another in
> the touchscreen driver for reading the pen state. This will make the probe
> fail:
>
> [ 1.347381] ads7846 spi2.0: failed to request pendown GPIO
> [ 1.361846] ads7846: probe of spi2.0 failed with error -16
>
> I originally tried to fix it using non-exclusive flag, but that was not
> found acceptable. Instead, just use a single gpiod.
>
> Fixes: 767d83361aaa6 ("Input: ads7846 - Convert to use software nodes")
> Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
> ---
> arch/arm/mach-omap1/board-nokia770.c | 11 -----------
> drivers/input/touchscreen/ads7846.c | 12 +++++++-----
> 2 files changed, 7 insertions(+), 16 deletions(-)
>
> diff --git a/arch/arm/mach-omap1/board-nokia770.c b/arch/arm/mach-omap1/board-nokia770.c
> index a5bf5554800f..8b8013ab4590 100644
> --- a/arch/arm/mach-omap1/board-nokia770.c
> +++ b/arch/arm/mach-omap1/board-nokia770.c
> @@ -285,9 +285,6 @@ static void __init nokia770_cbus_init(void)
> static struct gpiod_lookup_table nokia770_irq_gpio_table = {
> .dev_id = NULL,
> .table = {
> - /* GPIO used by SPI device 1 */
> - GPIO_LOOKUP("gpio-0-15", 15, "ads7846_irq",
> - GPIO_ACTIVE_HIGH),
> /* GPIO used for retu IRQ */
> GPIO_LOOKUP("gpio-48-63", 14, "retu_irq",
> GPIO_ACTIVE_HIGH),
> @@ -307,8 +304,6 @@ static struct gpiod_lookup_table nokia770_irq_gpio_table = {
>
> static void __init omap_nokia770_init(void)
> {
> - struct gpio_desc *d;
> -
> /* On Nokia 770, the SleepX signal is masked with an
> * MPUIO line by default. It has to be unmasked for it
> * to become functional */
> @@ -322,12 +317,6 @@ static void __init omap_nokia770_init(void)
> platform_add_devices(nokia770_devices, ARRAY_SIZE(nokia770_devices));
>
> gpiod_add_lookup_table(&nokia770_irq_gpio_table);
> - d = gpiod_get(NULL, "ads7846_irq", GPIOD_IN);
> - if (IS_ERR(d))
> - pr_err("Unable to get ADS7846 IRQ GPIO descriptor\n");
> - else
> - nokia770_spi_board_info[1].irq = gpiod_to_irq(d);
No, I think what we need here is a simple gpiod_put(). The mapping is
not going to change unless someone tries to unload gpiochip, but then
the device is not going to work anyway.
Longer term we need to figure out how to describe interrupts with
software nodes (or wait long enough for everything to get converted to
device tree).
Thanks.
--
Dmitry
next prev parent reply other threads:[~2026-04-20 0:06 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-19 16:18 [PATCH v2 0/2] Input/omap1: fix touchscreen functionality on Nokia 770 Aaro Koskinen
2026-04-19 16:18 ` [PATCH v2 1/2] Input: ads7846 - restore half-duplex support Aaro Koskinen
2026-04-20 0:13 ` Dmitry Torokhov
2026-04-20 19:32 ` Aaro Koskinen
2026-04-19 16:18 ` [PATCH v2 2/2] Input: ads7846 - fix up the pendown GPIO setup on Nokia 770 Aaro Koskinen
2026-04-20 0:06 ` Dmitry Torokhov [this message]
2026-04-20 19:43 ` Aaro Koskinen
2026-04-19 20:10 ` [PATCH v2 0/2] Input/omap1: fix touchscreen functionality " Linus Walleij
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=aeVs2VUqPL1v0Vka@google.com \
--to=dmitry.torokhov@gmail.com \
--cc=aaro.koskinen@iki.fi \
--cc=jmkrzyszt@gmail.com \
--cc=linusw@kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=o.rempel@pengutronix.de \
--cc=tony@atomide.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