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

Commit 1c5ff2ab authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull input updates from Dmitry Torokhov:
 - new driver for eGalaxTouch serial touchscreen
 - new driver for TS-4800 touchscreen
 - an update for Goodix touchscreen driver
 - PS/2 mouse module was reworked to limit number of protocols we try on
   pass-through ports to speed up their detection time
 - wacom_w8001 touchscreen driver now reports pen and touch via separate
   instances of input devices
 - other driver changes

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (42 commits)
  Input: elantech - mark protocols v2 and v3 as semi-mt
  Input: wacom_w8001 - drop use of ABS_MT_TOOL_TYPE
  Input: gpio-keys - fix check for disabling unsupported keys
  Input: omap-keypad - remove dead check
  Input: ti_am335x_tsc - fix HWPEN interrupt handling
  Input: omap-keypad - set tasklet data earlier
  Input: rohm_bu21023 - fix handling of retrying firmware update
  Input: ALPS - report v3 pinnacle trackstick device only if is present
  Input: ALPS - detect trackstick presence for v7 protocol
  Input: pcap_ts - use to_delayed_work
  Input: bma150 - constify bma150_cfg structure
  Input: i8042 - add Fujitsu Lifebook U745 to the nomux list
  Input: egalax_ts_serial - fix potential NULL dereference on error
  Input: uinput - sanity check on ff_effects_max and EV_FF
  Input: uinput - rework ABS validation
  Input: uinput - add new UINPUT_DEV_SETUP and UI_ABS_SETUP ioctl
  Input: goodix - use "inverted_[xy]" flags instead of "rotated_screen"
  Input: goodix - add axis swapping and axis inversion support
  Input: goodix - use goodix_i2c_write_u8 instead of i2c_master_send
  Input: goodix - add power management support
  ...
parents d6a32277 009f7738
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -13,6 +13,17 @@ Required properties:
 - interrupt-parent	: Interrupt controller to which the chip is connected
 - interrupts		: Interrupt to which the chip is connected

Optional properties:

 - irq-gpios		: GPIO pin used for IRQ. The driver uses the
			  interrupt gpio pin as output to reset the device.
 - reset-gpios		: GPIO pin used for reset

 - touchscreen-inverted-x  : X axis is inverted (boolean)
 - touchscreen-inverted-y  : Y axis is inverted (boolean)
 - touchscreen-swapped-x-y : X and Y axis are swapped (boolean)
                             (swapping is done after inverting the axis)

Example:

	i2c@00000000 {
@@ -23,6 +34,9 @@ Example:
			reg = <0x5d>;
			interrupt-parent = <&gpio>;
			interrupts = <0 0>;

			irq-gpios = <&gpio1 0 0>;
			reset-gpios = <&gpio1 1 0>;
		};

		/* ... */
+3 −1
Original line number Diff line number Diff line
@@ -9,7 +9,9 @@ Required properties:
- touchscreen-size-y: vertical resolution of touchscreen (in pixels)

Optional properties:
- reset-gpio: GPIO connected to the RESET line of the chip
- reset-gpios: GPIO connected to the RESET line of the chip
- enable-gpios: GPIO connected to the ENABLE line of the chip
- wake-gpios: GPIO connected to the WAKE line of the chip

Example:

+11 −0
Original line number Diff line number Diff line
* TS-4800 Touchscreen bindings

Required properties:
- compatible: must be "technologic,ts4800-ts"
- reg: physical base address of the controller and length of memory mapped
  region.
- syscon: phandle / integers array that points to the syscon node which
          describes the FPGA's syscon registers.
          - phandle to FPGA's syscon
          - offset to the touchscreen register
          - offset to the touchscreen enable bit
+43 −0
Original line number Diff line number Diff line
@@ -943,3 +943,46 @@ int acpi_gpio_count(struct device *dev, const char *con_id)
	}
	return count;
}

struct acpi_crs_lookup {
	struct list_head node;
	struct acpi_device *adev;
	const char *con_id;
};

static DEFINE_MUTEX(acpi_crs_lookup_lock);
static LIST_HEAD(acpi_crs_lookup_list);

bool acpi_can_fallback_to_crs(struct acpi_device *adev, const char *con_id)
{
	struct acpi_crs_lookup *l, *lookup = NULL;

	/* Never allow fallback if the device has properties */
	if (adev->data.properties || adev->driver_gpios)
		return false;

	mutex_lock(&acpi_crs_lookup_lock);

	list_for_each_entry(l, &acpi_crs_lookup_list, node) {
		if (l->adev == adev) {
			lookup = l;
			break;
		}
	}

	if (!lookup) {
		lookup = kmalloc(sizeof(*lookup), GFP_KERNEL);
		if (lookup) {
			lookup->adev = adev;
			lookup->con_id = con_id;
			list_add_tail(&lookup->node, &acpi_crs_lookup_list);
		}
	}

	mutex_unlock(&acpi_crs_lookup_lock);

	return lookup &&
		((!lookup->con_id && !con_id) ||
		 (lookup->con_id && con_id &&
		  strcmp(lookup->con_id, con_id) == 0));
}
+3 −0
Original line number Diff line number Diff line
@@ -1874,6 +1874,9 @@ static struct gpio_desc *acpi_find_gpio(struct device *dev, const char *con_id,

	/* Then from plain _CRS GPIOs */
	if (IS_ERR(desc)) {
		if (!acpi_can_fallback_to_crs(adev, con_id))
			return ERR_PTR(-ENOENT);

		desc = acpi_get_gpiod_by_index(adev, NULL, idx, &info);
		if (IS_ERR(desc))
			return desc;
Loading