Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 073c916b authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull input updates from Dmitry Torokhov:

 - an update to Elan touchpad SMBus driver to fetch device parameters
   (size, resolution) while it is still in PS/2 mode, before switching
   over to SMBus, as in that mode some devices return garbage dimensions

 - update to iforce joystick driver

 - miscellaneous driver fixes

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (48 commits)
  Input: gpio_keys_polled - allow specifying name of input device
  Input: edt-ft5x06 - simplify event reporting code
  Input: max77650-onkey - add MODULE_ALIAS()
  Input: atmel_mxt_ts - fix leak in mxt_update_cfg()
  Input: synaptics - enable SMBUS on T480 thinkpad trackpad
  Input: atmel_mxt_ts - fix -Wunused-const-variable
  Input: joydev - extend absolute mouse detection
  HID: quirks: Refactor ELAN 400 and 401 handling
  Input: elan_i2c - export the device id whitelist
  Input: edt-ft5x06 - use get_unaligned_be16()
  Input: iforce - add the Saitek R440 Force Wheel
  Input: iforce - use unaligned accessors, where appropriate
  Input: iforce - drop couple of temps from transport code
  Input: iforce - drop bus type from iforce structure
  Input: iforce - use DMA-safe buffores for USB transfers
  Input: iforce - allow callers supply data buffer when fetching device IDs
  Input: iforce - only call iforce_process_packet() if initialized
  Input: iforce - signal command completion from transport code
  Input: iforce - do not combine arguments for iforce_process_packet()
  Input: iforce - factor out hat handling when parsing packets
  ...
parents a2d79c71 59747372
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -13,9 +13,20 @@ Optional properties:
  pinctrl binding [1]).
- vcc-supply: a phandle for the regulator supplying 3.3V power.
- elan,trackpoint: touchpad can support a trackpoint (boolean)
- elan,clickpad: touchpad is a clickpad (the entire surface is a button)
- elan,middle-button: touchpad has a physical middle button
- elan,x_traces: number of antennas on the x axis
- elan,y_traces: number of antennas on the y axis
- some generic touchscreen properties [2]:
  * touchscreen-size-x
  * touchscreen-size-y
  * touchscreen-x-mm
  * touchscreen-y-mm


[0]: Documentation/devicetree/bindings/interrupt-controller/interrupts.txt
[1]: Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt
[2]: Documentation/devicetree/bindings/input/touchscreen/touchscreen.txt

