From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Jiada Wang <jiada_wang@mentor.com>
Cc: nick@shmanahar.org, linux-input@vger.kernel.org,
linux-kernel@vger.kernel.org, erosca@de.adit-jv.com,
Andrew_Gabbasov@mentor.com, digetx@gmail.com
Subject: Re: [PATCH 1/1] Input: atmel_mxt_ts - only read messages in mxt_acquire_irq() when necessary
Date: Tue, 21 Jul 2020 14:33:17 -0700 [thread overview]
Message-ID: <20200721213317.GK1665100@dtor-ws> (raw)
In-Reply-To: <20200720073612.6252-1-jiada_wang@mentor.com>
Hi Jiada,
On Mon, Jul 20, 2020 at 04:36:12PM +0900, Jiada Wang wrote:
> +static int mxt_check_retrigen(struct mxt_data *data)
> +{
> + struct i2c_client *client = data->client;
> + int error;
> + int val;
> +
> + data->use_retrigen_workaround = false;
> +
> + if (irq_get_trigger_type(data->irq) & IRQF_TRIGGER_LOW)
> + return 0;
Do you think we could change this to:
irq_data = irq_get_irq_data(data->irq);
if (!irq_data) {
... invalid IRQ
retrun -EINVAL;
}
if (irqd_is_level_type(irq_data))
return 0;
as we should not really be concerned about polarity (there could be an
inverter between the controller and AP), but rather whether it is level
or edge interrupt.
Thanks.
--
Dmitry
prev parent reply other threads:[~2020-07-21 21:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-20 7:36 [PATCH 1/1] Input: atmel_mxt_ts - only read messages in mxt_acquire_irq() when necessary Jiada Wang
2020-07-21 21:33 ` 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=20200721213317.GK1665100@dtor-ws \
--to=dmitry.torokhov@gmail.com \
--cc=Andrew_Gabbasov@mentor.com \
--cc=digetx@gmail.com \
--cc=erosca@de.adit-jv.com \
--cc=jiada_wang@mentor.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nick@shmanahar.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;
as well as URLs for NNTP newsgroup(s).