diff options
author | Richard Röjfors <richard.rojfors.ext@mocean-labs.com> | 2009-08-04 22:34:10 -0700 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2009-08-04 22:35:49 -0700 |
commit | cf5f439b48f82c230dcd81d0061e00664cbb6d39 (patch) | |
tree | 3fb4c4854b1191ede62007a6616921ce4be2e1bd /drivers | |
parent | d570e9ef84e559b09e729f27f5381b6868f6cc5f (diff) | |
download | kernel_samsung_crespo-cf5f439b48f82c230dcd81d0061e00664cbb6d39.zip kernel_samsung_crespo-cf5f439b48f82c230dcd81d0061e00664cbb6d39.tar.gz kernel_samsung_crespo-cf5f439b48f82c230dcd81d0061e00664cbb6d39.tar.bz2 |
Input: tsc2007 - check if I2C communication works during probe
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/input/touchscreen/tsc2007.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/input/touchscreen/tsc2007.c b/drivers/input/touchscreen/tsc2007.c index 3714d19..7ef0d14 100644 --- a/drivers/input/touchscreen/tsc2007.c +++ b/drivers/input/touchscreen/tsc2007.c @@ -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: |