* [PATCH] input: wrong irq requested in edt-ft5x06.c
@ 2012-09-19 14:53 Stefano Babic
2012-09-19 16:58 ` Dmitry Torokhov
0 siblings, 1 reply; 5+ messages in thread
From: Stefano Babic @ 2012-09-19 14:53 UTC (permalink / raw)
To: linux-input; +Cc: Stefano Babic, Dmitry Torokhov, Simon Budig, Guenter Roeck
The probe function checks for integrity the pdata->irq_pin,
but then does not request this line for interrupt.
For this reason, no interrupts are generated.
Tested on a AM3517 board with EP0700M06
Signed-off-by: Stefano Babic <sbabic@denx.de>
CC: Dmitry Torokhov <dmitry.torokhov@gmail.com>
CC: Simon Budig <simon.budig@kernelconcepts.de>
CC: Guenter Roeck <linux@roeck-us.net>
---
drivers/input/touchscreen/edt-ft5x06.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/input/touchscreen/edt-ft5x06.c b/drivers/input/touchscreen/edt-ft5x06.c
index b06a5e3..9608281 100644
--- a/drivers/input/touchscreen/edt-ft5x06.c
+++ b/drivers/input/touchscreen/edt-ft5x06.c
@@ -788,7 +788,8 @@ static int __devinit edt_ft5x06_ts_probe(struct i2c_client *client,
input_set_drvdata(input, tsdata);
i2c_set_clientdata(client, tsdata);
- error = request_threaded_irq(client->irq, NULL, edt_ft5x06_ts_isr,
+ error = request_threaded_irq(gpio_to_irq(pdata->irq_pin), NULL,
+ edt_ft5x06_ts_isr,
IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
client->name, tsdata);
if (error) {
--
1.7.9.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] input: wrong irq requested in edt-ft5x06.c
2012-09-19 14:53 [PATCH] input: wrong irq requested in edt-ft5x06.c Stefano Babic
@ 2012-09-19 16:58 ` Dmitry Torokhov
2012-09-20 8:18 ` Stefano Babic
0 siblings, 1 reply; 5+ messages in thread
From: Dmitry Torokhov @ 2012-09-19 16:58 UTC (permalink / raw)
To: Stefano Babic; +Cc: linux-input, Simon Budig, Guenter Roeck
Hi Stefano,
On Wed, Sep 19, 2012 at 04:53:54PM +0200, Stefano Babic wrote:
> The probe function checks for integrity the pdata->irq_pin,
> but then does not request this line for interrupt.
> For this reason, no interrupts are generated.
>
> Tested on a AM3517 board with EP0700M06
Why is your board code does not set client->irq properly?
Thanks.
>
> Signed-off-by: Stefano Babic <sbabic@denx.de>
> CC: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> CC: Simon Budig <simon.budig@kernelconcepts.de>
> CC: Guenter Roeck <linux@roeck-us.net>
> ---
> drivers/input/touchscreen/edt-ft5x06.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/input/touchscreen/edt-ft5x06.c b/drivers/input/touchscreen/edt-ft5x06.c
> index b06a5e3..9608281 100644
> --- a/drivers/input/touchscreen/edt-ft5x06.c
> +++ b/drivers/input/touchscreen/edt-ft5x06.c
> @@ -788,7 +788,8 @@ static int __devinit edt_ft5x06_ts_probe(struct i2c_client *client,
> input_set_drvdata(input, tsdata);
> i2c_set_clientdata(client, tsdata);
>
> - error = request_threaded_irq(client->irq, NULL, edt_ft5x06_ts_isr,
> + error = request_threaded_irq(gpio_to_irq(pdata->irq_pin), NULL,
> + edt_ft5x06_ts_isr,
> IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
> client->name, tsdata);
> if (error) {
> --
> 1.7.9.5
>
--
Dmitry
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] input: wrong irq requested in edt-ft5x06.c
2012-09-19 16:58 ` Dmitry Torokhov
@ 2012-09-20 8:18 ` Stefano Babic
2012-09-20 8:31 ` Simon Budig
0 siblings, 1 reply; 5+ messages in thread
From: Stefano Babic @ 2012-09-20 8:18 UTC (permalink / raw)
To: Dmitry Torokhov; +Cc: Stefano Babic, linux-input, Simon Budig, Guenter Roeck
On 19/09/2012 18:58, Dmitry Torokhov wrote:
> Hi Stefano,
>
Hi Dmitry,
> On Wed, Sep 19, 2012 at 04:53:54PM +0200, Stefano Babic wrote:
>> The probe function checks for integrity the pdata->irq_pin,
>> but then does not request this line for interrupt.
>> For this reason, no interrupts are generated.
>>
>> Tested on a AM3517 board with EP0700M06
>
> Why is your board code does not set client->irq properly?
My concern is related that there are two different setup for the irq.
Near the client structure, the driver uses a an own platform data
structure edt_ft5x06_platform_data, where one filed is irq_pin. In whole
driver the pdata->irq_pin is used, and client->irq is used only for
requesting the irq.
But they contain the same information, as the irq number can be get easy
from irq_pin with gpio_to_irq(). Having both, it is possible to set them
to different values, and this is wrong.
Regards,
Stefano
--
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic@denx.de
=====================================================================
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] input: wrong irq requested in edt-ft5x06.c
2012-09-20 8:18 ` Stefano Babic
@ 2012-09-20 8:31 ` Simon Budig
2012-09-20 8:56 ` Stefano Babic
0 siblings, 1 reply; 5+ messages in thread
From: Simon Budig @ 2012-09-20 8:31 UTC (permalink / raw)
To: Stefano Babic; +Cc: Dmitry Torokhov, linux-input, Guenter Roeck
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 09/20/2012 10:18 AM, Stefano Babic wrote:
> But they contain the same information, as the irq number can be get
> easy from irq_pin with gpio_to_irq(). Having both, it is possible
> to set them to different values, and this is wrong.
gpio_to_irq is not available on all platforms. There was a discussion
on that topic quite a while ago. Moving the irq setup code to the
board file was the conclusion from that discussion.
Bye,
Simon
- --
Simon Budig kernel concepts GmbH
simon.budig@kernelconcepts.de Sieghuetter Hauptweg 48
+49-271-771091-17 D-57072 Siegen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/
iEYEARECAAYFAlBa1FQACgkQO2O/RXesiHDBOACfamvKFxTYUR9TdVSLhTobthoG
KKwAniPJtTiufxLrATH+n8DwlzuPsok0
=QqF7
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] input: wrong irq requested in edt-ft5x06.c
2012-09-20 8:31 ` Simon Budig
@ 2012-09-20 8:56 ` Stefano Babic
0 siblings, 0 replies; 5+ messages in thread
From: Stefano Babic @ 2012-09-20 8:56 UTC (permalink / raw)
To: Simon Budig; +Cc: Stefano Babic, Dmitry Torokhov, linux-input, Guenter Roeck
On 20/09/2012 10:31, Simon Budig wrote:
> On 09/20/2012 10:18 AM, Stefano Babic wrote:
>> But they contain the same information, as the irq number can be
>> get easy from irq_pin with gpio_to_irq(). Having both, it is
>> possible to set them to different values, and this is wrong.
>
> gpio_to_irq is not available on all platforms. There was a
> discussion on that topic quite a while ago.
I missed this issue, thanks !
> Moving the irq setup code to the board file was the conclusion from
> that discussion.
Understood, thanks.
Regards,
Stefano
--
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic@denx.de
=====================================================================
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-09-20 8:57 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-19 14:53 [PATCH] input: wrong irq requested in edt-ft5x06.c Stefano Babic
2012-09-19 16:58 ` Dmitry Torokhov
2012-09-20 8:18 ` Stefano Babic
2012-09-20 8:31 ` Simon Budig
2012-09-20 8:56 ` Stefano Babic
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).