linux/drivers/input
Luca Weiss d09dbc7a01 Input: drv260x - fix magnitude handling
First of all, previously the 16-bit magnitude was written as-is to the
device which actually discarded the upper 8 bits since the device has
8-bit registers only. This meant that a strong_magnitude of 0xFF00 would
result in 0. To correct this shift the strong_magnitude / weak_magnitude
input values so we discard the lower 8 bits and keep the upper bits
instead.

Secondly the RTP mode that is used by default interprets the values as
signed (2s complement), so 0x81 = 0%, 0x00 = 50%, 0x7F = 100%. This
doesn't match the FF_RUMBLE interface at all, so let's tell the device
to interpret the data as unsigned instead which gets us 0x00 = 0% and
0xFF = 100%.

As last change switch ERM to using "Closed-Loop Mode, Unidirectional"
instead of "Open-Loop Mode" since it's recommended by the datasheet
compared to open loop and better matches our use case of 0% - 100%
vibration.

Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
Link: https://lore.kernel.org/r/20230430-drv260x-improvements-v1-4-1fb28b4cc698@z3ntu.xyz
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2023-05-01 17:07:12 -07:00
..
gameport input: drop empty comment blocks 2022-09-29 16:25:42 -07:00
joystick Revert "Input: xpad - fix support for some third-party controllers" 2023-05-01 15:14:06 -07:00
keyboard Input: iqs62x-keys - suppress duplicated error message in .remove() 2023-03-19 21:34:24 -07:00
misc Input: drv260x - fix magnitude handling 2023-05-01 17:07:12 -07:00
mouse Input updates for 6.3 merge window: 2023-02-25 15:01:32 -08:00
rmi4 Input: synaptics-rmi4 - fix function name in kerneldoc 2023-04-13 23:25:35 -07:00
serio Input updates for 6.3 merge window: 2023-02-25 15:01:32 -08:00
tablet input: drop empty comment blocks 2022-09-29 16:25:42 -07:00
tests Input: Add KUnit tests for some of the input core helper functions 2023-04-01 22:47:04 -07:00
touchscreen Input: raspberrypi-ts - fix refcount leak in rpi_ts_probe 2023-04-13 23:08:11 -07:00
apm-power.c
evbug.c Input: evbug - remove an empty comment block 2021-05-24 21:06:39 -07:00
evdev.c Input: evdev - per-client waitgroups 2020-10-06 18:34:15 -07:00
ff-core.c input: drop empty comment blocks 2022-09-29 16:25:42 -07:00
ff-memless.c input: drop empty comment blocks 2022-09-29 16:25:42 -07:00
input-compat.c
input-compat.h
input-core-private.h Input: deactivate MT slots when inhibiting or suspending devices 2022-07-20 11:35:13 -07:00
input-leds.c
input-mt.c Input: deactivate MT slots when inhibiting or suspending devices 2022-07-20 11:35:13 -07:00
input-poller.c Input: use input_device_enabled() 2020-12-02 22:10:33 -08:00
input-poller.h
input.c Input updates for 6.3 merge window: 2023-02-25 15:01:32 -08:00
joydev.c Input: joydev - fix comment typo 2022-09-25 00:57:25 -07:00
Kconfig Input: Add KUnit tests for some of the input core helper functions 2023-04-01 22:47:04 -07:00
Makefile Input: Add KUnit tests for some of the input core helper functions 2023-04-01 22:47:04 -07:00
matrix-keymap.c
mousedev.c
sparse-keymap.c Input: Use fallthrough pseudo-keyword 2020-07-07 11:25:54 -07:00
touchscreen.c Input: touchscreen - avoid bitwise vs logical OR warning 2021-10-15 22:22:54 -07:00
vivaldi-fmap.c Input: extract ChromeOS vivaldi physmap show function 2022-03-14 21:11:09 -07:00