* [PATCH] Input: cy8ctmg110_ts - set reset_pin and irq_pin from platform data
@ 2011-07-13 13:06 Axel Lin
2011-07-13 13:20 ` Alan Cox
0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2011-07-13 13:06 UTC (permalink / raw)
To: linux-kernel; +Cc: Samuli Konttila, Dmitry Torokhov, Alan Cox, linux-input
The implementation in cy8ctmg110_probe() does not properly set reset_pin
and irq_pin from platform data. Let's fix it.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
Current implementation returns -ENODEV if no pdata available.
But it does not use the information from pdata.
I think currently the driver does not work because both ts->reset_pin and ts->irq_pin are 0, then gpio_request with ts->irq_pin will fail.
Just found this bug while reading the code.
I don't have this hardware. I appreciate if someone can test it.
Axel
drivers/input/touchscreen/cy8ctmg110_ts.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/input/touchscreen/cy8ctmg110_ts.c b/drivers/input/touchscreen/cy8ctmg110_ts.c
index d7afa20..cd60b3c 100644
--- a/drivers/input/touchscreen/cy8ctmg110_ts.c
+++ b/drivers/input/touchscreen/cy8ctmg110_ts.c
@@ -193,6 +193,8 @@ static int __devinit cy8ctmg110_probe(struct i2c_client *client,
ts->client = client;
ts->input = input_dev;
+ ts->reset_pin = pdata->reset_pin;
+ ts->irq_pin = pdata->irq_pin;
snprintf(ts->phys, sizeof(ts->phys),
"%s/input0", dev_name(&client->dev));
--
1.7.4.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Input: cy8ctmg110_ts - set reset_pin and irq_pin from platform data
2011-07-13 13:06 [PATCH] Input: cy8ctmg110_ts - set reset_pin and irq_pin from platform data Axel Lin
@ 2011-07-13 13:20 ` Alan Cox
0 siblings, 0 replies; 2+ messages in thread
From: Alan Cox @ 2011-07-13 13:20 UTC (permalink / raw)
To: Axel Lin
Cc: linux-kernel, Samuli Konttila, Dmitry Torokhov, Alan Cox,
linux-input
On Wed, 13 Jul 2011 21:06:59 +0800
Axel Lin <axel.lin@gmail.com> wrote:
> The implementation in cy8ctmg110_probe() does not properly set reset_pin
> and irq_pin from platform data. Let's fix it.
>
> Signed-off-by: Axel Lin <axel.lin@gmail.com>
> ---
> Current implementation returns -ENODEV if no pdata available.
> But it does not use the information from pdata.
> I think currently the driver does not work because both ts->reset_pin and ts->irq_pin are 0, then gpio_request with ts->irq_pin will fail.
>
> Just found this bug while reading the code.
> I don't have this hardware. I appreciate if someone can test it.
Looks right, but I'm likewise unable to test it as I no longer have
access to a device using it.
Alan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-07-13 13:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-13 13:06 [PATCH] Input: cy8ctmg110_ts - set reset_pin and irq_pin from platform data Axel Lin
2011-07-13 13:20 ` Alan Cox
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).