Skip to content

Commit

Permalink
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/git/dtor/input

Pull input layer updates from Dmitry Torokhov:

 - evdev interface has been adjusted to extend the life of timestamps on
   32 bit systems to the year of 2108

 - Synaptics RMI4 driver's PS/2 guest handling ha beed updated to
   improve chances of detecting trackpoints on the pass-through port

 - mms114 touchcsreen controller driver has been updated to support
   generic device properties and work with mms152 cntrollers

 - Goodix driver now supports generic touchscreen properties

 - couple of drivers for AVR32 architecture are gone as the architecture
   support has been removed from the kernel

 - gpio-tilt driver has been removed as there are no mainline users and
   the driver itself is using legacy APIs and relies on platform data

 - MODULE_LINECSE/MODULE_VERSION cleanups

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (45 commits)
  Input: goodix - use generic touchscreen_properties
  Input: mms114 - fix typo in definition
  Input: mms114 - use BIT() macro instead of explicit shifting
  Input: mms114 - replace mdelay with msleep
  Input: mms114 - add support for mms152
  Input: mms114 - drop platform data and use generic APIs
  Input: mms114 - mark as direct input device
  Input: mms114 - do not clobber interrupt trigger
  Input: edt-ft5x06 - fix error handling for factory mode on non-M06
  Input: stmfts - set IRQ_NOAUTOEN to the irq flag
  Input: auo-pixcir-ts - delete an unnecessary return statement
  Input: auo-pixcir-ts - remove custom log for a failed memory allocation
  Input: da9052_tsi - remove unused mutex
  Input: docs - use PROPERTY_ENTRY_U32() directly
  Input: synaptics-rmi4 - log when we create a guest serio port
  Input: synaptics-rmi4 - unmask F03 interrupts when port is opened
  Input: synaptics-rmi4 - do not delete interrupt memory too early
  Input: ad7877 - use managed resource allocations
  Input: stmfts,s6sy671 - add SPDX identifier
  Input: remove atmel-wm97xx touchscreen driver
  ...
  • Loading branch information
torvalds committed Feb 1, 2018
2 parents f6cff79 + d67ad78 commit eea43ed
Show file tree
Hide file tree
Showing 65 changed files with 491 additions and 1,746 deletions.
35 changes: 21 additions & 14 deletions Documentation/devicetree/bindings/input/touchscreen/mms114.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
* MELFAS MMS114 touchscreen controller
* MELFAS MMS114/MMS152 touchscreen controller

Required properties:
- compatible: must be "melfas,mms114"
- compatible: should be one of:
- "melfas,mms114"
- "melfas,mms152"
- reg: I2C address of the chip
- interrupts: interrupt to which the chip is connected
- x-size: horizontal resolution of touchscreen
- y-size: vertical resolution of touchscreen
- touchscreen-size-x: See [1]
- touchscreen-size-y: See [1]

Optional properties:
- contact-threshold:
- moving-threshold:
- x-invert: invert X axis
- y-invert: invert Y axis
- touchscreen-fuzz-x: See [1]
- touchscreen-fuzz-y: See [1]
- touchscreen-fuzz-pressure: See [1]
- touchscreen-inverted-x: See [1]
- touchscreen-inverted-y: See [1]
- touchscreen-swapped-x-y: See [1]

[1]: Documentation/devicetree/bindings/input/touchscreen/touchscreen.txt

Example:

Expand All @@ -22,12 +28,13 @@ Example:
compatible = "melfas,mms114";
reg = <0x48>;
interrupts = <39 0>;
x-size = <720>;
y-size = <1280>;
contact-threshold = <10>;
moving-threshold = <10>;
x-invert;
y-invert;
touchscreen-size-x = <720>;
touchscreen-size-y = <1280>;
touchscreen-fuzz-x = <10>;
touchscreen-fuzz-y = <10>;
touchscreen-fuzz-pressure = <10>;
touchscreen-inverted-x;
touchscreen-inverted-y;
};

/* ... */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ Optional properties:
- touchscreen-inverted-y : See touchscreen.txt
- touchscreen-swapped-x-y : See touchscreen.txt
- silead,max-fingers : maximum number of fingers the touchscreen can detect
- silead,home-button : Boolean, set to true on devices which have a
capacitive home-button build into the touchscreen
- vddio-supply : regulator phandle for controller VDDIO
- avdd-supply : regulator phandle for controller AVDD

Expand Down
5 changes: 0 additions & 5 deletions Documentation/gpio/drivers-on-gpio.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,6 @@ hardware descriptions such as device tree or ACPI:
- gpio-beeper: drivers/input/misc/gpio-beeper.c is used to provide a beep from
an external speaker connected to a GPIO line.

- gpio-tilt-polled: drivers/input/misc/gpio_tilt_polled.c provides tilt
detection switches using GPIO, which is useful for your homebrewn pinball
machine if for nothing else. It can detect different tilt angles of the
monitored object.

- extcon-gpio: drivers/extcon/extcon-gpio.c is used when you need to read an
external connector status, such as a headset line for an audio driver or an
HDMI connector. It will provide a better userspace sysfs interface than GPIO.
Expand Down
103 changes: 0 additions & 103 deletions Documentation/input/devices/gpio-tilt.rst

