diff options
| author | Iiro Valkonen <iiro.valkonen@atmel.com> | 2011-02-04 03:51:05 -0500 |
|---|---|---|
| committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2011-02-21 04:02:27 -0500 |
| commit | 26cdb1ae76f842e895ef4d09796a9101a7f8746b (patch) | |
| tree | 378573f3b687c47f8368d8f8a1e96d94ca9b8d5e /drivers/input/touchscreen | |
| parent | 7686b108d8ef5c32f429d5228798636f3a1caf5a (diff) | |
Input: atmel_mxt_ts - read whole message to make CHG low
Read the whole message, as reading just the first byte isn't always
guaranteed to clear the message.
Signed-off-by: Iiro Valkonen <iiro.valkonen@atmel.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/touchscreen')
| -rw-r--r-- | drivers/input/touchscreen/atmel_mxt_ts.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c index 5dca78a00c94..162a3bf019e4 100644 --- a/drivers/input/touchscreen/atmel_mxt_ts.c +++ b/drivers/input/touchscreen/atmel_mxt_ts.c | |||
| @@ -823,16 +823,16 @@ static int mxt_check_matrix_size(struct mxt_data *data) | |||
| 823 | static int mxt_make_highchg(struct mxt_data *data) | 823 | static int mxt_make_highchg(struct mxt_data *data) |
| 824 | { | 824 | { |
| 825 | struct device *dev = &data->client->dev; | 825 | struct device *dev = &data->client->dev; |
| 826 | struct mxt_message message; | ||
| 826 | int count = 10; | 827 | int count = 10; |
| 827 | int error; | 828 | int error; |
| 828 | u8 val; | ||
| 829 | 829 | ||
| 830 | /* Read dummy message to make high CHG pin */ | 830 | /* Read dummy message to make high CHG pin */ |
| 831 | do { | 831 | do { |
| 832 | error = mxt_read_object(data, MXT_GEN_MESSAGE, 0, &val); | 832 | error = mxt_read_message(data, &message); |
| 833 | if (error) | 833 | if (error) |
| 834 | return error; | 834 | return error; |
| 835 | } while ((val != 0xff) && --count); | 835 | } while (message.reportid != 0xff && --count); |
| 836 | 836 | ||
| 837 | if (!count) { | 837 | if (!count) { |
| 838 | dev_err(dev, "CHG pin isn't cleared\n"); | 838 | dev_err(dev, "CHG pin isn't cleared\n"); |
