Skip to contentSkip to conversation

Input: cy8ctmg110_ts - set reset_pin and irq_pin from platform data

PATCH In review Axel Lin 2 participants 2 messages Jul 13, 2011

Subsystems (2)
lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 Input: cy8ctmg110_ts - set reset_pin and irq_pin from platform data

The implementation in cy8ctmg110_probe() does not properly set reset_pin and irq_pin from platform data. Let's fix it.

---
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(-)
drivers/input/touchscreen/cy8ctmg110_ts.c +2 -0
index d7afa20..cd60b3c 100644
@@ -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));
Signature · 1 line
1.7.4.1
#1 lore raw
Quoted 11 lines · On Wed, 13 Jul 2011 21:06:59 +0800 Axel Lin <[email protected]> wrote:

The implementation in cy8ctmg110_probe() does not properly set reset_pin and irq_pin from platform data. Let's fix it.

---
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