Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull input updates from Dmitry Torokhov: "Just a few small fixups and switching a couple of Thinkpads to SMBus for touchpads as PS/2 emulation is not working well" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: synaptics - enable SMBus on ThinkPad E480 and E580 Input: imx_keypad - make sure keyboard can always wake up system Input: iqs5xx - get axis info before calling input_mt_init_slots() Input: uinput - add compat ioctl number translation for UI_*_FF_UPLOAD Input: silead - add MSSL0017 to acpi_device_id Input: elantech - enable middle button support on 2 ThinkPads Input: elan_i2c - increment wakeup count if wake source
This commit is contained in:
@@ -526,11 +526,12 @@ static int imx_keypad_probe(struct platform_device *pdev)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int __maybe_unused imx_kbd_suspend(struct device *dev)
|
static int __maybe_unused imx_kbd_noirq_suspend(struct device *dev)
|
||||||
{
|
{
|
||||||
struct platform_device *pdev = to_platform_device(dev);
|
struct platform_device *pdev = to_platform_device(dev);
|
||||||
struct imx_keypad *kbd = platform_get_drvdata(pdev);
|
struct imx_keypad *kbd = platform_get_drvdata(pdev);
|
||||||
struct input_dev *input_dev = kbd->input_dev;
|
struct input_dev *input_dev = kbd->input_dev;
|
||||||
|
unsigned short reg_val = readw(kbd->mmio_base + KPSR);
|
||||||
|
|
||||||
/* imx kbd can wake up system even clock is disabled */
|
/* imx kbd can wake up system even clock is disabled */
|
||||||
mutex_lock(&input_dev->mutex);
|
mutex_lock(&input_dev->mutex);
|
||||||
@@ -540,13 +541,20 @@ static int __maybe_unused imx_kbd_suspend(struct device *dev)
|
|||||||
|
|
||||||
mutex_unlock(&input_dev->mutex);
|
mutex_unlock(&input_dev->mutex);
|
||||||
|
|
||||||
if (device_may_wakeup(&pdev->dev))
|
if (device_may_wakeup(&pdev->dev)) {
|
||||||
|
if (reg_val & KBD_STAT_KPKD)
|
||||||
|
reg_val |= KBD_STAT_KRIE;
|
||||||
|
if (reg_val & KBD_STAT_KPKR)
|
||||||
|
reg_val |= KBD_STAT_KDIE;
|
||||||
|
writew(reg_val, kbd->mmio_base + KPSR);
|
||||||
|
|
||||||
enable_irq_wake(kbd->irq);
|
enable_irq_wake(kbd->irq);
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int __maybe_unused imx_kbd_resume(struct device *dev)
|
static int __maybe_unused imx_kbd_noirq_resume(struct device *dev)
|
||||||
{
|
{
|
||||||
struct platform_device *pdev = to_platform_device(dev);
|
struct platform_device *pdev = to_platform_device(dev);
|
||||||
struct imx_keypad *kbd = platform_get_drvdata(pdev);
|
struct imx_keypad *kbd = platform_get_drvdata(pdev);
|
||||||
@@ -570,7 +578,9 @@ err_clk:
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static SIMPLE_DEV_PM_OPS(imx_kbd_pm_ops, imx_kbd_suspend, imx_kbd_resume);
|
static const struct dev_pm_ops imx_kbd_pm_ops = {
|
||||||
|
SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(imx_kbd_noirq_suspend, imx_kbd_noirq_resume)
|
||||||
|
};
|
||||||
|
|
||||||
static struct platform_driver imx_keypad_driver = {
|
static struct platform_driver imx_keypad_driver = {
|
||||||
.driver = {
|
.driver = {
|
||||||
|
|||||||
@@ -1038,13 +1038,31 @@ static long uinput_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
|
|||||||
|
|
||||||
#ifdef CONFIG_COMPAT
|
#ifdef CONFIG_COMPAT
|
||||||
|
|
||||||
#define UI_SET_PHYS_COMPAT _IOW(UINPUT_IOCTL_BASE, 108, compat_uptr_t)
|
/*
|
||||||
|
* These IOCTLs change their size and thus their numbers between
|
||||||
|
* 32 and 64 bits.
|
||||||
|
*/
|
||||||
|
#define UI_SET_PHYS_COMPAT \
|
||||||
|
_IOW(UINPUT_IOCTL_BASE, 108, compat_uptr_t)
|
||||||
|
#define UI_BEGIN_FF_UPLOAD_COMPAT \
|
||||||
|
_IOWR(UINPUT_IOCTL_BASE, 200, struct uinput_ff_upload_compat)
|
||||||
|
#define UI_END_FF_UPLOAD_COMPAT \
|
||||||
|
_IOW(UINPUT_IOCTL_BASE, 201, struct uinput_ff_upload_compat)
|
||||||
|
|
||||||
static long uinput_compat_ioctl(struct file *file,
|
static long uinput_compat_ioctl(struct file *file,
|
||||||
unsigned int cmd, unsigned long arg)
|
unsigned int cmd, unsigned long arg)
|
||||||
{
|
{
|
||||||
if (cmd == UI_SET_PHYS_COMPAT)
|
switch (cmd) {
|
||||||
|
case UI_SET_PHYS_COMPAT:
|
||||||
cmd = UI_SET_PHYS;
|
cmd = UI_SET_PHYS;
|
||||||
|
break;
|
||||||
|
case UI_BEGIN_FF_UPLOAD_COMPAT:
|
||||||
|
cmd = UI_BEGIN_FF_UPLOAD;
|
||||||
|
break;
|
||||||
|
case UI_END_FF_UPLOAD_COMPAT:
|
||||||
|
cmd = UI_END_FF_UPLOAD;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
return uinput_ioctl_handler(file, cmd, arg, compat_ptr(arg));
|
return uinput_ioctl_handler(file, cmd, arg, compat_ptr(arg));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -981,6 +981,8 @@ static irqreturn_t elan_isr(int irq, void *dev_id)
|
|||||||
if (error)
|
if (error)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
|
pm_wakeup_event(dev, 0);
|
||||||
|
|
||||||
switch (report[ETP_REPORT_ID_OFFSET]) {
|
switch (report[ETP_REPORT_ID_OFFSET]) {
|
||||||
case ETP_REPORT_ID:
|
case ETP_REPORT_ID:
|
||||||
elan_report_absolute(data, report);
|
elan_report_absolute(data, report);
|
||||||
|
|||||||
@@ -1189,6 +1189,8 @@ static const char * const middle_button_pnp_ids[] = {
|
|||||||
"LEN2132", /* ThinkPad P52 */
|
"LEN2132", /* ThinkPad P52 */
|
||||||
"LEN2133", /* ThinkPad P72 w/ NFC */
|
"LEN2133", /* ThinkPad P72 w/ NFC */
|
||||||
"LEN2134", /* ThinkPad P72 */
|
"LEN2134", /* ThinkPad P72 */
|
||||||
|
"LEN0407",
|
||||||
|
"LEN0408",
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -179,6 +179,8 @@ static const char * const smbus_pnp_ids[] = {
|
|||||||
"LEN0096", /* X280 */
|
"LEN0096", /* X280 */
|
||||||
"LEN0097", /* X280 -> ALPS trackpoint */
|
"LEN0097", /* X280 -> ALPS trackpoint */
|
||||||
"LEN200f", /* T450s */
|
"LEN200f", /* T450s */
|
||||||
|
"LEN2054", /* E480 */
|
||||||
|
"LEN2055", /* E580 */
|
||||||
"SYN3052", /* HP EliteBook 840 G4 */
|
"SYN3052", /* HP EliteBook 840 G4 */
|
||||||
"SYN3221", /* HP 15-ay000 */
|
"SYN3221", /* HP 15-ay000 */
|
||||||
NULL
|
NULL
|
||||||
|
|||||||
@@ -502,14 +502,6 @@ static int iqs5xx_axis_init(struct i2c_client *client)
|
|||||||
input_set_capability(input, EV_ABS, ABS_MT_POSITION_Y);
|
input_set_capability(input, EV_ABS, ABS_MT_POSITION_Y);
|
||||||
input_set_capability(input, EV_ABS, ABS_MT_PRESSURE);
|
input_set_capability(input, EV_ABS, ABS_MT_PRESSURE);
|
||||||
|
|
||||||
error = input_mt_init_slots(input,
|
|
||||||
IQS5XX_NUM_CONTACTS, INPUT_MT_DIRECT);
|
|
||||||
if (error) {
|
|
||||||
dev_err(&client->dev,
|
|
||||||
"Failed to initialize slots: %d\n", error);
|
|
||||||
return error;
|
|
||||||
}
|
|
||||||
|
|
||||||
input_set_drvdata(input, iqs5xx);
|
input_set_drvdata(input, iqs5xx);
|
||||||
iqs5xx->input = input;
|
iqs5xx->input = input;
|
||||||
}
|
}
|
||||||
@@ -591,9 +583,19 @@ static int iqs5xx_axis_init(struct i2c_client *client)
|
|||||||
if (error)
|
if (error)
|
||||||
return error;
|
return error;
|
||||||
|
|
||||||
return iqs5xx_write_word(client,
|
error = iqs5xx_write_word(client,
|
||||||
prop.swap_x_y ? IQS5XX_X_RES : IQS5XX_Y_RES,
|
prop.swap_x_y ? IQS5XX_X_RES : IQS5XX_Y_RES,
|
||||||
max_y);
|
max_y);
|
||||||
|
if (error)
|
||||||
|
return error;
|
||||||
|
|
||||||
|
error = input_mt_init_slots(iqs5xx->input, IQS5XX_NUM_CONTACTS,
|
||||||
|
INPUT_MT_DIRECT);
|
||||||
|
if (error)
|
||||||
|
dev_err(&client->dev, "Failed to initialize slots: %d\n",
|
||||||
|
error);
|
||||||
|
|
||||||
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int iqs5xx_dev_init(struct i2c_client *client)
|
static int iqs5xx_dev_init(struct i2c_client *client)
|
||||||
|
|||||||
@@ -609,6 +609,7 @@ static const struct acpi_device_id silead_ts_acpi_match[] = {
|
|||||||
{ "MSSL1680", 0 },
|
{ "MSSL1680", 0 },
|
||||||
{ "MSSL0001", 0 },
|
{ "MSSL0001", 0 },
|
||||||
{ "MSSL0002", 0 },
|
{ "MSSL0002", 0 },
|
||||||
|
{ "MSSL0017", 0 },
|
||||||
{ }
|
{ }
|
||||||
};
|
};
|
||||||
MODULE_DEVICE_TABLE(acpi, silead_ts_acpi_match);
|
MODULE_DEVICE_TABLE(acpi, silead_ts_acpi_match);
|
||||||
|
|||||||
Reference in New Issue
Block a user