This file was deleted.

6 changes: 3 additions & 3 deletions Documentation/input/devices/rotary-encoder.rst
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ example below:
};

static const struct property_entry rotary_encoder_properties[] __initconst = {
PROPERTY_ENTRY_INTEGER("rotary-encoder,steps-per-period", u32, 24),
PROPERTY_ENTRY_INTEGER("linux,axis", u32, ABS_X),
PROPERTY_ENTRY_INTEGER("rotary-encoder,relative_axis", u32, 0),
PROPERTY_ENTRY_U32("rotary-encoder,steps-per-period", 24),
PROPERTY_ENTRY_U32("linux,axis", ABS_X),
PROPERTY_ENTRY_U32("rotary-encoder,relative_axis", 0),
{ },
};

Expand Down
6 changes: 3 additions & 3 deletions Documentation/input/ff.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ To enable force feedback, you have to:

Before you start, let me WARN you that some devices shake violently during the
initialisation phase. This happens for example with my "AVB Top Shot Pegasus".
To stop this annoying behaviour, move you joystick to its limits. Anyway, you
To stop this annoying behaviour, move your joystick to its limits. Anyway, you
should keep a hand on your device, in order to avoid it to break down if
something goes wrong.

Expand Down Expand Up @@ -121,7 +121,7 @@ uploaded, but not played.
The content of effect may be modified. In particular, its field "id" is set
to the unique id assigned by the driver. This data is required for performing
some operations (removing an effect, controlling the playback).
This if field must be set to -1 by the user in order to tell the driver to
The "id" field must be set to -1 by the user in order to tell the driver to
allocate a new effect.

Effects are file descriptor specific.
Expand Down Expand Up @@ -178,7 +178,7 @@ Control of playing is done with write(). Below is an example:
stop.code = effect.id;
stop.value = 0;

write(fd, (const void*) &play, sizeof(stop));
write(fd, (const void*) &stop, sizeof(stop));

Setting the gain
----------------
Expand Down
20 changes: 13 additions & 7 deletions drivers/input/evdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,7 @@ static void __evdev_flush_queue(struct evdev_client *client, unsigned int type)
continue;
} else if (head != i) {
/* move entry to fill the gap */
client->buffer[head].time = ev->time;
client->buffer[head].type = ev->type;
client->buffer[head].code = ev->code;
client->buffer[head].value = ev->value;
client->buffer[head] = *ev;
}

