[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <52B28AB9.5080405@ti.com>
Date: Thu, 19 Dec 2013 11:27:13 +0530
From: Roger Quadros <rogerq@...com>
To: Dmitry Torokhov <dmitry.torokhov@...il.com>
CC: <rydberg@...omail.se>, <jcbian@...cir.com.cn>,
<linux-input@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<devicetree@...r.kernel.org>
Subject: Re: [PATCH 3/9] Input: pixcir_i2c_ts: Initialize interrupt mode and
power mode
On 12/18/2013 07:44 PM, Dmitry Torokhov wrote:
> On Wed, Dec 18, 2013 at 02:51:14PM +0530, Roger Quadros wrote:
>> +
>> +static int pixcir_stop(struct pixcir_i2c_ts_data *ts)
>> +{
>> + struct device *dev = &ts->client->dev;
>> + int ret;
>> +
>> + /* disable interrupt generation */
>> + ret = pixcir_int_enable(ts, 0);
>> + if (ret) {
>> + dev_err(dev, "Failed to disable interrupt generation\n");
>> + return ret;
>> + }
>> +
>> + disable_irq(ts->client->irq);
>
> Why do you need to disable IRQ? If you disable interrupt generation in
> the chip I think you only need to call synchronize_irq() to make sure
> it's completed if it happens to be running. Also you need to move the
> code:
Agreed, no need to call disable_irq().
>
> tsdata->exiting = true;
> mb();
>
> here from pixcir_i2c_ts_remove() to make sure handler exits promptly.
>
> You will also need to reset tsdata->exiting in your start method.
>
OK.
cheers,
-roger
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists