mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-22 04:03:58 +08:00
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull input fixes from Dmitry Torokhov. * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: atmel_mxt_ts - use mxt_acquire_irq in mxt_soft_reset Input: zforce_ts - fix dual touch recognition Input: twl6040-vibra - fix atomic schedule panic
This commit is contained in:
commit
21a9703de3
@ -181,6 +181,14 @@ static void vibra_play_work(struct work_struct *work)
|
||||
{
|
||||
struct vibra_info *info = container_of(work,
|
||||
struct vibra_info, play_work);
|
||||
int ret;
|
||||
|
||||
/* Do not allow effect, while the routing is set to use audio */
|
||||
ret = twl6040_get_vibralr_status(info->twl6040);
|
||||
if (ret & TWL6040_VIBSEL) {
|
||||
dev_info(info->dev, "Vibra is configured for audio\n");
|
||||
return;
|
||||
}
|
||||
|
||||
mutex_lock(&info->mutex);
|
||||
|
||||
@ -199,14 +207,6 @@ static int vibra_play(struct input_dev *input, void *data,
|
||||
struct ff_effect *effect)
|
||||
{
|
||||
struct vibra_info *info = input_get_drvdata(input);
|
||||
int ret;
|
||||
|
||||
/* Do not allow effect, while the routing is set to use audio */
|
||||
ret = twl6040_get_vibralr_status(info->twl6040);
|
||||
if (ret & TWL6040_VIBSEL) {
|
||||
dev_info(&input->dev, "Vibra is configured for audio\n");
|
||||
return -EBUSY;
|
||||
}
|
||||
|
||||
info->weak_speed = effect->u.rumble.weak_magnitude;
|
||||
info->strong_speed = effect->u.rumble.strong_magnitude;
|
||||
|
@ -1093,6 +1093,19 @@ static int mxt_t6_command(struct mxt_data *data, u16 cmd_offset,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int mxt_acquire_irq(struct mxt_data *data)
|
||||
{
|
||||
int error;
|
||||
|
||||
enable_irq(data->irq);
|
||||
|
||||
error = mxt_process_messages_until_invalid(data);
|
||||
if (error)
|
||||
return error;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int mxt_soft_reset(struct mxt_data *data)
|
||||
{
|
||||
struct device *dev = &data->client->dev;
|
||||
@ -1111,7 +1124,7 @@ static int mxt_soft_reset(struct mxt_data *data)
|
||||
/* Ignore CHG line for 100ms after reset */
|
||||
msleep(100);
|
||||
|
||||
enable_irq(data->irq);
|
||||
mxt_acquire_irq(data);
|
||||
|
||||
ret = mxt_wait_for_completion(data, &data->reset_completion,
|
||||
MXT_RESET_TIMEOUT);
|
||||
@ -1466,19 +1479,6 @@ release_mem:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int mxt_acquire_irq(struct mxt_data *data)
|
||||
{
|
||||
int error;
|
||||
|
||||
enable_irq(data->irq);
|
||||
|
||||
error = mxt_process_messages_until_invalid(data);
|
||||
if (error)
|
||||
return error;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int mxt_get_info(struct mxt_data *data)
|
||||
{
|
||||
struct i2c_client *client = data->client;
|
||||
|
@ -370,8 +370,8 @@ static int zforce_touch_event(struct zforce_ts *ts, u8 *payload)
|
||||
point.coord_x = point.coord_y = 0;
|
||||
}
|
||||
|
||||
point.state = payload[9 * i + 5] & 0x03;
|
||||
point.id = (payload[9 * i + 5] & 0xfc) >> 2;
|
||||
point.state = payload[9 * i + 5] & 0x0f;
|
||||
point.id = (payload[9 * i + 5] & 0xf0) >> 4;
|
||||
|
||||
/* determine touch major, minor and orientation */
|
||||
point.area_major = max(payload[9 * i + 6],
|
||||
|
Loading…
Reference in New Issue
Block a user