27 Mar, 2020
2 commits
-
Pull input fixes from Dmitry Torokhov:
- a fix to generate proper timestamps on key autorepeat events that
were broken recently- a fix for Synaptics driver to only activate reduced reporting mode
when explicitly requested- a new keycode for "selective screenshot" function
- other assorted fixes
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: fix stale timestamp on key autorepeat events
Input: move the new KEY_SELECTIVE_SCREENSHOT keycode
Input: avoid BIT() macro usage in the serio.h UAPI header
Input: synaptics-rmi4 - set reduced reporting mode only when requested
Input: synaptics - enable RMI on HP Envy 13-ad105ng
Input: allocate keycode for "Selective Screenshot" key
Input: tm2-touchkey - add support for Coreriver TC360 variant
dt-bindings: input: add Coreriver TC360 binding
dt-bindings: vendor-prefixes: Add Coreriver vendor prefix
Input: raydium_i2c_ts - fix error codes in raydium_i2c_boot_trigger() -
We need to refresh timestamp when emitting key autorepeat events, otherwise
they will carry timestamp of the original key press event.Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=206929
Fixes: 3b51c44bd693 ("Input: allow drivers specify timestamp for input events")
Cc: stable@vger.kernel.org
Reported-by: teika kazura
Tested-by: teika kazura
Signed-off-by: Dmitry Torokhov
04 Feb, 2020
1 commit
-
The most notable change is DEFINE_SHOW_ATTRIBUTE macro split in
seq_file.h.Conversion rule is:
llseek => proc_lseek
unlocked_ioctl => proc_ioctlxxx => proc_xxx
delete ".owner = THIS_MODULE" line
[akpm@linux-foundation.org: fix drivers/isdn/capi/kcapi_proc.c]
[sfr@canb.auug.org.au: fix kernel/sched/psi.c]
Link: http://lkml.kernel.org/r/20200122180545.36222f50@canb.auug.org.au
Link: http://lkml.kernel.org/r/20191225172546.GB13378@avx2
Signed-off-by: Alexey Dobriyan
Signed-off-by: Stephen Rothwell
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
14 Dec, 2019
1 commit
-
If we happen to have a garbage in input device's keycode table with values
too big we'll end up doing clear_bit() with offset way outside of our
bitmaps, damaging other objects within an input device or even outside of
it. Let's add sanity checks to the returned old keycodes.Reported-by: syzbot+c769968809f9359b07aa@syzkaller.appspotmail.com
Reported-by: syzbot+76f3a30e88d256644c78@syzkaller.appspotmail.com
Link: https://lore.kernel.org/r/20191207212757.GA245964@dtor-ws
Signed-off-by: Dmitry Torokhov
06 Sep, 2019
1 commit
-
We need to reset input device's timestamp on input_sync(), otherwise
drivers not using input_set_timestamp() will end up with a stale
timestamp after their clients consume first input event.Fixes: 3b51c44bd693 ("Input: allow drivers specify timestamp for input events")
Reported-by: John Stultz
Signed-off-by: Dmitry Torokhov
21 Aug, 2019
1 commit
-
Separating "normal" and "polled" input devices was a mistake, as often we
want to allow the very same device work on both interrupt-driven and
polled mode, depending on the board on which the device is used.This introduces new APIs:
- input_setup_polling
- input_set_poll_interval
- input_set_min_poll_interval
- input_set_max_poll_intervalThese new APIs allow switching an input device into polled mode with sysfs
attributes matching drivers using input_polled_dev APIs that will be
eventually removed.Tested-by: Michal Vokáč
Acked-by: Benjamin Tissoires
Signed-off-by: Dmitry Torokhov
25 Jul, 2019
1 commit
-
Currently, evdev stamps events with timestamps acquired in evdev_events()
However, this timestamping may not be accurate in terms of measuring
when the actual event happened.Let's allow individual drivers specify timestamp in order to provide a more
accurate sense of time for the event. It is expected that drivers will set the
timestamp in their hard interrupt routine.Signed-off-by: Atif Niyaz
Signed-off-by: Dmitry Torokhov
19 Jun, 2019
1 commit
-
Based on 2 normalized pattern(s):
this program is free software you can redistribute it and or modify
it under the terms of the gnu general public license version 2 as
published by the free software foundationthis program is free software you can redistribute it and or modify
it under the terms of the gnu general public license version 2 as
published by the free software foundation #extracted by the scancode license scanner the SPDX license identifier
GPL-2.0-only
has been chosen to replace the boilerplate/reference in 4122 file(s).
Signed-off-by: Thomas Gleixner
Reviewed-by: Enrico Weigelt
Reviewed-by: Kate Stewart
Reviewed-by: Allison Randal
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190604081206.933168790@linutronix.de
Signed-off-by: Greg Kroah-Hartman
09 Aug, 2018
1 commit
-
Some of fuzzers set panic_on_warn=1 so that they can handle WARN()ings
the same way they handle full-blown kernel crashes. We used WARN() in
input_alloc_absinfo() to get a better idea where memory allocation
failed, but since then kmalloc() and friends started dumping call stack on
memory allocation failures anyway, so we are not getting anything extra
from WARN().Because of the above, let's replace WARN with dev_err(). We use dev_err()
instead of simply removing message and relying on kcalloc() to give us
stack dump so that we'd know the instance of hardware device to which we
were trying to attach input device.Reported-by: Dmitry Vyukov
Acked-by: Dmitry Vyukov
Signed-off-by: Dmitry Torokhov
16 May, 2018
1 commit
-
Change hardcoded string "input_set_capability" in pr_err() function call,
replace it with "%s" __func__ instead.Signed-off-by: Nick Simonov
Signed-off-by: Dmitry Torokhov
12 Feb, 2018
1 commit
-
This is the mindless scripted replacement of kernel use of POLL*
variables as described by Al, done by this script:for V in IN OUT PRI ERR RDNORM RDBAND WRNORM WRBAND HUP RDHUP NVAL MSG; do
L=`git grep -l -w POLL$V | grep -v '^t' | grep -v /um/ | grep -v '^sa' | grep -v '/poll.h$'|grep -v '^D'`
for f in $L; do sed -i "-es/^\([^\"]*\)\(\\)/\\1E\\2/" $f; done
donewith de-mangling cleanups yet to come.
NOTE! On almost all architectures, the EPOLL* constants have the same
values as the POLL* constants do. But they keyword here is "almost".
For various bad reasons they aren't the same, and epoll() doesn't
actually work quite correctly in some cases due to this on Sparc et al.The next patch from Al will sort out the final differences, and we
should be all done.Scripted-by: Al Viro
Signed-off-by: Linus Torvalds
29 Nov, 2017
1 commit
-
Signed-off-by: Al Viro
22 Nov, 2017
1 commit
-
With all callbacks converted, and the timer callback prototype
switched over, the TIMER_FUNC_TYPE cast is no longer needed,
so remove it. Conversion was done with the following scripts:perl -pi -e 's|\(TIMER_FUNC_TYPE\)||g' \
$(git grep TIMER_FUNC_TYPE | cut -d: -f1 | sort -u)perl -pi -e 's|\(TIMER_DATA_TYPE\)||g' \
$(git grep TIMER_DATA_TYPE | cut -d: -f1 | sort -u)The now unused macros are also dropped from include/linux/timer.h.
Signed-off-by: Kees Cook
04 Nov, 2017
1 commit
-
In preparation for unconditionally passing the struct timer_list pointer to
all timer callbacks, switch to using the new timer_setup() and from_timer()
to pass the timer pointer explicitly.Signed-off-by: Kees Cook
Signed-off-by: Dmitry Torokhov
20 Oct, 2017
2 commits
-
Let's allow matching input devices on their property bits, both in-kernel
and when generating module aliases.Tested-by: Roderick Colenbrander
Signed-off-by: Dmitry Torokhov -
Factor out and export input_match_device_id() so that modules may use it.
It will be needed by joydev to blacklist accelerometers in composite
devices.Tested-by: Roderick Colenbrander
Signed-off-by: Dmitry Torokhov
13 Jul, 2017
1 commit
-
attribute_groups are not supposed to change at runtime. All functions
working with attribute_groups provided by work with const
attribute_group. So mark the non-const structs as const.File size before:
text data bss dec hex filename
17755 1312 16 19083 4a8b drivers/input/input.oFile size After adding 'const':
text data bss dec hex filename
17947 1120 16 19083 4a8b drivers/input/input.oSigned-off-by: Arvind Yadav
Signed-off-by: Dmitry Torokhov
11 May, 2017
3 commits
-
Instead of specifying type explicitly, derive it from the type of pointer
when allocating memory, which is considered safer practice.Signed-off-by: Markus Elfring
Signed-off-by: Dmitry Torokhov -
Use seq_puts() when printing a string which does not contain a data format
specification.Signed-off-by: Markus Elfring
Signed-off-by: Dmitry Torokhov -
Switch to using seq_putc() when printing a single character '0'.
Signed-off-by: Markus Elfring
Signed-off-by: Dmitry Torokhov
02 Feb, 2017
1 commit
-
If device is supposed to send absolute events (i.e. EV_ABS bit is set in
dev->evbit) but dev->absinfo is not allocated, then the driver has done
something wrong, and we should not register such device. Otherwise we'll
crash later, when driver tries to send absolute event.Reviewed-by: Benjamin Tissoires
Acked-by: Jiri Kosina
Signed-off-by: Dmitry Torokhov
25 Jan, 2017
1 commit
-
Declare device_type structures as const as they are only stored in the
type field of a device structure. This field is of type const, so add
const to declaration of device_type structures.File size before:
text data bss dec hex filename
17184 1344 80 18608 48b0 drivers/input/input.oFile size after:
text data bss dec hex filename
17248 1280 80 18608 48b0 drivers/input/input.oFile size before:
text data bss dec hex filename
2355 384 8 2747 abb drivers/input/rmi4/rmi_bus.oFile size after:
text data bss dec hex filename
2483 264 8 2755 ac3 drivers/input/rmi4/rmi_bus.oSigned-off-by: Bhumika Goyal
Signed-off-by: Dmitry Torokhov
20 Jul, 2016
1 commit
-
Sync up to bring in wacom_w8001 changes to avoid merge conflicts later.
20 May, 2016
1 commit
-
Commit 4369c64c79a22 ("Input: Send events one packet at a time")
significantly reduced amount of entropy input core was feeding to the rest
of the system, because only the very first event in the event block would
be used as source of entropy.With this change we will be calling add_input_randomness() for every event
that is not filtered by the input core as a duplicate. In addition, all
EV_SYN events are ignored.Acked-by: Henrik Rydberg
Acked-by: Benjamin Tissoires
Acked-by: Jiri Kosina
Signed-off-by: Dmitry Torokhov
26 Mar, 2016
1 commit
-
INPUT_COMPAT_TEST became much simpler after commit f4056b52845283
("input: redefine INPUT_COMPAT_TEST as in_compat_syscall()") so we can
cleanly eliminate it altogether.Acked-by: Dmitry Torokhov
Cc: Andy Lutomirski
Cc: Andy Lutomirski
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
14 Oct, 2015
1 commit
-
Add new function input_enable_softrepeat() that allows drivers to
initialize their own values for input_dev->rep[REP_DELAY] and
input_dev->rep[REP_PERIOD], but also use the software autorepeat
functionality from input.c.For example, a HID driver could do:
static void xyz_input_configured(struct hid_device *hid,
struct hid_input *hidinput)
{
input_enable_softrepeat(hidinput->input, 400, 100);
}static struct hid_driver xyz_driver = {
.input_configured = xyz_input_configured,
}Signed-off-by: Petri Gynther
Signed-off-by: Dmitry Torokhov
08 Aug, 2015
1 commit
-
Do not emit EV_SYN/SYN_REPORT on suspend if there were no keys that are
still pressed as we are suspending the device (and in all other cases when
input core is forcibly releasing keys via input_dev_release_keys() call).Reviewed-by: Benson Leung
Signed-off-by: Dmitry Torokhov
26 Jun, 2015
1 commit
-
Instead of iterating over all bits in a bitmap and test them individually
let's siwtch to for_each_set_bit() which is more compact and is also
faster.Also use bitmap_weight() when counting number of set bits.
This also fixes INPUT_DO_TOGGLE() implementation as it should have used
*_CNT as the upper boundary, not *_MAX.Signed-off-by: Anshul Garg
Signed-off-by: Dmitry Torokhov
21 May, 2015
1 commit
-
Signed-off-by: Shailendra Verma
Signed-off-by: Dmitry Torokhov
09 Jan, 2015
2 commits
-
If given input handler is not a filter there is no point is iterating list
of events in a packet to see if some of them need to be filtered out.Signed-off-by: Anshul Garg
Signed-off-by: Dmitry Torokhov -
If a device does not support autorepeat or does not emit any key events we
should not be scanning all events in a packet to decide if we should start
or stop autorepeat function.Signed-off-by: Anshul Garg
Signed-off-by: Dmitry Torokhov
16 Dec, 2014
1 commit
-
This patch avoids unnecessary operations while estimating events per
packet for an input device when event type is not set.Signed-off-by: Anshul Garg
Signed-off-by: Dmitry Torokhov
03 Dec, 2014
1 commit
-
Let's initializes input_no to -1 in order to avoid extra subtraction
operation performed every time we allocate an input device.Signed-off-by: Aniroop Mathur
Signed-off-by: Dmitry Torokhov
10 Oct, 2014
1 commit
-
Fix the format string for input device name generation to avoid negative
device numbers when the id exceeds the maximum signed integer value.Signed-off-by: Richard Leitner
Signed-off-by: Dmitry Torokhov
09 Oct, 2014
1 commit
-
Let's automatically set EV_ABS bit in device's event type list when calling
input_set_abs_params() so that drivers do not have to do it explicitly.These calls are never in a hot paths so we won't lose much time by setting
the same bit several times.Reviewed-by: David Herrmann
Signed-off-by: Dmitry Torokhov
21 Jul, 2014
1 commit
-
We attempt to remove noise from coordinates reported by devices in
input_handle_abs_event(), unfortunately, unless we were dropping the
event altogether, we were ignoring the adjusted value and were passing
on the original value instead.Cc: stable@vger.kernel.org
Reviewed-by: Andrew de los Reyes
Reviewed-by: Benson Leung
Reviewed-by: David Herrmann
Reviewed-by: Henrik Rydberg
Signed-off-by: Dmitry Torokhov
24 Jan, 2014
1 commit
-
First round of input updates for 3.14.
01 Jan, 2014
1 commit
-
We need to make sure we allocate absinfo data when we are setting one of
EV_ABS/ABS_XXX capabilities, otherwise we may bomb when we try to emit this
event.Rested-by: Paul Cercueil
Signed-off-by: Dmitry Torokhov
16 Dec, 2013
1 commit
-
When waking up the platform by pressing a specific key, sending a
release on that key makes it impossible to react on the event in
user-space. This is fixed by moving the input_reset_device() call to
resume instead.[dmitry.torokhov@gmail.com: make sure we still restore LED/sound state
after resume, handle hibernation properly]Signed-off-by: Aleksej Makarov
Signed-off-by: Oskar Andero
Signed-off-by: Dmitry Torokhov
15 Nov, 2013
1 commit
-
Merge first round of changes for 3.13 merge window.