Commit 4b6920ba authored by Linus Torvalds's avatar Linus Torvalds
Browse files
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
parents bed3c0d8 9843f3e0
Loading
Loading
Loading
Loading
+14 −4
Original line number Diff line number Diff line
@@ -526,11 +526,12 @@ static int imx_keypad_probe(struct platform_device *pdev)
	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 imx_keypad *kbd = platform_get_drvdata(pdev);
	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 */
	mutex_lock(&input_dev->mutex);
@@ -540,13 +541,20 @@ static int __maybe_unused imx_kbd_suspend(struct device *dev)

	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);
	}

	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 imx_keypad *kbd = platform_get_drvdata(pdev);
@@ -570,7 +578,9 @@ static int __maybe_unused imx_kbd_resume(struct device *dev)
	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 = {
	.driver		= {
+20 −2
Original line number Diff line number Diff line
@@ -1038,13 +1038,31 @@ static long uinput_ioctl(struct file *file, unsigned int cmd, unsigned long arg)

#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,
				unsigned int cmd, unsigned long arg)
{
	if (cmd == UI_SET_PHYS_COMPAT)
	switch (cmd) {
	case UI_SET_PHYS_COMPAT:
		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));
}
+2 −0
Original line number Diff line number Diff line
@@ -981,6 +981,8 @@ static irqreturn_t elan_isr(int irq, void *dev_id)
	if (error)
		goto out;

	pm_wakeup_event(dev, 0);

	switch (report[ETP_REPORT_ID_OFFSET]) {
	case ETP_REPORT_ID:
		elan_report_absolute(data, report);
+2 −0
Original line number Diff line number Diff line
@@ -1189,6 +1189,8 @@ static const char * const middle_button_pnp_ids[] = {
	"LEN2132", /* ThinkPad P52 */
	"LEN2133", /* ThinkPad P72 w/ NFC */
	"LEN2134", /* ThinkPad P72 */
	"LEN0407",
	"LEN0408",
	NULL
};

+2 −0
Original line number Diff line number Diff line
@@ -179,6 +179,8 @@ static const char * const smbus_pnp_ids[] = {
	"LEN0096", /* X280 */
	"LEN0097", /* X280 -> ALPS trackpoint */
	"LEN200f", /* T450s */
	"LEN2054", /* E480 */
	"LEN2055", /* E580 */
	"SYN3052", /* HP EliteBook 840 G4 */
	"SYN3221", /* HP 15-ay000 */
	NULL
Loading