All of lore.kernel.org
 help / color / mirror / Atom feed
From: Josh Wu <josh.wu@atmel.com>
To: javier Martin <javier.martin@vista-silicon.com>,
	"Shen, Voice" <Voice.Shen@atmel.com>
Cc: linux-input@vger.kernel.org, Wolfram Sang <w.sang@pengutronix.de>,
	Jean Delvare <khali@linux-fr.org>, Axel Lin <axel.lin@gmail.com>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>
Subject: Re: qt1070: Why IRQF_TRIGGER_NONE?
Date: Thu, 03 May 2012 09:41:11 +0800	[thread overview]
Message-ID: <4FA1E237.2070404@atmel.com> (raw)
In-Reply-To: <CACKLOr1XE+tJ92jbfOHdDQVVsXhsNASrHgENEbiuR+8aBE11cw@mail.gmail.com>

On 5/2/2012 4:35 PM, javier Martin wrote:
> Hi,
> I was testing qt1070 driver with my Visstrim SM10 board when I found
> out IRQs where not triggered properly.
>
> I had to come up with the following patch in order to solve it:
>
> diff --git a/drivers/input/keyboard/qt1070.c b/drivers/input/keyboard/qt1070.c
> index 0b7b2f8..e8b6ae3 100644
> --- a/drivers/input/keyboard/qt1070.c
> +++ b/drivers/input/keyboard/qt1070.c
> @@ -201,7 +201,7 @@ static int __devinit qt1070_probe(struct i2c_client *client,
>   	msleep(QT1070_RESET_TIME);
>
>   	err = request_threaded_irq(client->irq, NULL, qt1070_interrupt,
> -		IRQF_TRIGGER_NONE, client->dev.driver->name, data);
> +		IRQF_TRIGGER_FALLING, client->dev.driver->name, data);
>   	if (err) {
>   		dev_err(&client->dev, "fail to request irq\n");
>   		goto err_free_mem;
>
>
> According to the datasheet (p10)  "The CHANGE line is active low and
> signals when there is a change in state in the Detection or
> Input status bytes. It is cleared (allowed to float high) when the
> host reads the status bytes." As I understand, this means that we have
> to monitor falling edges here.
>
> Is there any reason to register the IRQ as IRQF_TRIGGER_NONE? Would
> you accept the above patch instead, provided I send it in the required
> format?
I add Voice Shen to the mail loop, who is writing above code.

Voice, will that IRQF_TRIGGER_XXXX changes impact other platforms?

Best Regards,
Josh Wu
>
> Regards.


  reply	other threads:[~2012-05-03  1:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-02  8:35 qt1070: Why IRQF_TRIGGER_NONE? javier Martin
2012-05-03  1:41 ` Josh Wu [this message]
2012-05-03  5:15   ` Shen, Voice
2012-05-03  6:14     ` Jean Delvare
2012-05-04  2:07       ` Shen, Voice
2012-05-04  7:06         ` javier Martin
2012-05-04  7:56           ` Dmitry Torokhov

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=4FA1E237.2070404@atmel.com \
    --to=josh.wu@atmel.com \
    --cc=Voice.Shen@atmel.com \
    --cc=axel.lin@gmail.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=javier.martin@vista-silicon.com \
    --cc=khali@linux-fr.org \
    --cc=linux-input@vger.kernel.org \
    --cc=w.sang@pengutronix.de \
    /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.