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

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

 - the main change is a fix for my brain-dead patch to PS/2 button
   reporting for some protocols that made it in 4.17

 - there is a new driver for Spreadtum vibrator that I intended to send
   during merge window but ended up not sending the 2nd pull request.
   Given that this is a brand new driver we should not see regressions
   here

 - a fixup to Elantech PS/2 driver to avoid decoding errors on Thinkpad
   P52

 - addition of few more ACPI IDs for Silead and Elan drivers

 - RMI4 is switched to using IRQ domain code instead of rolling its own
   implementation

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: psmouse - fix button reporting for basic protocols
  Input: xpad - fix GPD Win 2 controller name
  Input: elan_i2c_smbus - fix more potential stack buffer overflows
  Input: elan_i2c - add ELAN0618 (Lenovo v330 15IKB) ACPI ID
  Input: elantech - fix V4 report decoding for module with middle key
  Input: elantech - enable middle button of touchpads on ThinkPad P52
  Input: do not assign new tracking ID when changing tool type
  Input: make input_report_slot_state() return boolean
  Input: synaptics-rmi4 - fix axis-swap behavior
  Input: synaptics-rmi4 - fix the error return code in rmi_probe_interrupts()
  Input: synaptics-rmi4 - convert irq distribution to irq_domain
  Input: silead - add MSSL0002 ACPI HID
  Input: goldfish_events - fix checkpatch warnings
  Input: add Spreadtrum vibrator driver
parents 896a3492 03ae3a9c
Loading
Loading
Loading
Loading
+23 −0
Original line number Diff line number Diff line
Spreadtrum SC27xx PMIC Vibrator

Required properties:
- compatible: should be "sprd,sc2731-vibrator".
- reg: address of vibrator control register.

Example :

	sc2731_pmic: pmic@0 {
		compatible = "sprd,sc2731";
		reg = <0>;
		spi-max-frequency = <26000000>;
		interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
		interrupt-controller;
		#interrupt-cells = <2>;
		#address-cells = <1>;
		#size-cells = <0>;

		vibrator@eb4 {
			compatible = "sprd,sc2731-vibrator";
			reg = <0xeb4>;
		};
	};
+8 −4
Original line number Diff line number Diff line
@@ -131,8 +131,10 @@ EXPORT_SYMBOL(input_mt_destroy_slots);
 * inactive, or if the tool type is changed, a new tracking id is
 * assigned to the slot. The tool type is only reported if the
 * corresponding absbit field is set.
 *
 * Returns true if contact is active.
 */
void input_mt_report_slot_state(struct input_dev *dev,
bool input_mt_report_slot_state(struct input_dev *dev,
				unsigned int tool_type, bool active)
{
	struct input_mt *mt = dev->mt;
@@ -140,22 +142,24 @@ void input_mt_report_slot_state(struct input_dev *dev,
	int id;

	if (!mt)
		return;
		return false;

	slot = &mt->slots[mt->slot];
	slot->frame = mt->frame;

	if (!active) {
		input_event(dev, EV_ABS, ABS_MT_TRACKING_ID, -1);
		return;
		return false;
	}

	id = input_mt_get_value(slot, ABS_MT_TRACKING_ID);
	if (id < 0 || input_mt_get_value(slot, ABS_MT_TOOL_TYPE) != tool_type)
	if (id < 0)
		id = input_mt_new_trkid(mt);

	input_event(dev, EV_ABS, ABS_MT_TRACKING_ID, id);
	input_event(dev, EV_ABS, ABS_MT_TOOL_TYPE, tool_type);

	return true;
}
EXPORT_SYMBOL(input_mt_report_slot_state);

+1 −1
Original line number Diff line number Diff line
@@ -125,7 +125,7 @@ static const struct xpad_device {
	u8 mapping;
	u8 xtype;
} xpad_device[] = {
	{ 0x0079, 0x18d4, "GPD Win 2 Controller", 0, XTYPE_XBOX360 },
	{ 0x0079, 0x18d4, "GPD Win 2 X-Box Controller", 0, XTYPE_XBOX360 },
	{ 0x044f, 0x0f00, "Thrustmaster Wheel", 0, XTYPE_XBOX },
	{ 0x044f, 0x0f03, "Thrustmaster Wheel", 0, XTYPE_XBOX },
	{ 0x044f, 0x0f07, "Thrustmaster, Inc. Controller", 0, XTYPE_XBOX },
+5 −4
Original line number Diff line number Diff line
@@ -45,7 +45,7 @@ struct event_dev {
static irqreturn_t events_interrupt(int irq, void *dev_id)
{
	struct event_dev *edev = dev_id;
	unsigned type, code, value;
	unsigned int type, code, value;

	type = __raw_readl(edev->addr + REG_READ);
	code = __raw_readl(edev->addr + REG_READ);
@@ -57,7 +57,7 @@ static irqreturn_t events_interrupt(int irq, void *dev_id)
}

static void events_import_bits(struct event_dev *edev,
			unsigned long bits[], unsigned type, size_t count)
			unsigned long bits[], unsigned int type, size_t count)
{
	void __iomem *addr = edev->addr;
	int i, j;
@@ -99,6 +99,7 @@ static void events_import_abs_params(struct event_dev *edev)

		for (j = 0; j < ARRAY_SIZE(val); j++) {
			int offset = (i * ARRAY_SIZE(val) + j) * sizeof(u32);

			val[j] = __raw_readl(edev->addr + REG_DATA + offset);
		}

@@ -112,7 +113,7 @@ static int events_probe(struct platform_device *pdev)
	struct input_dev *input_dev;
	struct event_dev *edev;
	struct resource *res;
	unsigned keymapnamelen;
	unsigned int keymapnamelen;
	void __iomem *addr;
	int irq;
	int i;
@@ -150,7 +151,7 @@ static int events_probe(struct platform_device *pdev)
	for (i = 0; i < keymapnamelen; i++)
		edev->name[i] = __raw_readb(edev->addr + REG_DATA + i);

	pr_debug("events_probe() keymap=%s\n", edev->name);
	pr_debug("%s: keymap=%s\n", __func__, edev->name);

	input_dev->name = edev->name;
	input_dev->id.bustype = BUS_HOST;
+10 −0
Original line number Diff line number Diff line
@@ -841,4 +841,14 @@ config INPUT_RAVE_SP_PWRBUTTON
	  To compile this driver as a module, choose M here: the
	  module will be called rave-sp-pwrbutton.

config INPUT_SC27XX_VIBRA
	tristate "Spreadtrum sc27xx vibrator support"
	depends on MFD_SC27XX_PMIC || COMPILE_TEST
	select INPUT_FF_MEMLESS
	help
	  This option enables support for Spreadtrum sc27xx vibrator driver.

	  To compile this driver as a module, choose M here. The module will
	  be called sc27xx_vibra.

endif
Loading