Example:
	&i2c1 {
+11 −11
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@
#include <linux/export.h>
#include <linux/slab.h>
#include <linux/mutex.h>
#include <linux/input/elan-i2c-ids.h>

#include "hid-ids.h"

@@ -916,6 +917,8 @@ static const struct hid_device_id hid_mouse_ignore_list[] = {

bool hid_ignore(struct hid_device *hdev)
{
	int i;

	if (hdev->quirks & HID_QUIRK_NO_IGNORE)
		return false;
	if (hdev->quirks & HID_QUIRK_IGNORE)
@@ -980,17 +983,14 @@ bool hid_ignore(struct hid_device *hdev)
		break;
	case USB_VENDOR_ID_ELAN:
		/*
		 * Many Elan devices have a product id of 0x0401 and are handled
		 * by the elan_i2c input driver. But the ACPI HID ELAN0800 dev
		 * is not (and cannot be) handled by that driver ->
		 * Ignore all 0x0401 devs except for the ELAN0800 dev.
		 * Blacklist of everything that gets handled by the elan_i2c
		 * input driver.  This avoids disabling valid touchpads and
		 * other ELAN devices.
		 */
		if (hdev->product == 0x0401 &&
		    strncmp(hdev->name, "ELAN0800", 8) != 0)
			return true;
		/* Same with product id 0x0400 */
		if (hdev->product == 0x0400 &&
		    strncmp(hdev->name, "QTEC0001", 8) != 0)
		if ((hdev->product == 0x0401 || hdev->product == 0x0400))
			for (i = 0; strlen(elan_acpi_id[i].id); ++i)
				if (!strncmp(hdev->name, elan_acpi_id[i].id,
					     strlen(elan_acpi_id[i].id)))
					return true;
		break;
	}
+22 −2
Original line number Diff line number Diff line
@@ -808,6 +808,7 @@ static bool joydev_dev_is_blacklisted(struct input_dev *dev)
static bool joydev_dev_is_absolute_mouse(struct input_dev *dev)
{
	DECLARE_BITMAP(jd_scratch, KEY_CNT);
	bool ev_match = false;

	BUILD_BUG_ON(ABS_CNT > KEY_CNT || EV_CNT > KEY_CNT);

@@ -826,17 +827,36 @@ static bool joydev_dev_is_absolute_mouse(struct input_dev *dev)
	 * considered to be an absolute mouse if the following is
	 * true:
	 *
	 * 1) Event types are exactly EV_ABS, EV_KEY and EV_SYN.
	 * 1) Event types are exactly
	 *      EV_ABS, EV_KEY and EV_SYN
	 *    or
	 *      EV_ABS, EV_KEY, EV_SYN and EV_MSC
	 *    or
	 *      EV_ABS, EV_KEY, EV_SYN, EV_MSC and EV_REL.
	 * 2) Absolute events are exactly ABS_X and ABS_Y.
	 * 3) Keys are exactly BTN_LEFT, BTN_RIGHT and BTN_MIDDLE.
	 * 4) Device is not on "Amiga" bus.
	 */

	bitmap_zero(jd_scratch, EV_CNT);
	/* VMware VMMouse, HP ILO2 */
	__set_bit(EV_ABS, jd_scratch);
	__set_bit(EV_KEY, jd_scratch);
	__set_bit(EV_SYN, jd_scratch);
	if (!bitmap_equal(jd_scratch, dev->evbit, EV_CNT))
	if (bitmap_equal(jd_scratch, dev->evbit, EV_CNT))
		ev_match = true;

	/* HP ILO2, AMI BMC firmware */
	__set_bit(EV_MSC, jd_scratch);
	if (bitmap_equal(jd_scratch, dev->evbit, EV_CNT))
		ev_match = true;

	/* VMware Virtual USB Mouse, QEMU USB Tablet, ATEN BMC firmware */
	__set_bit(EV_REL, jd_scratch);
	if (bitmap_equal(jd_scratch, dev->evbit, EV_CNT))
		ev_match = true;

	if (!ev_match)
		return false;

	bitmap_zero(jd_scratch, ABS_CNT);
+4 −4
Original line number Diff line number Diff line
@@ -14,15 +14,15 @@ config JOYSTICK_IFORCE
	  module will be called iforce.

config JOYSTICK_IFORCE_USB
	bool "I-Force USB joysticks and wheels"
	depends on JOYSTICK_IFORCE && (JOYSTICK_IFORCE=m || USB=y) && USB
	tristate "I-Force USB joysticks and wheels"
	depends on JOYSTICK_IFORCE && USB
	help
	  Say Y here if you have an I-Force joystick or steering wheel
	  connected to your USB port.

config JOYSTICK_IFORCE_232
	bool "I-Force Serial joysticks and wheels"
	depends on JOYSTICK_IFORCE && (JOYSTICK_IFORCE=m || SERIO=y) && SERIO
	tristate "I-Force Serial joysticks and wheels"
	depends on JOYSTICK_IFORCE && SERIO
	help
	  Say Y here if you have an I-Force joystick or steering wheel
	  connected to your serial (COM) port.
+3 −4
Original line number Diff line number Diff line
@@ -6,7 +6,6 @@
#

obj-$(CONFIG_JOYSTICK_IFORCE)		+= iforce.o

iforce-y := iforce-ff.o iforce-main.o iforce-packets.o
iforce-$(CONFIG_JOYSTICK_IFORCE_232)	+= iforce-serio.o
iforce-$(CONFIG_JOYSTICK_IFORCE_USB)	+= iforce-usb.o
obj-$(CONFIG_JOYSTICK_IFORCE_232)	+= iforce-serio.o
obj-$(CONFIG_JOYSTICK_IFORCE_USB)	+= iforce-usb.o
Loading