All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Benjamin Bara <bbara93@gmail.com>
Cc: hns@goldelico.com, richard.leitner@linux.dev,
	christophe.jaillet@wanadoo.fr, linux-input@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Benjamin Bara <benjamin.bara@skidata.com>
Subject: Re: [PATCH v4] Input: tsc2007 - enable cansleep pendown GPIO
Date: Sat, 1 Apr 2023 22:51:09 -0700	[thread overview]
Message-ID: <ZCkXzQ38N44Y7H+I@google.com> (raw)
In-Reply-To: <20230328-tsc2007-sleep-v4-1-2ede92ec9b71@skidata.com>

Hi Benjamin,

On Thu, Mar 30, 2023 at 09:10:37PM +0200, Benjamin Bara wrote:
> From: Benjamin Bara <benjamin.bara@skidata.com>
> 
> When a hard IRQ is triggered, the soft IRQ, which decides if an actual
> pen down happened, should always be triggered. This enables the usage of
> "can_sleep" GPIO chips as "pen down" GPIO, as the value is not read
> during the hard IRQ anymore. This might be the case if the GPIO chip is
> an expander behind i2c.
> 
> Signed-off-by: Benjamin Bara <benjamin.bara@skidata.com>
> Signed-off-by: Richard Leitner <richard.leitner@skidata.com>
> ---
> Hi!
> 
> I found a different approach to my problem:
> If the primary IRQ handler is set to NULL, the default primary IRQ
> handler simply triggers a soft IRQ handler wake up. As the hard IRQ is
> only triggered when a pen down is detected, the gpiod_get_value() inside
> tsc2007_is_pen_down() always returns true and therefore can be
> neglected.

Don't you need to switch to gpio_get_valued_cansleep() in
tsc2007_is_pen_down() to actually allow sleeping gpios?

Thanks.

-- 
Dmitry

      reply	other threads:[~2023-04-02  5:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-30 19:10 [PATCH v4] Input: tsc2007 - enable cansleep pendown GPIO Benjamin Bara
2023-04-02  5:51 ` Dmitry Torokhov [this message]

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=ZCkXzQ38N44Y7H+I@google.com \
    --to=dmitry.torokhov@gmail.com \
    --cc=bbara93@gmail.com \
    --cc=benjamin.bara@skidata.com \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=hns@goldelico.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=richard.leitner@linux.dev \
    /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.