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

 - input core allows hardware drivers to specify a [more precise]
   timestamp (normally taken in top half) to better track velocity of
   contacts

 - input_dev instances now support "polling" mode so that drivers could
   use the same object for polled and interrupt-driven operation. The
   plan is to convert existing drivers and retire input_polled_dev API

 - a new driver for the FlySky FS-iA6B RC receiver

 - a refresh of BU21013 touchpad driver

 - w90x900 keyboard and touchpad drivers are removed as the platform is
   gone

 - assorted fixes

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (45 commits)
  Input: sidewinder - make array seq static const, makes object smaller
  Input: reset device timestamp on sync
  Input: bu21013_ts - switch to using standard touchscreen properties
  Input: bu21013_ts - switch to using MT-B (slotted) protocol
  Input: bu21013_ts - fix suspend when wake source
  Input: bu21013_ts - use interrupt from I2C client
  Input: bu21013_ts - remove support for platform data
  Input: bu21013_ts - convert to using managed resources
  Input: bu21013_ts - remove useless comments
  Input: bu21013_ts - annotate supend/resume methods as __maybe_unused
  Input: bu21013_ts - rename some variables
  Input: bu21013_ts - convert to use GPIO descriptors
  ARM: ux500: improve BU21013 touchpad bindings
  Input: i8042 - enable wakeup on a stable struct device
  Input: soc_button_array - use platform_device_register_resndata()
  Input: psmouse - drop all unneeded functions from mouse headers
  Input: add support for polling to input devices
  Input: wacom_w8001 - allocate additional space for 'phys'
  Input: cros_ec_keyb - add back missing mask for event_type
  Input: remove dev_err() usage after platform_get_irq()
  ...
parents a9f8b38a 08987822
Loading
Loading
Loading
Loading
+21 −8
Original line number Diff line number Diff line
@@ -32,7 +32,6 @@ Optional properties:
					(ADS7846).
	ti,keep-vref-on			set to keep vref on for differential
					measurements as well
	ti,swap-xy			swap x and y axis
	ti,settle-delay-usec		Settling time of the analog signals;
					a function of Vcc and the capacitance
					on the X/Y drivers.  If set to non-zero,
@@ -51,13 +50,6 @@ Optional properties:
					in Ohms (u16).
	ti,x-min			Minimum value on the X axis (u16).
	ti,y-min			Minimum value on the Y axis (u16).
	ti,x-max			Maximum value on the X axis (u16).
	ti,y-max			Minimum value on the Y axis (u16).
	ti,pressure-min			Minimum reported pressure value
					(threshold) - u16.
	ti,pressure-max			Maximum reported pressure value (u16).
	ti,debounce-max			Max number of additional readings per
					sample (u16).
	ti,debounce-tol			Tolerance used for filtering (u16).
	ti,debounce-rep			Additional consecutive good readings
					required after the first two (u16).
@@ -67,7 +59,28 @@ Optional properties:
					line is connected to.
	wakeup-source			use any event on touchscreen as wakeup event.
					(Legacy property support: "linux,wakeup")
	touchscreen-size-x		General touchscreen binding, see [1].
	touchscreen-size-y		General touchscreen binding, see [1].
	touchscreen-max-pressure	General touchscreen binding, see [1].
	touchscreen-min-pressure	General touchscreen binding, see [1].
	touchscreen-average-samples	General touchscreen binding, see [1].
	touchscreen-inverted-x		General touchscreen binding, see [1].
	touchscreen-inverted-y		General touchscreen binding, see [1].
	touchscreen-swapped-x-y		General touchscreen binding, see [1].

[1] All general touchscreen properties are described in
    Documentation/devicetree/bindings/input/touchscreen/touchscreen.txt.

Deprecated properties:

	ti,swap-xy			swap x and y axis
	ti,x-max			Maximum value on the X axis (u16).
	ti,y-max			Maximum value on the Y axis (u16).
	ti,pressure-min			Minimum reported pressure value
					(threshold) - u16.
	ti,pressure-max			Maximum reported pressure value (u16).
	ti,debounce-max			Max number of additional readings per
					sample (u16).

Example for a TSC2046 chip connected to an McSPI controller of an OMAP SoC::

+21 −6
Original line number Diff line number Diff line
@@ -3,10 +3,23 @@
Required properties:
 - compatible              : "rohm,bu21013_tp"
 - reg                     : I2C device address
 - reset-gpios             : GPIO pin enabling (selecting) chip (CS)
 - interrupt-parent        : the phandle for the gpio controller
 - interrupts              : (gpio) interrupt to which the chip is connected

Optional properties:
 - touch-gpio              : GPIO pin registering a touch event
 - touch-gpios             : GPIO pin registering a touch event
 - <supply_name>-supply    : Phandle to a regulator supply
 - touchscreen-size-x      : General touchscreen binding, see [1].
 - touchscreen-size-y      : General touchscreen binding, see [1].
 - touchscreen-inverted-x  : General touchscreen binding, see [1].
 - touchscreen-inverted-y  : General touchscreen binding, see [1].
 - touchscreen-swapped-x-y : General touchscreen binding, see [1].

