History

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input

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() ...

Linus Torvalds committed 7 years ago

Commit c6cfaf42 parents a9f8b38 089878292 files · +1236 −1551Browse files

Showing the changes to include/linux (3 of 92 files). Show all

Unified · Split

3 files
  1. include/linux/input.h +26 −0
  2. include/linux/input/bu21013.h +0 −34
  3. include/linux/platform_data/keypad-w90p910.h +0 −16
include/linux/input.h+26−0
@@ -21,6 +21,8 @@ · 20 unmodified lines
21#include <linux/timer.h>21#include <linux/timer.h>
22#include <linux/mod_devicetable.h>22#include <linux/mod_devicetable.h>
23 23
24struct input_dev_poller;
25
24/**26/**
25 * struct input_value - input value representation27 * struct input_value - input value representation
26 * @type: type of value (EV_KEY, EV_ABS, etc)28 * @type: type of value (EV_KEY, EV_ABS, etc)
@@ -33,6 +35,13 @@ struct input_value { · 6 unmodified lines
33 __s32 value;35 __s32 value;
34};36};
35 37
38enum input_clock_type {
39 INPUT_CLK_REAL = 0,
40 INPUT_CLK_MONO,
41 INPUT_CLK_BOOT,
42 INPUT_CLK_MAX
43};
44
36/**45/**
37 * struct input_dev - represents an input device46 * struct input_dev - represents an input device
38 * @name: name of the device47 * @name: name of the device
@@ -64,6 +73,8 @@ struct input_value { · 25 unmodified lines
64 * not sleep73 * not sleep
65 * @ff: force feedback structure associated with the device if device74 * @ff: force feedback structure associated with the device if device
66 * supports force feedback effects75 * supports force feedback effects
76 * @poller: poller structure associated with the device if device is
77 * set up to use polling mode
67 * @repeat_key: stores key code of the last key pressed; used to implement78 * @repeat_key: stores key code of the last key pressed; used to implement
68 * software autorepeat79 * software autorepeat
69 * @timer: timer for software autorepeat80 * @timer: timer for software autorepeat
@@ -114,6 +125,8 @@ struct input_value { · 44 unmodified lines
114 * @vals: array of values queued in the current frame125 * @vals: array of values queued in the current frame
115 * @devres_managed: indicates that devices is managed with devres framework126 * @devres_managed: indicates that devices is managed with devres framework
116 * and needs not be explicitly unregistered or freed.127 * and needs not be explicitly unregistered or freed.
128 * @timestamp: storage for a timestamp set by input_set_timestamp called
129 * by a driver
117 */130 */
118struct input_dev {131struct input_dev {
119 const char *name;132 const char *name;
@@ -147,6 +160,8 @@ struct input_dev { · 27 unmodified lines
147 160
148 struct ff_device *ff;161 struct ff_device *ff;
149 162
163 struct input_dev_poller *poller;
164
150 unsigned int repeat_key;165 unsigned int repeat_key;
151 struct timer_list timer;166 struct timer_list timer;
152 167
@@ -184,6 +199,8 @@ struct input_dev { · 31 unmodified lines
184 struct input_value *vals;199 struct input_value *vals;
185 200
186 bool devres_managed;201 bool devres_managed;
202
203 ktime_t timestamp[INPUT_CLK_MAX];
187};204};
188#define to_input_dev(d) container_of(d, struct input_dev, dev)205#define to_input_dev(d) container_of(d, struct input_dev, dev)
189 206
@@ -361,6 +378,12 @@ void input_unregister_device(struct input_dev *); · 171 unmodified lines
361 378
362void input_reset_device(struct input_dev *);379void input_reset_device(struct input_dev *);
363 380
381int input_setup_polling(struct input_dev *dev,
382 void (*poll_fn)(struct input_dev *dev));
383void input_set_poll_interval(struct input_dev *dev, unsigned int interval);
384void input_set_min_poll_interval(struct input_dev *dev, unsigned int interval);
385void input_set_max_poll_interval(struct input_dev *dev, unsigned int interval);
386
364int __must_check input_register_handler(struct input_handler *);387int __must_check input_register_handler(struct input_handler *);
365void input_unregister_handler(struct input_handler *);388void input_unregister_handler(struct input_handler *);
366 389
@@ -382,6 +405,9 @@ void input_close_device(struct input_handle *); · 15 unmodified lines
382 405
383int input_flush_device(struct input_handle *handle, struct file *file);406int input_flush_device(struct input_handle *handle, struct file *file);
384 407
408void input_set_timestamp(struct input_dev *dev, ktime_t timestamp);
409ktime_t *input_get_timestamp(struct input_dev *dev);
410
385void input_event(struct input_dev *dev, unsigned int type, unsigned int code, int value);411void input_event(struct input_dev *dev, unsigned int type, unsigned int code, int value);
386void input_inject_event(struct input_handle *handle, unsigned int type, unsigned int code, int value);412void input_inject_event(struct input_handle *handle, unsigned int type, unsigned int code, int value);
387 413
include/linux/input/bu21013.h+0−34
@@ -1,34 +0,0 @@
1/* SPDX-License-Identifier: GPL-2.0-only */
2/*
3 * Copyright (C) ST-Ericsson SA 2010
4 * Author: Naveen Kumar G <naveen.gaddipati@stericsson.com> for ST-Ericsson
5 */
6
7#ifndef _BU21013_H
8#define _BU21013_H
9
10/**
11 * struct bu21013_platform_device - Handle the platform data
12 * @touch_x_max: touch x max
13 * @touch_y_max: touch y max
14 * @cs_pin: chip select pin
15 * @touch_pin: touch gpio pin
16 * @ext_clk: external clock flag
17 * @x_flip: x flip flag
18 * @y_flip: y flip flag
19 * @wakeup: wakeup flag
20 *
21 * This is used to handle the platform data
22 */
23struct bu21013_platform_device {
24 int touch_x_max;
25 int touch_y_max;
26 unsigned int cs_pin;
27 unsigned int touch_pin;
28 bool ext_clk;
29 bool x_flip;
30 bool y_flip;
31 bool wakeup;
32};
33
34#endif
include/linux/platform_data/keypad-w90p910.h+0−16
@@ -1,16 +0,0 @@
1/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef __ASM_ARCH_W90P910_KEYPAD_H
3#define __ASM_ARCH_W90P910_KEYPAD_H
4
5#include <linux/input/matrix_keypad.h>
6
7extern void mfp_set_groupi(struct device *dev);
8
9struct w90p910_keypad_platform_data {
10 const struct matrix_keymap_data *keymap_data;
11
12 unsigned int prescale;
13 unsigned int debounce;
14};
15
16#endif /* __ASM_ARCH_W90P910_KEYPAD_H */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t