num++;
Expand All @@ -157,14 +154,17 @@ static void __evdev_queue_syn_dropped(struct evdev_client *client)
{
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();

ev.time = ktime_to_timeval(time);
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;
ev.code = SYN_DROPPED;
ev.value = 0;
Expand Down Expand Up @@ -241,7 +241,10 @@ static void __pass_event(struct evdev_client *client,
*/
client->tail = (client->head - 2) & (client->bufsize - 1);

client->buffer[client->tail].time = event->time;
client->buffer[client->tail].input_event_sec =
event->input_event_sec;
client->buffer[client->tail].input_event_usec =
event->input_event_usec;
client->buffer[client->tail].type = EV_SYN;
client->buffer[client->tail].code = SYN_DROPPED;
client->buffer[client->tail].value = 0;
Expand All @@ -262,12 +265,15 @@ static void evdev_pass_values(struct evdev_client *client,
struct evdev *evdev = client->evdev;
const struct input_value *v;
struct input_event event;
struct timespec64 ts;
bool wakeup = false;

if (client->revoked)
return;

event.time = ktime_to_timeval(ev_time[client->clk_type]);
ts = ktime_to_timespec64(ev_time[client->clk_type]);
event.input_event_sec = ts.tv_sec;
event.input_event_usec = ts.tv_nsec / NSEC_PER_USEC;

/* Interrupts are disabled, just acquire the lock. */
spin_lock(&client->buffer_lock);
Expand Down
8 changes: 4 additions & 4 deletions drivers/input/input-compat.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ int input_event_from_user(const char __user *buffer,
sizeof(struct input_event_compat)))
return -EFAULT;

event->time.tv_sec = compat_event.time.tv_sec;
event->time.tv_usec = compat_event.time.tv_usec;
event->input_event_sec = compat_event.sec;
event->input_event_usec = compat_event.usec;
event->type = compat_event.type;
event->code = compat_event.code;
event->value = compat_event.value;
Expand All @@ -44,8 +44,8 @@ int input_event_to_user(char __user *buffer,
if (in_compat_syscall() && !COMPAT_USE_64BIT_TIME) {
struct input_event_compat compat_event;

compat_event.time.tv_sec = event->time.tv_sec;
compat_event.time.tv_usec = event->time.tv_usec;
compat_event.sec = event->input_event_sec;
compat_event.usec = event->input_event_usec;
compat_event.type = event->type;
compat_event.code = event->code;
compat_event.value = event->value;
Expand Down
3 changes: 2 additions & 1 deletion drivers/input/input-compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
#ifdef CONFIG_COMPAT

struct input_event_compat {
struct compat_timeval time;
compat_ulong_t sec;
compat_ulong_t usec;
__u16 type;
__u16 code;
__s32 value;
Expand Down
1 change: 0 additions & 1 deletion drivers/input/input-polldev.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
MODULE_AUTHOR("Dmitry Torokhov <[email protected]>");
MODULE_DESCRIPTION("Generic implementation of a polled input device");
MODULE_LICENSE("GPL v2");
MODULE_VERSION("0.1");

static void input_polldev_queue_work(struct input_polled_dev *dev)
{
Expand Down
7 changes: 2 additions & 5 deletions drivers/input/joystick/xpad.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,6 @@
#include <linux/usb/input.h>
#include <linux/usb/quirks.h>

#define DRIVER_AUTHOR "Marko Friedemann <[email protected]>"
#define DRIVER_DESC "X-Box pad driver"

#define XPAD_PKT_LEN 64

/* xbox d-pads should map to buttons, as is required for DDR pads
Expand Down Expand Up @@ -1943,6 +1940,6 @@ static struct usb_driver xpad_driver = {

module_usb_driver(xpad_driver);

MODULE_AUTHOR(DRIVER_AUTHOR);
MODULE_DESCRIPTION(DRIVER_DESC);
MODULE_AUTHOR("Marko Friedemann <[email protected]>");
MODULE_DESCRIPTION("X-Box pad driver");
MODULE_LICENSE("GPL");
1 change: 0 additions & 1 deletion drivers/input/keyboard/pmic8xxx-keypad.c
Original file line number Diff line number Diff line change
Expand Up @@ -697,6 +697,5 @@ module_platform_driver(pmic8xxx_kp_driver);

MODULE_LICENSE("GPL v2");
MODULE_DESCRIPTION("PMIC8XXX keypad driver");
MODULE_VERSION("1.0");
MODULE_ALIAS("platform:pmic8xxx_keypad");
MODULE_AUTHOR("Trilok Soni <[email protected]>");
16 changes: 1 addition & 15 deletions drivers/input/misc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -268,20 +268,6 @@ config INPUT_GPIO_BEEPER
To compile this driver as a module, choose M here: the
module will be called gpio-beeper.

config INPUT_GPIO_TILT_POLLED
tristate "Polled GPIO tilt switch"
depends on GPIOLIB || COMPILE_TEST
select INPUT_POLLDEV
help
This driver implements support for tilt switches connected
to GPIO pins that are not capable of generating interrupts.

The list of gpios to use and the mapping of their states
to specific angles is done via platform data.

To compile this driver as a module, choose M here: the
module will be called gpio_tilt_polled.

config INPUT_GPIO_DECODER
tristate "Polled GPIO Decoder Input driver"
depends on GPIOLIB || COMPILE_TEST
Expand Down Expand Up @@ -468,7 +454,7 @@ config INPUT_TPS65218_PWRBUTTON
tristate "TPS65218 Power button driver"
depends on (MFD_TPS65217 || MFD_TPS65218)
help
Say Y here if you want to enable power buttong reporting for
Say Y here if you want to enable power button reporting for
TPS65217 and TPS65218 Power Management IC devices.

To compile this driver as a module, choose M here. The module will
Expand Down
1 change: 0 additions & 1 deletion drivers/input/misc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ obj-$(CONFIG_INPUT_DRV2665_HAPTICS) += drv2665.o
obj-$(CONFIG_INPUT_DRV2667_HAPTICS) += drv2667.o
obj-$(CONFIG_INPUT_GP2A) += gp2ap002a00f.o
obj-$(CONFIG_INPUT_GPIO_BEEPER) += gpio-beeper.o
obj-$(CONFIG_INPUT_GPIO_TILT_POLLED) += gpio_tilt_polled.o
obj-$(CONFIG_INPUT_GPIO_DECODER) += gpio_decoder.o
obj-$(CONFIG_INPUT_HISI_POWERKEY) += hisi_powerkey.o
obj-$(CONFIG_HP_SDC_RTC) += hp_sdc_rtc.o
Expand Down
2 changes: 0 additions & 2 deletions drivers/input/misc/apanel.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
#include <linux/leds.h>

#define APANEL_NAME "Fujitsu Application Panel"
#define APANEL_VERSION "1.3.1"
#define APANEL "apanel"

/* How often we poll keys - msecs */
Expand Down Expand Up @@ -345,7 +344,6 @@ module_exit(apanel_cleanup);
MODULE_AUTHOR("Stephen Hemminger <[email protected]>");
MODULE_DESCRIPTION(APANEL_NAME " driver");
MODULE_LICENSE("GPL");
MODULE_VERSION(APANEL_VERSION);

MODULE_ALIAS("dmi:*:svnFUJITSU:pnLifeBook*:pvr*:rvnFUJITSU:*");
MODULE_ALIAS("dmi:*:svnFUJITSU:pnLifebook*:pvr*:rvnFUJITSU:*");
Loading

0 comments on commit eea43ed

Please sign in to comment.