The original 20ms delay is only marginally enough delay after a block write
operation during firmware update. Let's increase the delay to ensure that
the controller finishes up storing the page to avoid failures in the
firmware updates.
Input: uinput - avoid crash when sending FF request to device going away
If FF request comes in while uinput device is going away,
uinput_request_send() will fail with -ENODEV, and uinput_request_submit()
will attempt to mark the slot as unused by calling uinput_request_done().
Unfortunately in this case we haven't initialized request->done completion
yet, and we get a crash:
While we could solve this by simply initializing the completion earlier, we
are better off rearranging the code a bit so we avoid calling complete() on
requests that we did not send out. This patch consolidates marking request
slots as free in one place (in uinput_request_submit(), the same place
where we acquire them) and having everyone else simply signal completion
of the requests.
Fixes: 00ce756ce53a ("Input: uinput - mark failed submission requests as free") Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Input: uinput - avoid FF flush when destroying device
Normally, when input device supporting force feedback effects is being
destroyed, we try to "flush" currently playing effects, so that the
physical device does not continue vibrating (or executing other effects).
Unfortunately this does not work well for uinput as flushing of the effects
deadlocks with the destroy action:
- if device is being destroyed because the file descriptor is being closed,
then there is noone to even service FF requests;
- if device is being destroyed because userspace sent UI_DEV_DESTROY,
while theoretically it could be possible to service FF requests,
userspace is unlikely to do so (they'd need to make sure FF handling
happens on a separate thread) even if kernel solves the issue with FF
ioctls deadlocking with UI_DEV_DESTROY ioctl on udev->mutex.
To avoid lockups like the one below, let's install a custom input device
flush handler, and avoid trying to flush force feedback effects when we
destroying the device, and instead rely on uinput to shut off the device
properly.
Input: xpad - validate USB endpoint type during probe
We should only see devices with interrupt endpoints. Ignore any other
endpoints that we find, so we don't send try to send them interrupt URBs
and trigger a WARN down in the USB stack.
Input: edt-ft5x06 - fix access to non-existing register
reg_addr->reg_report_rate is supposed to exist in M06, not M09.
The driver is written to skip avoids access to non-existing registers
when the register address is NO_REGISTER (0xff). But
reg_addr->reg_report_rate is initialized to 0x00 by devm_kzalloc() (in
edt_ft5x06_ts_probe()) and not changed thereafter. So the checks do
not work and an access to register 0x00 is done.
Fix by setting reg_addr->reg_report_rate to NO_REGISTER.
Also fix the only place where reg_report_rate is checked against zero
instead of NO_REGISTER.
Input: goodix - add support for capacitive home button
On some x86 tablets with a Goodix touchscreen, the Windows logo on the
front is a capacitive home button. Touching this button results in a touch
with bit 4 of the first byte set, while only the lower 4 bits (0-3) are
used to indicate the number of touches.
Report a KEY_LEFTMETA press when this happens.
Note that the hardware might support more than one button, in which
case the "id" byte of coor_data would identify the button in question.
This is not implemented as we don't have access to hardware with
multiple buttons.
Signed-off-by: Sergei A. Trusov <sergei.a.trusov@ya.ru> Acked-by: Bastien Nocera <hadess@hadess.net> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cameron Gutman [Thu, 31 Aug 2017 18:52:20 +0000 (11:52 -0700)]
Input: xpad - fix PowerA init quirk for some gamepad models
The PowerA gamepad initialization quirk worked with the PowerA
wired gamepad I had around (0x24c6:0x543a), but a user reported [0]
that it didn't work for him, even though our gamepads shared the
same vendor and product IDs.
When I initially implemented the PowerA quirk, I wanted to avoid
actually triggering the rumble action during init. My tests showed
that my gamepad would work correctly even if it received a rumble
of 0 intensity, so that's what I went with.
Unfortunately, this apparently isn't true for all models (perhaps
a firmware difference?). This non-working gamepad seems to require
the real magic rumble packet that the Microsoft driver sends, which
actually vibrates the gamepad. To counteract this effect, I still
send the old zero-rumble PowerA quirk packet which cancels the
rumble effect before the motors can spin up enough to vibrate.
Anthony Martin [Mon, 28 Aug 2017 17:26:12 +0000 (10:26 -0700)]
Input: synaptics - fix device info appearing different on reconnect
User-modified input settings no longer survive a suspend/resume cycle.
Starting with 4.12, the touchpad is reinitialized on every reconnect
because the hardware appears to be different. This can be reproduced
by running the following as root:
[30378.295794] psmouse serio1: synaptics: hardware appears to be
different: id(149271-149271), model(114865-114865),
caps(d047b3-d047b1), ext(b40000-b40000).
Note the single bit difference in caps: bit 1 (SYN_CAP_MULTIFINGER).
This happens because we modify our stored copy of the device info
capabilities when we enable advanced gesture mode but this change is
not reflected in the actual hardware capabilities.
It worked in the past because synaptics_query_hardware used to modify
the stored synaptics_device_info struct instead of filling in a new
one, as it does now.
Fix it by no longer faking the SYN_CAP_MULTIFINGER bit when setting
advanced gesture mode. This necessitated a small refactoring.
Fixes: 6c53694fb222 ("Input: synaptics - split device info into a separate structure") Signed-off-by: Anthony Martin <ality@pbrane.org> Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Danilo Krummrich [Mon, 28 Aug 2017 16:59:20 +0000 (09:59 -0700)]
Input: PS/2 gpio bit banging driver for serio bus
This driver provides PS/2 serio bus support by implementing bit banging
with the GPIO API. The GPIO pins, data and clock, can be configured with
a node in the device tree or by generic device properties (GDP).
Writing to a device is supported as well, though it is possible timings
can not be halt as they are tough and difficult to reach with bit banging.
Therefore it can be configured (also in DT and GDP) whether the serio
write function should be available for clients.
This driver is for development purposes and not recommended for productive
use. However, this driver can be useful e.g. when no USB port is available
or using old peripherals is desired as PS/2 controller chips getting rare.
This driver was tested on bcm2825 and on Kirin 960 and it worked well
together with the atkbd and psmouse driver.
Liang Yan [Mon, 28 Aug 2017 16:41:08 +0000 (09:41 -0700)]
Input: xen-kbdfront - enable auto repeat for xen keyboard frontend driver
Long pressed key could not show right in XEN vncviewer after tigervnc
client changed the way how to send repeat keys, from "Down Up Down Up
..." to "Down Down ... Up". This will report autorepeat to input by
checking if same key being pressed, and let handler process it finally.
Signed-off-by: Liang Yan <lyan@suse.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Masaki Ota [Thu, 24 Aug 2017 22:44:36 +0000 (15:44 -0700)]
Input: ALPS - fix two-finger scroll breakage in right side on ALPS touchpad
Fixed the issue that two finger scroll does not work correctly
on V8 protocol. The cause is that V8 protocol X-coordinate decode
is wrong at SS4 PLUS device. I added SS4 PLUS X decode definition.
Mote notes:
the problem manifests itself by the commit e7348396c6d5 ("Input: ALPS
- fix V8+ protocol handling (73 03 28)"), where a fix for the V8+
protocol was applied. Although the culprit must have been present
beforehand, the two-finger scroll worked casually even with the
wrongly reported values by some reason. It got broken by the commit
above just because it changed x_max value, and this made libinput
correctly figuring the MT events. Since the X coord is reported as
falsely doubled, the events on the right-half side go outside the
boundary, thus they are no longer handled. This resulted as a broken
two-finger scroll.
One finger event is decoded differently, and it didn't suffer from
this problem. The problem was only about MT events. --tiwai
Arvind Yadav [Sat, 19 Aug 2017 00:12:40 +0000 (17:12 -0700)]
Input: wacom_w8001 - constify serio_device_id
serio_device_id are not supposed to change at runtime. All functions
working with serio_device_id provided by <linux/serio.h> work with
const serio_device_id. So mark the non-const structs as const.
Arvind Yadav [Sat, 19 Aug 2017 00:12:29 +0000 (17:12 -0700)]
Input: tsc40 - constify serio_device_id
serio_device_id are not supposed to change at runtime. All functions
working with serio_device_id provided by <linux/serio.h> work with
const serio_device_id. So mark the non-const structs as const.
Arvind Yadav [Sat, 19 Aug 2017 00:12:14 +0000 (17:12 -0700)]
Input: touchwin - constify serio_device_id
serio_device_id are not supposed to change at runtime. All functions
working with serio_device_id provided by <linux/serio.h> work with
const serio_device_id. So mark the non-const structs as const.
Arvind Yadav [Sat, 19 Aug 2017 00:12:03 +0000 (17:12 -0700)]
Input: touchright - constify serio_device_id
serio_device_id are not supposed to change at runtime. All functions
working with serio_device_id provided by <linux/serio.h> work with
const serio_device_id. So mark the non-const structs as const.
Arvind Yadav [Sat, 19 Aug 2017 00:11:56 +0000 (17:11 -0700)]
Input: touchit213 - constify serio_device_id
serio_device_id are not supposed to change at runtime. All functions
working with serio_device_id provided by <linux/serio.h> work with
const serio_device_id. So mark the non-const structs as const.
Arvind Yadav [Sat, 19 Aug 2017 00:11:48 +0000 (17:11 -0700)]
Input: penmount - constify serio_device_id
serio_device_id are not supposed to change at runtime. All functions
working with serio_device_id provided by <linux/serio.h> work with
const serio_device_id. So mark the non-const structs as const.
Arvind Yadav [Sat, 19 Aug 2017 00:11:40 +0000 (17:11 -0700)]
Input: mtouch - constify serio_device_id
serio_device_id are not supposed to change at runtime. All functions
working with serio_device_id provided by <linux/serio.h> work with
const serio_device_id. So mark the non-const structs as const.
Arvind Yadav [Sat, 19 Aug 2017 00:11:32 +0000 (17:11 -0700)]
Input: inexio - constify serio_device_id
serio_device_id are not supposed to change at runtime. All functions
working with serio_device_id provided by <linux/serio.h> work with
const serio_device_id. So mark the non-const structs as const.
Arvind Yadav [Sat, 19 Aug 2017 00:11:20 +0000 (17:11 -0700)]
Input: hampshire - constify serio_device_id
serio_device_id are not supposed to change at runtime. All functions
working with serio_device_id provided by <linux/serio.h> work with
const serio_device_id. So mark the non-const structs as const.
Arvind Yadav [Sat, 19 Aug 2017 00:11:12 +0000 (17:11 -0700)]
Input: gunze - constify serio_device_id
serio_device_id are not supposed to change at runtime. All functions
working with serio_device_id provided by <linux/serio.h> work with
const serio_device_id. So mark the non-const structs as const.
Arvind Yadav [Sat, 19 Aug 2017 00:11:04 +0000 (17:11 -0700)]
Input: fujitsu_ts - constify serio_device_id
serio_device_id are not supposed to change at runtime. All functions
working with serio_device_id provided by <linux/serio.h> work with
const serio_device_id. So mark the non-const structs as const.
Arvind Yadav [Sat, 19 Aug 2017 00:10:53 +0000 (17:10 -0700)]
Input: elo - constify serio_device_id
serio_device_id are not supposed to change at runtime. All functions
working with serio_device_id provided by <linux/serio.h> work with
const serio_device_id. So mark the non-const structs as const.
Arvind Yadav [Sat, 19 Aug 2017 00:10:41 +0000 (17:10 -0700)]
Input: dynapro - constify serio_device_id
serio_device_id are not supposed to change at runtime. All functions
working with serio_device_id provided by <linux/serio.h> work with
const serio_device_id. So mark the non-const structs as const.
Arvind Yadav [Sat, 19 Aug 2017 00:10:33 +0000 (17:10 -0700)]
Input: wacom_serial4 - constify serio_device_id
serio_device_id are not supposed to change at runtime. All functions
working with serio_device_id provided by <linux/serio.h> work with
const serio_device_id. So mark the non-const structs as const.
Arvind Yadav [Sat, 19 Aug 2017 00:10:24 +0000 (17:10 -0700)]
Input: constify serio_device_id
serio_device_id are not supposed to change at runtime. All functions
working with serio_device_id provided by <linux/serio.h> work with
const serio_device_id. So mark the non-const structs as const.
Arvind Yadav [Sat, 19 Aug 2017 00:10:13 +0000 (17:10 -0700)]
Input: xtkbd - constify serio_device_id
serio_device_id are not supposed to change at runtime. All functions
working with serio_device_id provided by <linux/serio.h> work with
const serio_device_id. So mark the non-const structs as const.
Arvind Yadav [Sat, 19 Aug 2017 00:10:05 +0000 (17:10 -0700)]
Input: sunkbd - constify serio_device_id
serio_device_id are not supposed to change at runtime. All functions
working with serio_device_id provided by <linux/serio.h> work with
const serio_device_id. So mark the non-const structs as const.
Arvind Yadav [Sat, 19 Aug 2017 00:09:50 +0000 (17:09 -0700)]
Input: stowaway - constify serio_device_id
serio_device_id are not supposed to change at runtime. All functions
working with serio_device_id provided by <linux/serio.h> work with
const serio_device_id. So mark the non-const structs as const.
Arvind Yadav [Sat, 19 Aug 2017 00:09:41 +0000 (17:09 -0700)]
Input: newtonkbd - constify serio_device_id
serio_device_id are not supposed to change at runtime. All functions
working with serio_device_id provided by <linux/serio.h> work with
const serio_device_id. So mark the non-const structs as const.
Arvind Yadav [Sat, 19 Aug 2017 00:09:31 +0000 (17:09 -0700)]
Input: lkkbd - constify serio_device_id
serio_device_id are not supposed to change at runtime. All functions
working with serio_device_id provided by <linux/serio.h> work with
const serio_device_id. So mark the non-const structs as const.
Arvind Yadav [Sat, 19 Aug 2017 00:09:21 +0000 (17:09 -0700)]
Input: hil_kbd - constify serio_device_id
serio_device_id are not supposed to change at runtime. All functions
working with serio_device_id provided by <linux/serio.h> work with
const serio_device_id. So mark the non-const structs as const.
Arvind Yadav [Sat, 19 Aug 2017 00:09:14 +0000 (17:09 -0700)]
Input: iatkbd - constify serio_device_id
serio_device_id are not supposed to change at runtime. All functions
working with serio_device_id provided by <linux/serio.h> work with
const serio_device_id. So mark the non-const structs as const.
Arvind Yadav [Sat, 19 Aug 2017 00:09:05 +0000 (17:09 -0700)]
Input: zhenhua - constify serio_device_id
serio_device_id are not supposed to change at runtime. All functions
working with serio_device_id provided by <linux/serio.h> work with
const serio_device_id. So mark the non-const structs as const.
Arvind Yadav [Sat, 19 Aug 2017 00:08:52 +0000 (17:08 -0700)]
Input: warrior - constify serio_device_id
serio_device_id are not supposed to change at runtime. All functions
working with serio_device_id provided by <linux/serio.h> work with
const serio_device_id. So mark the non-const structs as const.
Arvind Yadav [Sat, 19 Aug 2017 00:08:41 +0000 (17:08 -0700)]
Input: twidjoy - constify serio_device_id
serio_device_id are not supposed to change at runtime. All functions
working with serio_device_id provided by <linux/serio.h> work with
const serio_device_id. So mark the non-const structs as const.
Arvind Yadav [Sat, 19 Aug 2017 00:08:29 +0000 (17:08 -0700)]
Input: stinger - constify serio_device_id
serio_device_id are not supposed to change at runtime. All functions
working with serio_device_id provided by <linux/serio.h> work with
const serio_device_id. So mark the non-const structs as const.
Arvind Yadav [Sat, 19 Aug 2017 00:08:17 +0000 (17:08 -0700)]
Input: spaceorb - constify serio_device_id
serio_device_id are not supposed to change at runtime. All functions
working with serio_device_id provided by <linux/serio.h> work with
const serio_device_id. So mark the non-const structs as const.
Arvind Yadav [Sat, 19 Aug 2017 00:08:02 +0000 (17:08 -0700)]
Input: spaceball - constify serio_device_id
serio_device_id are not supposed to change at runtime. All functions
working with serio_device_id provided by <linux/serio.h> work with
const serio_device_id. So mark the non-const structs as const.
Arvind Yadav [Sat, 19 Aug 2017 00:07:48 +0000 (17:07 -0700)]
Input: magellan - constify serio_device_id
serio_device_id are not supposed to change at runtime. All functions
working with serio_device_id provided by <linux/serio.h> work with
const serio_device_id. So mark the non-const structs as const.
Arvind Yadav [Sat, 19 Aug 2017 00:07:32 +0000 (17:07 -0700)]
Input: iforce - constify serio_device_id
serio_device_id are not supposed to change at runtime. All functions
working with serio_device_id provided by <linux/serio.h> work with
const serio_device_id. So mark the non-const structs as const.
KT Liao [Fri, 18 Aug 2017 23:49:53 +0000 (16:49 -0700)]
Input: elan_i2c - support touchpads with two physical buttons
Elan touchpads on Asus ROG G752xx series laptops have 2 physical buttons.
Luckily we can query the touchpad to see if it is a clickpad variant and
adjust the behavior accordingly.
Arvind Yadav [Thu, 17 Aug 2017 00:43:10 +0000 (17:43 -0700)]
Input: i8042 - constify pnp_device_id
pnp_device_id are not supposed to change at runtime. All functions
working with pnp_device_id provided by <linux/pnp.h> work with
const pnp_device_id. So mark the non-const structs as const.
Quentin Schulz [Tue, 15 Aug 2017 05:16:27 +0000 (22:16 -0700)]
Input: axp20x-pek - use driver_data of platform_device_id instead of extended attributes
To prepare an upcoming patch adding support for another PMIC that has
different startup and shutdown time, use driver_data of
platform_device_id instead of a fixed extended device attribute.
By doing so, we also remove a lot of nested structures that aren't
useful.
With this patch, a new PMIC can be easily supported by just filling
correctly its ax20x_info structure and adding a platform_device_id.
Moreover, since we get rid of extended attributes, rename
axp20x_store_ext_attr to axp20x_store_attr and axp20x_show_ext_attr to
axp20x_show_attr.
Arvind Yadav [Tue, 15 Aug 2017 05:10:55 +0000 (22:10 -0700)]
Input: ati_remote2 - constify usb_device_id
usb_device_id are not supposed to change at runtime. All functions
working with usb_device_id provided by <linux/usb.h> work with
const usb_device_id. So mark the non-const structs as const.
The thermal_zone_of_device_ops structure is only passed as the fourth
argument to devm_thermal_zone_of_sensor_register, which is declared
as const. Thus the thermal_zone_of_device_ops structure itself can
be const.
Done with the help of Coccinelle.
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Munir Contractor [Tue, 15 Aug 2017 05:02:08 +0000 (22:02 -0700)]
Input: pcspkr - fix code style and error value in pcspkr_event
This patch fixes the following issues in pcspkr:
* Return -EINVAL when input arguments are not valid in pcspkr_event
function instead of -1.
* Replace <asm/io.h> with <linux/io.h>
* Fix indentation of case blocks in switch statement
* Reduce length of line 28 to less than 80 characters
The style issues were discovered by checkpatch.pl script.
Pan Bian [Mon, 14 Aug 2017 17:29:13 +0000 (10:29 -0700)]
Input: mxs-lradc - use correct error check
Function devm_ioremap() will return a NULL pointer on failure. However,
in function mxs_lradc_ts_probe(), its return value is checked with
IS_ERR(), which cannot detect the exceptional case.
Signed-off-by: Pan Bian <bianpan2016@163.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Arvind Yadav [Tue, 8 Aug 2017 03:04:13 +0000 (20:04 -0700)]
Input: xpad - constify usb_device_id
usb_device_id are not supposed to change at runtime. All functions
working with usb_device_id provided by <linux/usb.h> work with
const usb_device_id. So mark the non-const structs as const.
Arvind Yadav [Tue, 8 Aug 2017 02:45:14 +0000 (19:45 -0700)]
Input: kbtab - constify usb_device_id
usb_device_id are not supposed to change at runtime. All functions
working with usb_device_id provided by <linux/usb.h> work with
const usb_device_id. So mark the non-const structs as const.
Arvind Yadav [Tue, 8 Aug 2017 02:44:49 +0000 (19:44 -0700)]
Input: acecad - constify usb_device_idi and fix space before '[' error
usb_device_id are not supposed to change at runtime. All functions
working with usb_device_id provided by <linux/usb.h> work with
const usb_device_id. So mark the non-const structs as const.
Fix checkpatch.pl error:
ERROR: space prohibited before open square bracket '['.
Arvind Yadav [Tue, 8 Aug 2017 02:44:37 +0000 (19:44 -0700)]
Input: synaptics_usb - constify usb_device_id
usb_device_id are not supposed to change at runtime. All functions
working with usb_device_id provided by <linux/usb.h> work with
const usb_device_id. So mark the non-const structs as const.
Arvind Yadav [Tue, 8 Aug 2017 02:44:25 +0000 (19:44 -0700)]
Input: appletouch - constify usb_device_id
usb_device_id are not supposed to change at runtime. All functions
working with usb_device_id provided by <linux/usb.h> work with
const usb_device_id. So mark the non-const structs as const.
Arvind Yadav [Tue, 8 Aug 2017 02:44:10 +0000 (19:44 -0700)]
Input: powermate - constify usb_device_id and fix space before '[' error
usb_device_id are not supposed to change at runtime. All functions
working with usb_device_id provided by <linux/usb.h> work with
const usb_device_id. So mark the non-const structs as const.
Fix checkpatch.pl error:
ERROR: space prohibited before open square bracket '['.
Arvind Yadav [Tue, 8 Aug 2017 02:43:52 +0000 (19:43 -0700)]
Input: keyspan_remote - constify usb_device_id
usb_device_id are not supposed to change at runtime. All functions
working with usb_device_id provided by <linux/usb.h> work with
const usb_device_id. So mark the non-const structs as const.
Arvind Yadav [Tue, 8 Aug 2017 02:43:18 +0000 (19:43 -0700)]
Input: iforce - constify usb_device_id and fix space before '[' error
usb_device_id are not supposed to change at runtime. All functions
working with usb_device_id provided by <linux/usb.h> work with
const usb_device_id. So mark the non-const structs as const.
Fix checkpatch.pl error:
ERROR: space prohibited before open square bracket '['.
Nick Desaulniers [Sun, 25 Jun 2017 05:50:12 +0000 (22:50 -0700)]
Input: mousedev - fix implicit conversion warning
Clang warns:
drivers/input/mousedev.c:653:63: error: implicit conversion from 'int'
to 'signed char' changes value from 200 to -56
[-Wconstant-conversion]
client->ps2[1] = 0x60; client->ps2[2] = 3; client->ps2[3] = 200;
~ ^~~
As the PS2 data is really a stream of bytes, let's switch to using u8 type
for it, which silences this warning.
Signed-off-by: Nick Desaulniers <nick.desaulniers@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
driver core: add devm_device_add_group() and friends
Many drivers create additional driver-specific device attributes when
binding to the device, and providing managed version of
device_create_group() will simplify unbinding and error handling in probe
path for such drivers.
Without managed version driver writers either have to mix manual and
managed resources, which is prone to errors, or open-code this function by
providing a wrapper to device_add_group() and use it with devm_add_action()
or devm_add_action_or_reset().
We have helpers that work with NULL terminated array of groups, but many
drivers only create a single supplemental group, and do not want to declare
a group array. Let's provide them with helpers working with a single group.
driver core: make device_{add|remove}_groups() public
Many drivers create additional driver-specific device attributes when
binding to the device. To avoid them calling SYSFS API directly, let's
export these helpers.
driver core: emit uevents when device is bound to a driver
There are certain touch controllers that may come up in either normal
(application) or boot mode, depending on whether firmware/configuration is
corrupted when they are powered on. In boot mode the kernel does not create
input device instance (because it does not necessarily know the
characteristics of the input device in question).
Another number of controllers does not store firmware in a non-volatile
memory, and they similarly need to have firmware loaded before input device
instance is created. There are also other types of devices with similar
behavior.
There is a desire to be able to trigger firmware loading via udev, but it
has to happen only when driver is bound to a physical device (i2c or spi).
These udev actions can not use ADD events, as those happen too early, so we
are introducing BIND and UNBIND events that are emitted at the right
moment.
Also, many drivers create additional driver-specific device attributes
when binding to the device, to provide userspace with additional controls.
The new events allow userspace to adjust these driver-specific attributes
without worrying that they are not there yet.
Oscar Campos [Wed, 19 Jul 2017 00:20:36 +0000 (17:20 -0700)]
Input: trackpoint - assume 3 buttons when buttons detection fails
Trackpoint buttons detection fails on ThinkPad 570 and 470 series,
this makes the middle button of the trackpoint to not being recogized.
As I don't believe there is any trackpoint with less than 3 buttons this
patch just assumes three buttons when the extended button information
read fails.
Signed-off-by: Oscar Campos <oscar.campos@member.fsf.org> Acked-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Input: sur40 - skip all blobs that are not touches
The SUR40 labels all reported blobs as touch, token, or generic blob.
Previously, all blobs were reported as touch regardless of type, causing
lots of false positives. Present patch fixes this.
Input: sur40 - add additional reverse-engineered information
Due to recent reverse engineering efforts, a lot more information is now
available about the internals of the SUR40. We document this in the kernel
driver for future use.
attribute_groups are not supposed to change at runtime. All functions
working with attribute_groups provided by <linux/sysfs.h> work with const
attribute_group. So mark the non-const structs as const.
File size before:
text data bss dec hex filename
9086 624 0 9710 25ee drivers/input/touchscreen/ads7846.o
File size After adding 'const':
text data bss dec hex filename
9198 496 0 9694 25de drivers/input/touchscreen/ads7846.o
attribute_groups are not supposed to change at runtime. All functions
working with attribute_groups provided by <linux/sysfs.h> work with const
attribute_group. So mark the non-const structs as const.
File size before:
text data bss dec hex filename
9448 1008 0 10456 28d8 drivers/input/touchscreen/elants_i2c.o
File size After adding 'const':
text data bss dec hex filename
9496 944 0 10440 28c8 drivers/input/touchscreen/elants_i2c.o
attribute_groups are not supposed to change at runtime. All functions
working with attribute_groups provided by <linux/sysfs.h> work with const
attribute_group. So mark the non-const structs as const.
File size before:
text data bss dec hex filename
7801 560 0 8361 20a9 drivers/input/touchscreen/raydium_i2c_ts.o
File size After adding 'const':
text data bss dec hex filename
7849 496 0 8345 2099 drivers/input/touchscreen/raydium_i2c_ts.o
attribute_groups are not supposed to change at runtime. All functions
working with attribute_groups provided by <linux/sysfs.h> work with const
attribute_group. So mark the non-const structs as const.
File size before:
text data bss dec hex filename
12850 740 12 13602 3522 drivers/input/mouse/psmouse-base.o
File size After adding 'const':
text data bss dec hex filename
12914 676 12 13602 3522 drivers/input/mouse/psmouse-base.o
attribute_groups are not supposed to change at runtime. All functions
working with attribute_groups provided by <linux/sysfs.h> work with const
attribute_group. So mark the non-const structs as const.
File size before:
text data bss dec hex filename
16815 1424 0 18239 473f drivers/input/mouse/elantech.o
File size After adding 'const':
text data bss dec hex filename
16879 1360 0 18239 473f drivers/input/mouse/elantech.o
attribute_groups are not supposed to change at runtime. All functions
working with attribute_groups provided by <linux/sysfs.h> work with const
attribute_group. So mark the non-const structs as const.
File size before:
text data bss dec hex filename
5693 464 0 6157 180d drivers/input/keyboard/gpio_keys.o
File size After adding 'const':
text data bss dec hex filename
5749 400 0 6149 1805 drivers/input/keyboard/gpio_keys.o