提交 cf5f439b 编写于 作者: R Richard Röjfors 提交者: Dmitry Torokhov

Input: tsc2007 - check if I2C communication works during probe

Check the result when sending the power down command to the controller.
Signed-off-by: NRichard Röjfors <richard.rojfors.ext@mocean-labs.com>
Signed-off-by: NDmitry Torokhov <dtor@mail.ru>
上级 d570e9ef
......@@ -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:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册