Commit ebd97545 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull input fixes from Dmitry Torokhov:

 - INPUT_PROP_HAPTIC_TOUCHPAD definition added early in 6.18 cycle has
   been renamed to INPUT_PROP_PRESSUREPAD to better reflect the kind of
   devices it is supposed to be set for

 - a new ID for a touchscreen found in Ayaneo Flip DS in Goodix driver

 - Goodix driver no longer tries to set reset pin as "input" as it
   causes issues when there is no pull up resistor installed on the
   board

 - fixes for cros_ec_keyb, imx_sc_key, and pegasus-notetaker drivers to
   deal with potential out-of-bounds access and memory corruption issues

* tag 'input-for-v6.18-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: rename INPUT_PROP_HAPTIC_TOUCHPAD to INPUT_PROP_PRESSUREPAD
  Input: cros_ec_keyb - fix an invalid memory access
  Input: imx_sc_key - fix memory corruption on unload
  Input: pegasus-notetaker - fix potential out-of-bounds access
  Input: goodix - remove setting of RST pin to input
  Input: goodix - add support for ACPI ID GDIX1003
parents a6ff0d85 ae8966b7
Loading
Loading
Loading
Loading
+18 −7
Original line number Diff line number Diff line
@@ -400,19 +400,30 @@ can report through the rotational axes (absolute and/or relative rx, ry, rz).
All other axes retain their meaning. A device must not mix
regular directional axes and accelerometer axes on the same event node.

INPUT_PROP_HAPTIC_TOUCHPAD
--------------------------
INPUT_PROP_PRESSUREPAD
----------------------

The INPUT_PROP_PRESSUREPAD property indicates that the device provides
simulated haptic feedback (e.g. a vibrator motor situated below the surface)
instead of physical haptic feedback (e.g. a hinge). This property is only set
if the device:

The INPUT_PROP_HAPTIC_TOUCHPAD property indicates that device:
- supports simple haptic auto and manual triggering
- can differentiate between at least 5 fingers
- uses correct resolution for the X/Y (units and value)
- reports correct force per touch, and correct units for them (newtons or grams)
- follows the MT protocol type B

If the simulated haptic feedback is controllable by userspace the device must:

- support simple haptic auto and manual triggering, and
- report correct force per touch, and correct units for them (newtons or grams), and
- provide the EV_FF FF_HAPTIC force feedback effect.

Summing up, such devices follow the MS spec for input devices in
Win8 and Win8.1, and in addition support the Simple haptic controller HID table,
and report correct units for the pressure.
Win8 and Win8.1, and in addition may support the Simple haptic controller HID
table, and report correct units for the pressure.

Where applicable, this property is set in addition to INPUT_PROP_BUTTONPAD, it
does not replace that property.

Guidelines
==========
+1 −1
Original line number Diff line number Diff line
@@ -86,7 +86,7 @@ int hid_haptic_input_configured(struct hid_device *hdev,
	if (hi->application == HID_DG_TOUCHPAD) {
		if (haptic->auto_trigger_report &&
		    haptic->manual_trigger_report) {
			__set_bit(INPUT_PROP_HAPTIC_TOUCHPAD, hi->input->propbit);
			__set_bit(INPUT_PROP_PRESSUREPAD, hi->input->propbit);
			return 1;
		}
		return 0;
+6 −0
Original line number Diff line number Diff line
@@ -261,6 +261,12 @@ static int cros_ec_keyb_work(struct notifier_block *nb,
	case EC_MKBP_EVENT_KEY_MATRIX:
		pm_wakeup_event(ckdev->dev, 0);

		if (!ckdev->idev) {
			dev_warn_once(ckdev->dev,
				      "Unexpected key matrix event\n");
			return NOTIFY_OK;
		}

		if (ckdev->ec->event_size != ckdev->cols) {
			dev_err(ckdev->dev,
				"Discarded incomplete key matrix event.\n");
+1 −1
Original line number Diff line number Diff line
@@ -158,7 +158,7 @@ static int imx_sc_key_probe(struct platform_device *pdev)
		return error;
	}

	error = devm_add_action_or_reset(&pdev->dev, imx_sc_key_action, &priv);
	error = devm_add_action_or_reset(&pdev->dev, imx_sc_key_action, priv);
	if (error)
		return error;

+9 −0
Original line number Diff line number Diff line
@@ -63,6 +63,9 @@
#define BUTTON_PRESSED			0xb5
#define COMMAND_VERSION			0xa9

/* 1 Status + 1 Color + 2 X + 2 Y = 6 bytes */
#define NOTETAKER_PACKET_SIZE		6

/* in xy data packet */
#define BATTERY_NO_REPORT		0x40
#define BATTERY_LOW			0x41
@@ -311,6 +314,12 @@ static int pegasus_probe(struct usb_interface *intf,
	}

	pegasus->data_len = usb_maxpacket(dev, pipe);
	if (pegasus->data_len < NOTETAKER_PACKET_SIZE) {
		dev_err(&intf->dev, "packet size is too small (%d)\n",
			pegasus->data_len);
		error = -EINVAL;
		goto err_free_mem;
	}

	pegasus->data = usb_alloc_coherent(dev, pegasus->data_len, GFP_KERNEL,
					   &pegasus->data_dma);
Loading