[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20200721213317.GK1665100@dtor-ws>
Date: Tue, 21 Jul 2020 14:33:17 -0700
From: Dmitry Torokhov <dmitry.torokhov@...il.com>
To: Jiada Wang <jiada_wang@...tor.com>
Cc: nick@...anahar.org, linux-input@...r.kernel.org,
linux-kernel@...r.kernel.org, erosca@...adit-jv.com,
Andrew_Gabbasov@...tor.com, digetx@...il.com
Subject: Re: [PATCH 1/1] Input: atmel_mxt_ts - only read messages in
mxt_acquire_irq() when necessary
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
Powered by blists - more mailing lists