RE: qt1070: Why IRQF_TRIGGER_NONE?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi All,
  Some information as following,

  According to the datasheet of qt1070, we can use IRQF_TRIGGER_FALLING or IRQF_TRIGGER_LOW (I think this is the best) for IRQ flag. However, the IRQ line is a GPIO of a SOC. Some SOC can detect the level change of the GPIO, while can not distinguish the falling or rising. So, the IRQ flag depends on the trigger mode of GPIO line.

  Maybe use the "flags" element in "struct i2c_board_info" to pass the IRQ flag, or add another element named "irqflags" into "struct i2c_board_info". I think this will be better, but I am not sure whether this is a good solution.

  BTW, I am reworking the driver for DT (device tree) support.

Best Regards,
Voice Shen

-----Original Message-----
From: Josh Wu [mailto:josh.wu@xxxxxxxxx] 
Sent: Thursday, May 03, 2012 9:41 申波
To: javier Martin; Shen, Voice
Cc: linux-input@xxxxxxxxxxxxxxx; Wolfram Sang; Jean Delvare; Axel Lin; Dmitry Torokhov
Subject: Re: qt1070: Why IRQF_TRIGGER_NONE?

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.

?韬{.n?????%??檩??w?{.n???{炳)楹哜?^n?■???h?璀?{?夸z罐?+€?zf"?????i?????_璁?:+v??撸?



[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux