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

Commit 39fada55 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull more input updates from Dmitry Torokhov:
 "Two new drivers for touchscreen controllers:

   - Silead touchscreen controllers
   - SiS 9200 family touchscreen controllers

  and a few driver fixes"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: silead - remove some dead code
  Input: sis-i2c - select CONFIG_CRC_ITU_T
  Input: add driver for SiS 9200 family I2C touchscreen controllers
  Input: ili210x - fix permissions on "calibrate" attribute
  Input: elan_i2c - properly wake up touchpad on ASUS laptops
  Input: add driver for Silead touchscreens
  Input: elantech - fix debug dump of the current packet
  Input: rotary_encoder - support binary encoding of states
  Input: xpad - power off wireless 360 controllers on suspend
  Input: i8042 - break load dependency between atkbd/psmouse and i8042
  Input: synaptics-rmi4 - do not check for NULL when calling of_node_put()
  Input: cros_ec_keyb - cleanup use of dev
parents f72035fa 22fe874f
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -20,6 +20,8 @@ Optional properties:
  2: Half-period mode
  4: Quarter-period mode
- wakeup-source: Boolean, rotary encoder can wake up the system.
- rotary-encoder,encoding: String, the method used to encode steps.
  Supported are "gray" (the default and more common) and "binary".

Deprecated properties:
- rotary-encoder,half-period: Makes the driver work on half-period mode.
@@ -34,6 +36,7 @@ Example:
			compatible = "rotary-encoder";
			gpios = <&gpio 19 1>, <&gpio 20 0>; /* GPIO19 is inverted */
			linux,axis = <0>; /* REL_X */
			rotary-encoder,encoding = "gray";
			rotary-encoder,relative-axis;
		};

@@ -42,5 +45,6 @@ Example:
			gpios = <&gpio 21 0>, <&gpio 22 0>;
			linux,axis = <1>; /* ABS_Y */
			rotary-encoder,steps = <24>;
			rotary-encoder,encoding = "binary";
			rotary-encoder,rollover;
		};
+36 −0
Original line number Diff line number Diff line
* GSL 1680 touchscreen controller

Required properties:
- compatible		  : "silead,gsl1680"
- reg			  : I2C slave address of the chip (0x40)
- interrupt-parent	  : a phandle pointing to the interrupt controller
			    serving the interrupt for this chip
- interrupts		  : interrupt specification for the gsl1680 interrupt
- power-gpios		  : Specification for the pin connected to the gsl1680's
			    shutdown input. This needs to be driven high to take the
			    gsl1680 out of its low power state
- touchscreen-size-x	  : See touchscreen.txt
- touchscreen-size-y	  : See touchscreen.txt

Optional properties:
- touchscreen-inverted-x  : See touchscreen.txt
- touchscreen-inverted-y  : See touchscreen.txt
- touchscreen-swapped-x-y : See touchscreen.txt
- silead,max-fingers	  : maximum number of fingers the touchscreen can detect

Example:

i2c@00000000 {
	gsl1680: touchscreen@40 {
		compatible = "silead,gsl1680";
		reg = <0x40>;
		interrupt-parent = <&pio>;
		interrupts = <6 11 IRQ_TYPE_EDGE_FALLING>;
		power-gpios = <&pio 1 3 GPIO_ACTIVE_HIGH>;
		touchscreen-size-x = <480>;
		touchscreen-size-y = <800>;
		touchscreen-inverted-x;
		touchscreen-swapped-x-y;
		silead,max-fingers = <5>;
	};
};
+33 −0
Original line number Diff line number Diff line
* SiS I2C Multiple Touch Controller

Required properties:
- compatible: must be "sis,9200-ts"
- reg: i2c slave address
- interrupt-parent: the phandle for the interrupt controller
  (see interrupt binding [0])
- interrupts: touch controller interrupt (see interrupt
  binding [0])

Optional properties:
- pinctrl-names: should be "default" (see pinctrl binding [1]).
- pinctrl-0: a phandle pointing to the pin settings for the
  device (see pinctrl binding [1]).
- attn-gpios: the gpio pin used as attention line
- reset-gpios: the gpio pin used to reset the controller
- wakeup-source: touchscreen can be used as a wakeup source

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

Example:

	sis9255@5c  {
		compatible = "sis,9200-ts";
		reg = <0x5c>;
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_sis>;
		interrupt-parent = <&gpio3>;
		interrupts = <19 IRQ_TYPE_EDGE_FALLING>;
		irq-gpios = <&gpio3 19 GPIO_ACTIVE_LOW>;
		reset-gpios = <&gpio2 30 GPIO_ACTIVE_LOW>;
	};
+1 −0
Original line number Diff line number Diff line
@@ -238,6 +238,7 @@ simtek
sii	Seiko Instruments, Inc.
silergy	Silergy Corp.
sirf	SiRF Technology, Inc.
sis	Silicon Integrated Systems Corp.
sitronix	Sitronix Technology Corporation
skyworks	Skyworks Solutions, Inc.
smsc	Standard Microsystems Corporation
+43 −0
Original line number Diff line number Diff line
@@ -115,6 +115,10 @@ static bool sticks_to_null;
module_param(sticks_to_null, bool, S_IRUGO);
MODULE_PARM_DESC(sticks_to_null, "Do not map sticks at all for unknown pads");

static bool auto_poweroff = true;
module_param(auto_poweroff, bool, S_IWUSR | S_IRUGO);
MODULE_PARM_DESC(auto_poweroff, "Power off wireless controllers on suspend");

static const struct xpad_device {
	u16 idVendor;
	u16 idProduct;
@@ -1248,6 +1252,36 @@ static void xpad_stop_input(struct usb_xpad *xpad)
	usb_kill_urb(xpad->irq_in);
}

static void xpad360w_poweroff_controller(struct usb_xpad *xpad)
{
	unsigned long flags;
	struct xpad_output_packet *packet =
			&xpad->out_packets[XPAD_OUT_CMD_IDX];

	spin_lock_irqsave(&xpad->odata_lock, flags);

	packet->data[0] = 0x00;
	packet->data[1] = 0x00;
	packet->data[2] = 0x08;
	packet->data[3] = 0xC0;
	packet->data[4] = 0x00;
	packet->data[5] = 0x00;
	packet->data[6] = 0x00;
	packet->data[7] = 0x00;
	packet->data[8] = 0x00;
	packet->data[9] = 0x00;
	packet->data[10] = 0x00;
	packet->data[11] = 0x00;
	packet->len = 12;
	packet->pending = true;

	/* Reset the sequence so we send out poweroff now */
	xpad->last_out_packet = -1;
	xpad_try_sending_next_out_packet(xpad);

	spin_unlock_irqrestore(&xpad->odata_lock, flags);
}

static int xpad360w_start_input(struct usb_xpad *xpad)
{
	int error;
@@ -1590,6 +1624,15 @@ static int xpad_suspend(struct usb_interface *intf, pm_message_t message)
		 * or goes away.
		 */
		xpad360w_stop_input(xpad);

		/*
		 * The wireless adapter is going off now, so the
		 * gamepads are going to become disconnected.
		 * Unless explicitly disabled, power them down
		 * so they don't just sit there flashing.
		 */
		if (auto_poweroff && xpad->pad_present)
			xpad360w_poweroff_controller(xpad);
	} else {
		mutex_lock(&input->mutex);
		if (input->users)
Loading