diff options
-rw-r--r-- | drivers/input/misc/twl6040-vibra.c | 16 | ||||
-rw-r--r-- | drivers/input/touchscreen/atmel_mxt_ts.c | 28 | ||||
-rw-r--r-- | drivers/input/touchscreen/zforce_ts.c | 4 |
3 files changed, 24 insertions, 24 deletions
diff --git a/drivers/input/misc/twl6040-vibra.c b/drivers/input/misc/twl6040-vibra.c index 53e33fab3f7a..df3581f60628 100644 --- a/drivers/input/misc/twl6040-vibra.c +++ b/drivers/input/misc/twl6040-vibra.c | |||
@@ -181,6 +181,14 @@ static void vibra_play_work(struct work_struct *work) | |||
181 | { | 181 | { |
182 | struct vibra_info *info = container_of(work, | 182 | struct vibra_info *info = container_of(work, |
183 | struct vibra_info, play_work); | 183 | struct vibra_info, play_work); |
184 | int ret; | ||
185 | |||
186 | /* Do not allow effect, while the routing is set to use audio */ | ||
187 | ret = twl6040_get_vibralr_status(info->twl6040); | ||
188 | if (ret & TWL6040_VIBSEL) { | ||
189 | dev_info(info->dev, "Vibra is configured for audio\n"); | ||
190 | return; | ||
191 | } | ||
184 | 192 | ||
185 | mutex_lock(&info->mutex); | 193 | mutex_lock(&info->mutex); |
186 | 194 | ||
@@ -199,14 +207,6 @@ static int vibra_play(struct input_dev *input, void *data, | |||
199 | struct ff_effect *effect) | 207 | struct ff_effect *effect) |
200 | { | 208 | { |
201 | struct vibra_info *info = input_get_drvdata(input); | 209 | struct vibra_info *info = input_get_drvdata(input); |
202 | int ret; | ||
203 | |||
204 | /* Do not allow effect, while the routing is set to use audio */ | ||
205 | ret = twl6040_get_vibralr_status(info->twl6040); | ||
206 | if (ret & TWL6040_VIBSEL) { | ||
207 | dev_info(&input->dev, "Vibra is configured for audio\n"); | ||
208 | return -EBUSY; | ||
209 | } | ||
210 | 210 | ||
211 | info->weak_speed = effect->u.rumble.weak_magnitude; | 211 | info->weak_speed = effect->u.rumble.weak_magnitude; |
212 | info->strong_speed = effect->u.rumble.strong_magnitude; | 212 | info->strong_speed = effect->u.rumble.strong_magnitude; |
diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c index 2160512e861a..5af7907d0af4 100644 --- a/drivers/input/touchscreen/atmel_mxt_ts.c +++ b/drivers/input/touchscreen/atmel_mxt_ts.c | |||
@@ -1093,6 +1093,19 @@ static int mxt_t6_command(struct mxt_data *data, u16 cmd_offset, | |||
1093 | return 0; | 1093 | return 0; |
1094 | } | 1094 | } |
1095 | 1095 | ||
1096 | static int mxt_acquire_irq(struct mxt_data *data) | ||
1097 | { | ||
1098 | int error; | ||
1099 | |||
1100 | enable_irq(data->irq); | ||
1101 | |||
1102 | error = mxt_process_messages_until_invalid(data); | ||
1103 | if (error) | ||
1104 | return error; | ||
1105 | |||
1106 | return 0; | ||
1107 | } | ||
1108 | |||
1096 | static int mxt_soft_reset(struct mxt_data *data) | 1109 | static int mxt_soft_reset(struct mxt_data *data) |
1097 | { | 1110 | { |
1098 | struct device *dev = &data->client->dev; | 1111 | struct device *dev = &data->client->dev; |
@@ -1111,7 +1124,7 @@ static int mxt_soft_reset(struct mxt_data *data) | |||
1111 | /* Ignore CHG line for 100ms after reset */ | 1124 | /* Ignore CHG line for 100ms after reset */ |
1112 | msleep(100); | 1125 | msleep(100); |
1113 | 1126 | ||
1114 | enable_irq(data->irq); | 1127 | mxt_acquire_irq(data); |
1115 | 1128 | ||
1116 | ret = mxt_wait_for_completion(data, &data->reset_completion, | 1129 | ret = mxt_wait_for_completion(data, &data->reset_completion, |
1117 | MXT_RESET_TIMEOUT); | 1130 | MXT_RESET_TIMEOUT); |
@@ -1466,19 +1479,6 @@ release_mem: | |||
1466 | return ret; | 1479 | return ret; |
1467 | } | 1480 | } |
1468 | 1481 | ||
1469 | static int mxt_acquire_irq(struct mxt_data *data) | ||
1470 | { | ||
1471 | int error; | ||
1472 | |||
1473 | enable_irq(data->irq); | ||
1474 | |||
1475 | error = mxt_process_messages_until_invalid(data); | ||
1476 | if (error) | ||
1477 | return error; | ||
1478 | |||
1479 | return 0; | ||
1480 | } | ||
1481 | |||
1482 | static int mxt_get_info(struct mxt_data *data) | 1482 | static int mxt_get_info(struct mxt_data *data) |
1483 | { | 1483 | { |
1484 | struct i2c_client *client = data->client; | 1484 | struct i2c_client *client = data->client; |
diff --git a/drivers/input/touchscreen/zforce_ts.c b/drivers/input/touchscreen/zforce_ts.c index 9bbadaaf6bc3..7b3845aa5983 100644 --- a/drivers/input/touchscreen/zforce_ts.c +++ b/drivers/input/touchscreen/zforce_ts.c | |||
@@ -370,8 +370,8 @@ static int zforce_touch_event(struct zforce_ts *ts, u8 *payload) | |||
370 | point.coord_x = point.coord_y = 0; | 370 | point.coord_x = point.coord_y = 0; |
371 | } | 371 | } |
372 | 372 | ||
373 | point.state = payload[9 * i + 5] & 0x03; | 373 | point.state = payload[9 * i + 5] & 0x0f; |
374 | point.id = (payload[9 * i + 5] & 0xfc) >> 2; | 374 | point.id = (payload[9 * i + 5] & 0xf0) >> 4; |
375 | 375 | ||
376 | /* determine touch major, minor and orientation */ | 376 | /* determine touch major, minor and orientation */ |
377 | point.area_major = max(payload[9 * i + 6], | 377 | point.area_major = max(payload[9 * i + 6], |