Skip to content

Commit

Permalink
Input: tsc2007 - check if I2C communication works during probe
Browse files Browse the repository at this point in the history
Check the result when sending the power down command to the controller.

Signed-off-by: Richard Röjfors <richard.rojfors.ext@mocean-labs.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
  • Loading branch information
Richard Röjfors authored and Dmitry Torokhov committed Aug 5, 2009
1 parent d570e9e commit cf5f439
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions drivers/input/touchscreen/tsc2007.c
Original file line number Diff line number Diff line change
Expand Up @@ -319,15 +319,17 @@ static int __devinit tsc2007_probe(struct i2c_client *client,
goto err_free_mem;
}

/* Prepare for touch readings - power down ADC and enable PENIRQ */
err = tsc2007_xfer(ts, PWRDOWN);
if (err < 0)
goto err_free_irq;

err = input_register_device(input_dev);
if (err)
goto err_free_irq;

i2c_set_clientdata(client, ts);

/* Prepare for touch readings - power down ADC and enable PENIRQ */
tsc2007_xfer(ts, PWRDOWN);

return 0;

err_free_irq:
Expand Down

0 comments on commit cf5f439

Please sign in to comment.