[1] All general touchscreen properties are described in
    Documentation/devicetree/bindings/input/touchscreen/touchscreen.txt.

Deprecated properties:
 - rohm,touch-max-x        : Maximum outward permitted limit in the X axis
 - rohm,touch-max-y        : Maximum outward permitted limit in the Y axis
 - rohm,flip-x             : Flip touch coordinates on the X axis
@@ -18,11 +31,13 @@ Example:
		bu21013_tp@5c {
			compatible = "rohm,bu21013_tp";
			reg = <0x5c>;
			touch-gpio = <&gpio2 20 0x4>;
			interrupt-parent = <&gpio2>;
			interrupts <&20 IRQ_TYPE_LEVEL_LOW>;
			touch-gpio = <&gpio2 20 GPIO_ACTIVE_LOW>;
			avdd-supply = <&ab8500_ldo_aux1_reg>;

			rohm,touch-max-x = <384>;
			rohm,touch-max-y = <704>;
			rohm,flip-y;
			touchscreen-size-x = <384>;
			touchscreen-size-y = <704>;
			touchscreen-inverted-y;
		};
	};
+6 −0
Original line number Diff line number Diff line
@@ -12742,6 +12742,12 @@ S: Maintained
F:	Documentation/input/devices/pxrc.rst
F:	drivers/input/joystick/pxrc.c
FLYSKY FSIA6B RC RECEIVER
M:	Markus Koch <markus@notsyncing.net>
L:	linux-input@vger.kernel.org
S:	Maintained
F:	drivers/input/joystick/fsia6b.c
PHONET PROTOCOL
M:	Remi Denis-Courmont <courmisch@gmail.com>
S:	Supported
+1 −1
Original line number Diff line number Diff line
@@ -6,7 +6,7 @@
# Each configuration option enables a list of files.

obj-$(CONFIG_INPUT)		+= input-core.o
input-core-y := input.o input-compat.o input-mt.o ff-core.o
input-core-y := input.o input-compat.o input-mt.o input-poller.o ff-core.o

obj-$(CONFIG_INPUT_FF_MEMLESS)	+= ff-memless.o
obj-$(CONFIG_INPUT_POLLDEV)	+= input-polldev.o
+8 −27
Original line number Diff line number Diff line
@@ -25,13 +25,6 @@
#include <linux/cdev.h>
#include "input-compat.h"

enum evdev_clock_type {
	EV_CLK_REAL = 0,
	EV_CLK_MONO,
	EV_CLK_BOOT,
	EV_CLK_MAX
};

struct evdev {
	int open;
	struct input_handle handle;
@@ -53,7 +46,7 @@ struct evdev_client {
	struct fasync_struct *fasync;
	struct evdev *evdev;
	struct list_head node;
	unsigned int clk_type;
	enum input_clock_type clk_type;
	bool revoked;
	unsigned long *evmasks[EV_CNT];
	unsigned int bufsize;
@@ -149,17 +142,10 @@ static void __evdev_flush_queue(struct evdev_client *client, unsigned int type)

static void __evdev_queue_syn_dropped(struct evdev_client *client)
{
	ktime_t *ev_time = input_get_timestamp(client->evdev->handle.dev);
	struct timespec64 ts = ktime_to_timespec64(ev_time[client->clk_type]);
	struct input_event ev;
	ktime_t time;
	struct timespec64 ts;

	time = client->clk_type == EV_CLK_REAL ?
			ktime_get_real() :
			client->clk_type == EV_CLK_MONO ?
				ktime_get() :
				ktime_get_boottime();

	ts = ktime_to_timespec64(time);
	ev.input_event_sec = ts.tv_sec;
	ev.input_event_usec = ts.tv_nsec / NSEC_PER_USEC;
	ev.type = EV_SYN;
@@ -188,18 +174,18 @@ static void evdev_queue_syn_dropped(struct evdev_client *client)
static int evdev_set_clk_type(struct evdev_client *client, unsigned int clkid)
{
	unsigned long flags;
	unsigned int clk_type;
	enum input_clock_type clk_type;

	switch (clkid) {

	case CLOCK_REALTIME:
		clk_type = EV_CLK_REAL;
		clk_type = INPUT_CLK_REAL;
		break;
	case CLOCK_MONOTONIC:
		clk_type = EV_CLK_MONO;
		clk_type = INPUT_CLK_MONO;
		break;
	case CLOCK_BOOTTIME:
		clk_type = EV_CLK_BOOT;
		clk_type = INPUT_CLK_BOOT;
		break;
	default:
		return -EINVAL;
@@ -307,12 +293,7 @@ static void evdev_events(struct input_handle *handle,
{
	struct evdev *evdev = handle->private;
	struct evdev_client *client;
	ktime_t ev_time[EV_CLK_MAX];

	ev_time[EV_CLK_MONO] = ktime_get();
	ev_time[EV_CLK_REAL] = ktime_mono_to_real(ev_time[EV_CLK_MONO]);
	ev_time[EV_CLK_BOOT] = ktime_mono_to_any(ev_time[EV_CLK_MONO],
						 TK_OFFS_BOOT);
	ktime_t *ev_time = input_get_timestamp(handle->dev);

	rcu_read_lock();

Loading