summaryrefslogtreecommitdiffstats
path: root/Documentation/input
Commit message (Collapse)AuthorAgeFilesLines
* input: docs: properly format ToC headingsVegard Nossum2023-11-173-12/+3
| | | | | | | | | | | | | | "class:: toc-title" was a workaround for older Sphinx versions that are no longer supported. The canonical way to add a heading to the ToC is to use :caption:. Do that. Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: linux-input@vger.kernel.org Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/20231027081830.195056-8-vegard.nossum@oracle.com
* input: docs: pxrc: remove reference to phoenix-simMarcus Folkesson2023-08-281-4/+3
| | | | | | | | | | The reference undeniably points to something unrelated nowadays. Remove it. Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com> Suggested-by: Mark Olsson <mark@markolsson.se> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/20230824-pxrc-doc-v1-1-038b75a2ef05@gmail.com
* Documentation: Fix typosBjorn Helgaas2023-08-182-2/+2
| | | | | | | | Fix typos in Documentation. Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Link: https://lore.kernel.org/r/20230814212822.193684-4-helgaas@kernel.org Signed-off-by: Jonathan Corbet <corbet@lwn.net>
* Input: xpad - spelling fixes for "Xbox"Ismael Ferreras Morezuelas2023-05-222-6/+6
| | | | | | | | | | | | The Linux kernel is notorious for misspelling X-Box, X-box, XBox or XBOX; the official spelling is actually just Xbox. Plain and simple. Tried to respect the existing notes but still following the style guide. No functional changes intended. This only affects ancillary parts. Signed-off-by: Ismael Ferreras Morezuelas <swyterzone@gmail.com> Link: https://lore.kernel.org/r/401b1d94-1348-15fd-b48f-a80e8885c7a4@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* Docs/subsystem-apis: Remove '[The ]Linux' prefixes from titles of listed ↵SeongJae Park2023-01-241-3/+3
| | | | | | | | | | | | | | | documents Some documents that listed on subsystem-apis have 'Linux' or 'The Linux' title prefixes. It's duplicated information, and makes finding the document of interest with human eyes not easy. Remove the prefixes from the titles. Signed-off-by: SeongJae Park <sj@kernel.org> Acked-by: Iwona Winiarska <iwona.winiarska@intel.com> Acked-by: Bjorn Helgaas <bhelgaas@google.com> Link: https://lore.kernel.org/r/20230122184834.181977-1-sj@kernel.org Signed-off-by: Jonathan Corbet <corbet@lwn.net>
* Merge branch 'next' into for-linusDmitry Torokhov2022-10-092-0/+12
|\ | | | | | | Prepare input updates for 6.1 merge window.
| * Input: add ABS_PROFILE to uapi and documentationNate Yocom2022-09-282-0/+12
| | | | | | | | | | | | | | | | | | Define new ABS_PROFILE axis for input devices which need it, e.g. X-Box Adaptive Controller and X-Box Elite 2. Signed-off-by: Nate Yocom <nate@yocom.org> Link: https://lore.kernel.org/r/20220908173930.28940-4-nate@yocom.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* | Input: iforce - add support for Boeder Force Feedback WheelGreg Tulli2022-08-291-0/+1
|/ | | | | | | | | Add a new iforce_device entry to support the Boeder Force Feedback Wheel device. Signed-off-by: Greg Tulli <greg.iforce@gmail.com> Link: https://lore.kernel.org/r/3256420-c8ac-31b-8499-3c488a9880fd@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* documentation: Format button_dev as a pointer.Nelson Penn2022-06-011-3/+3
| | | | | | | | | | | The docs on creating an input device driver have an example in which button_dev is a pointer to an input_dev struct. However, in two code snippets below, button_dev is used as if it is not a pointer. Make these occurrences of button_dev reflect that it is a pointer. Signed-off-by: Nelson Penn <nelsonapenn@protonmail.com> Link: https://lore.kernel.org/r/20220522194953.12097-1-nelsonapenn@protonmail.com Signed-off-by: Jonathan Corbet <corbet@lwn.net>
* input: Docs: correct ntrig.rst typoRandy Dunlap2022-05-171-1/+1
| | | | | | | | | | | Fix a typo in ntrig.rst (found with 'codespell'). Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: linux-input@vger.kernel.org Cc: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/20220516002047.11395-1-rdunlap@infradead.org Signed-off-by: Jonathan Corbet <corbet@lwn.net>
* input: Docs: correct atarikbd.rst typosRandy Dunlap2022-05-171-2/+2
| | | | | | | | | | | | | Fix 2 "MOSE" typos in atarikbd.rst (found with 'codespell'). a. s/MOSE/MODE/ b. s/MOSE/MOUSE/ Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: linux-input@vger.kernel.org Cc: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/20220516002055.12000-1-rdunlap@infradead.org Signed-off-by: Jonathan Corbet <corbet@lwn.net>
* Input: docs: add more details on the use of BTN_TOOLBenjamin Tissoires2022-03-011-1/+5
| | | | | | | | | | | | The HID core stack used to be very relaxed considering the BTN_TOOL_* usage. With the recent commits, we should now enforce to have only one tool at a time, meaning that we can now express that requirement in the docs. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Reviewed-by: Ping Cheng <ping.cheng@wacom.com> Acked-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* docs: networking: Replace strncpy() with strscpy()Kees Cook2021-06-041-1/+1
| | | | | | | | | | | Replace example code's use of strncpy() with strscpy() functions. Using strncpy() is considered deprecated: https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings Signed-off-by: Kees Cook <keescook@chromium.org> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Link: https://lore.kernel.org/r/20210602202914.4079123-1-keescook@chromium.org Signed-off-by: Jonathan Corbet <corbet@lwn.net>
* Merge branch 'for-linus' of ↵Linus Torvalds2021-05-061-2/+6
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input updates from Dmitry Torokhov: - three new touchscreen drivers: Hycon HY46XX, ILITEK Lego Series, and MStar MSG2638 - a new driver for Azoteq IQS626A proximity and touch controller - addition of Amazon Game Controller to the list of devices handled by the xpad driver - Elan touchscreen driver will avoid binding to devices described as I2CHID compatible in ACPI tables - various driver fixes * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (56 commits) Input: xpad - add support for Amazon Game Controller Input: ili210x - add missing negation for touch indication on ili210x MAINTAINERS: repair reference in HYCON HY46XX TOUCHSCREEN SUPPORT Input: add driver for the Hycon HY46XX touchpanel series dt-bindings: touchscreen: Add HY46XX bindings dt-bindings: Add Hycon Technology vendor prefix Input: cyttsp - flag the device properly Input: cyttsp - set abs params for ABS_MT_TOUCH_MAJOR Input: cyttsp - drop the phys path Input: cyttsp - reduce reset pulse timings Input: cyttsp - error message on boot mode exit error Input: apbps2 - remove useless variable Input: mms114 - support MMS136 Input: mms114 - convert bindings to YAML and extend Input: Add support for ILITEK Lego Series dt-bindings: input: touchscreen: ilitek_ts_i2c: Add bindings Input: add MStar MSG2638 touchscreen driver dt-bindings: input/touchscreen: add bindings for msg2638 Input: silead - add workaround for x86 BIOS-es which bring the chip up in a stuck state Input: elants_i2c - do not bind to i2c-hid compatible ACPI instantiated devices ...
| * Merge tag 'v5.12-rc4' into nextDmitry Torokhov2021-03-252-0/+19
| |\ | | | | | | | | | Sync up with the mainline to bring in newest APIs.
| * | Input: rotary-encoder - update docs according to the latest API changesHeikki Krogerus2021-03-251-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | The old device property API is about to be removed, so explaing how to use complete software nodes instead. Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Link: https://lore.kernel.org/r/20210304090948.27014-1-heikki.krogerus@linux.intel.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* | | Documentation: input: joydev file correctionsRandy Dunlap2021-05-032-20/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix typos, grammar, punctuation in Documentation/input/joydev/*.rst files. Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com> Link: https://lore.kernel.org/r/20210429063137.20232-1-rdunlap@infradead.org Signed-off-by: Jonathan Corbet <corbet@lwn.net>
* | | input: Documentation: corrections for uinput.rstRandy Dunlap2021-03-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix a typo (supportinf -> supporting). Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: linux-input@vger.kernel.org Cc: Jonathan Corbet <corbet@lwn.net> Cc: linux-doc@vger.kernel.org Link: https://lore.kernel.org/r/20210302223523.20130-9-rdunlap@infradead.org Signed-off-by: Jonathan Corbet <corbet@lwn.net>
* | | input: Documentation: corrections for input-programming.rstRandy Dunlap2021-03-081-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Drop a repeated word. Fix punctuation of "eg." to "e.g." Fix punctuation of "ie" to "i.e." Add hyphentation to non-zero. Capitalize PM (for Power Management). Capitalize ID (for Identifier). Change "," in a run-on sentence to ";". Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: linux-input@vger.kernel.org Cc: Jonathan Corbet <corbet@lwn.net> Cc: linux-doc@vger.kernel.org Link: https://lore.kernel.org/r/20210302223523.20130-8-rdunlap@infradead.org Signed-off-by: Jonathan Corbet <corbet@lwn.net>
* | | input: Documentation: corrections for notifier.rstRandy Dunlap2021-03-081-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add 'ledstate' to the keyboard_notifier_param struct info and tell which header file contains that struct. Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: linux-input@vger.kernel.org Cc: Jonathan Corbet <corbet@lwn.net> Cc: linux-doc@vger.kernel.org Link: https://lore.kernel.org/r/20210302223523.20130-7-rdunlap@infradead.org Signed-off-by: Jonathan Corbet <corbet@lwn.net>
* | | input: Documentation: corrections for multi-touch-protocol.rstRandy Dunlap2021-03-081-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Correct hyphenation, spelling, and capitalization. Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: linux-input@vger.kernel.org Cc: Jonathan Corbet <corbet@lwn.net> Cc: linux-doc@vger.kernel.org Cc: Henrik Rydberg <rydberg@bitmath.org> Link: https://lore.kernel.org/r/20210302223523.20130-6-rdunlap@infradead.org Signed-off-by: Jonathan Corbet <corbet@lwn.net>
* | | input: Documentation: corrections for gameport-programming.rstRandy Dunlap2021-03-081-12/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use "E.g." instead of "Eg.". Use correct index for buttons[] array. Update all of struct gameport's descriptions. Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: linux-input@vger.kernel.org Cc: Jonathan Corbet <corbet@lwn.net> Cc: linux-doc@vger.kernel.org Link: https://lore.kernel.org/r/20210302223523.20130-5-rdunlap@infradead.org Signed-off-by: Jonathan Corbet <corbet@lwn.net>
* | | input: Documentation: update related file names in ff.rstRandy Dunlap2021-03-081-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change other related documentation file names from .txt to .rst and be more explicit about their paths/locations. Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: linux-input@vger.kernel.org Cc: Jonathan Corbet <corbet@lwn.net> Cc: linux-doc@vger.kernel.org Cc: Johann Deneux <johann.deneux@gmail.com> Cc: Anssi Hannula <anssi.hannula@gmail.com> Link: https://lore.kernel.org/r/20210302223523.20130-4-rdunlap@infradead.org Signed-off-by: Jonathan Corbet <corbet@lwn.net>
* | | input: Documentation: corrections for event-codes.rstRandy Dunlap2021-03-081-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix hyphenation, typos, capitalization, and a referenced file name (.txt -> .rst). Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: linux-input@vger.kernel.org Cc: Jonathan Corbet <corbet@lwn.net> Cc: linux-doc@vger.kernel.org Link: https://lore.kernel.org/r/20210302223523.20130-3-rdunlap@infradead.org Signed-off-by: Jonathan Corbet <corbet@lwn.net>
* | | input: Documentation: corrections for input.rstRandy Dunlap2021-03-081-4/+4
| |/ |/| | | | | | | | | | | | | | | | | | | | | Fix grammar, punctuation, and spelling. Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: linux-input@vger.kernel.org Cc: Jonathan Corbet <corbet@lwn.net> Cc: linux-doc@vger.kernel.org Link: https://lore.kernel.org/r/20210302223523.20130-2-rdunlap@infradead.org Signed-off-by: Jonathan Corbet <corbet@lwn.net>
* | Documentation: input: define ABS_PRESSURE/ABS_MT_PRESSURE resolution as gramsPeter Hutterer2021-01-282-0/+19
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ABS_PRESSURE and ABS_MT_PRESSURE on touch devices usually represent contact size (as a finger flattens with higher pressure the contact size increases) and userspace translates the kernel pressure value back into contact size. For example, libinput has pressure thresholds when a touch is considered a palm (palm == large contact area -> high pressure). The values themselves are on an arbitrary scale and device-specific. On pressurepads however, the pressure axis may represent the real physical pressure. Pressurepads are touchpads without a hinge but an actual pressure sensor underneath the device instead, for example the Lenovo Yoga 9i. A high-enough pressure is converted to a button click by the firmware. Microsoft does not require a pressure axis to be present, see [1], so as seen from userspace most pressurepads are identical to clickpads - one button and INPUT_PROP_BUTTONPAD set. However, pressurepads that export the pressure axis break userspace because that axis no longer represents contact size, resulting in inconsistent touch tracking, e.g. [2]. Userspace needs to know when a pressure axis represents real pressure and the best way to do so is to define what the resolution field means. Userspace can then treat data with a pressure resolution as true pressure. This patch documents that the pressure resolution is in units/gram. This allows for fine-grained detail and tops out at roughly ~2000t, enough for the devices we're dealing with. Grams is not a scientific pressure unit but the alternative is: - Pascal: defined as force per area and area is unreliable on many devices and seems like the wrong option here anyway, especially for devices with a single pressure sensor only. - Newton: defined as mass * distance/acceleration and for the purposes of a pressure axis, the distance is tricky to interpret and we get the data to calculate acceleration from event timestamps anyway. For the purposes of touch devices and digitizers, grams seems the best choice and the easiest to interpret. Bonus side effect: we can use the existing hwdb infrastructure in userspace to fix devices that advertise false pressure. [1] https://docs.microsoft.com/en-us/windows-hardware/design/component-guidelines/windows-precision-touchpad-required-hid-top-level-collections#windows-precision-touchpad-input-reports [2] https://gitlab.freedesktop.org/libinput/libinput/-/issues/562 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Link: https://lore.kernel.org/r/20210112230310.GA149342@jelly Signed-off-by: Jonathan Corbet <corbet@lwn.net>
* Input: document inhibitingAndrzej Pietrasiewicz2020-12-021-0/+46
| | | | | | | | | | | Document inhibiting input devices and its relation to being a wakeup source. Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Randy Dunlap <rdunlap@infradead.org> Link: https://lore.kernel.org/r/20200617101822.8558-1-andrzej.p@collabora.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* Input: uinput - fix typo in function name documentationPavel Machek2020-07-281-3/+3
| | | | | | | | Fix non-existing constant in documentation. Signed-off-by: Pavel Machek (CIP) <pavel@denx.de> Link: https://lore.kernel.org/r/20200724084025.GB31930@amd Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* Input: docs: fix spelling mistake "potocol" -> "protocol"Colin Ian King2019-08-061-1/+1
| | | | | | | There is a minor spelling mistake in the documentation, fix it. Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
* docs: remove extra conf.py filesMauro Carvalho Chehab2019-07-171-10/+0
| | | | | | | Now that the latex_documents are handled automatically, we can remove those extra conf.py files. Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
* docs: hid: convert to ReSTMauro Carvalho Chehab2019-07-021-1/+1
| | | | | | | | | | | | | | | | | Rename the HID documentation files to ReST, add an index for them and adjust in order to produce a nice html output via the Sphinx build system. While here, fix the sysfs example from hid-sensor.txt, that has a lot of "?" instead of the proper UTF-8 characters that are produced by the tree command. At its new index.rst, let's add a :orphan: while this is not linked to the main index.rst file, in order to avoid build warnings. Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org> Acked-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
* doc: Change LXR references to elixir.bootlin.comJonathan Neuschäfer2019-02-011-1/+1
| | | | | | | | | | | | | | | Recently, Free Electrons was renamed to Bootlin[1]. Less recently, the Linux Cross Reference (LXR) at lxr.free-electrons.com was replaced by Elixir[2], and lxr.free-electrons.com redirected first to elixir.free-electrons.com and now to elixir.bootlin.com. [1]: https://bootlin.com/blog/free-electrons-becomes-bootlin/ [2]: https://github.com/free-electrons/elixir Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net> Reviewed-by: Martin Kepplinger <martin.kepplinger@ginzinger.com> Acked-by: Federico Vaga <federico.vaga@vaga.pv.it> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
* Input: add `REL_WHEEL_HI_RES` and `REL_HWHEEL_HI_RES`Peter Hutterer2018-12-071-1/+20
| | | | | | | | | | | | | | | | | | | | | | This event code represents scroll reports from high-resolution wheels and is modelled after the approach Windows uses. The value 120 is one detent (wheel click) of movement. Mice with higher-resolution scrolling can send fractions of 120 which must be accumulated in userspace. Userspace can either wait for a full 120 to accumulate or scroll by fractions of one logical scroll movement as the events come in. 120 was picked as magic number because it has a high number of integer fractions that can be used by high-resolution wheels. For more information see https://docs.microsoft.com/en-us/previous-versions/windows/hardware/design/dn613912(v=vs.85) These new axes obsolete REL_WHEEL and REL_HWHEEL. The legacy axes are emulated by the kernel but the most accurate (and most granular) data is available through the new axes. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Verified-by: Harry Cutts <hcutts@chromium.org> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
* Revert "Input: Add the `REL_WHEEL_HI_RES` event code"Benjamin Tissoires2018-11-221-10/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit aaf9978c3c0291ef3beaa97610bc9c3084656a85. Quoting Peter: There is a HID feature report called "Resolution Multiplier" Described in the "Enhanced Wheel Support in Windows" doc and the "USB HID Usage Tables" page 30. http://download.microsoft.com/download/b/d/1/bd1f7ef4-7d72-419e-bc5c-9f79ad7bb66e/wheel.docx https://www.usb.org/sites/default/files/documents/hut1_12v2.pdf This was new for Windows Vista, so we're only a decade behind here. I only accidentally found this a few days ago while debugging a stuck button on a Microsoft mouse. The docs above describe it like this: a wheel control by default sends value 1 per notch. If the resolution multiplier is active, the wheel is expected to send a value of $multiplier per notch (e.g. MS Sculpt mouse) or just send events more often, i.e. for less physical motion (e.g. MS Comfort mouse). For the latter, you need the right HW of course. The Sculpt mouse has tactile wheel clicks, so nothing really changes. The Comfort mouse has continuous motion with no tactile clicks. Similar to the free-wheeling Logitech mice but without any inertia. Note that the doc also says that Vista and onwards *always* enable this feature where available. An example HID definition looks like this: Usage Page Generic Desktop (0x01) Usage Resolution Multiplier (0x48) Logical Minimum 0 Logical Maximum 1 Physical Minimum 1 Physical Maximum 16 Report Size 2 # in bits Report Count 1 Feature (Data, Var, Abs) So the actual bits have values 0 or 1 and that reflects real values 1 or 16. We've only seen single-bits so far, so there's low-res and hi-res, but nothing in between. The multiplier is available for HID usages "Wheel" and "AC Pan" (horiz wheel). Microsoft suggests that > Vendors should ship their devices with smooth scrolling disabled and allow > Windows to enable it. This ensures that the device works like a regular HID > device on legacy operating systems that do not support smooth scrolling. (see the wheel doc linked above) The mice that we tested so far do reset on unplug. Device Support looks to be all (?) Microsoft mice but nothing else Not supported: - Logitech G500s, G303 - Roccat Kone XTD - all the cheap Lenovo, HP, Dell, Logitech USB mice that come with a workstation that I could find don't have it. - Etekcity something something - Razer Imperator Supported: - Microsoft Comfort Optical Mouse 3000 - yes, physical: 1:4 - Microsoft Sculpt Ergonomic Mouse - yes, physical: 1:12 - Microsoft Surface mouse - yes, physical: 1:4 So again, I think this is really just available on Microsoft mice, but probably all decent MS mice released over the last decade. Looking at the hardware itself: - no noticeable notches in the weel - low-res: 18 events per 360deg rotation (click angle 20 deg) - high-res: 72 events per 360deg → matches multiplier of 4 - I can feel the notches during wheel turns - low-res: 24 events per 360 deg rotation (click angle 15 deg) - horiz wheel is tilt-based, continuous output value 1 - high-res: 24 events per 360deg with value 12 → matches multiplier of 12 - horiz wheel output rate doubles/triples?, values is 3 - It's a touch strip, not a wheel so no notches - high-res: events have value 4 instead of 1 a bit strange given that it doesn't actually have notches. Ok, why is this an issue for the current API? First, because the logitech multiplier used in Harry's patches looks suspiciously like the Resolution Multiplier so I think we should assume it's the same thing. Nestor, can you shed some light on that? - `REL_WHEEL` is defined as the number of notches, emulated where needed. - `REL_WHEEL_HI_RES` is the movement of the user's finger in microns. - `WM_MOUSEWHEEL` (Windows) is is a multiple of 120, defined as "the threshold for action to be taken and one such action" https://docs.microsoft.com/en-us/windows/desktop/inputdev/wm-mousewheel If the multiplier is set to M, this means we need an accumulated value of M until we can claim there was a wheel click. So after enabling the multiplier and setting it to the maximum (like Windows): - M units are 15deg rotation → 1 unit is 2620/M micron (see below). This is the `REL_WHEEL_HI_RES` value. - wheel diameter 20mm: 15 deg rotation is 2.62mm, 2620 micron (pi * 20mm / (360deg/15deg)) - For every M units accumulated, send one `REL_WHEEL` event The problem here is that we've now hardcoded 20mm/15 deg into the kernel and we have no way of getting the size of the wheel or the click angle into the kernel. In userspace we now have to undo the kernel's calculation. If our click angle is e.g. 20 degree we have to undo the (lossy) calculation from the kernel and calculate the correct angle instead. This also means the 15 is a hardcoded option forever and cannot be changed. In hid-logitech-hidpp.c, the microns per unit is hardcoded per device. Harry, did you measure those by hand? We'd need to update the kernel for every device and there are 10 years worth of devices from MS alone. The multiplier default is 8 which is in the right ballpark, so I'm pretty sure this is the same as the Resolution Multiplier, just in HID++ lingo. And given that the 120 magic factor is what Windows uses in the end, I can't imagine Logitech rolling their own thing here. Nestor? And we're already fairly inaccurate with the microns anyway. The MX Anywhere 2S has a click angle of 20 degrees (18 stops) and a 17mm wheel, so a wheel notch is approximately 2.67mm, one event at multiplier 8 (1/8 of a notch) would be 334 micron. That's only 80% of the fallback value of 406 in the kernel. Multiplier 6 gives us 445micron (10% off). I'm assuming multiplier 7 doesn't exist because it's not a factor of 120. Summary: Best option may be to simply do what Windows is doing, all the HW manufacturers have to use that approach after all. Switch `REL_WHEEL_HI_RES` to report in fractions of 120, with 120 being one notch and divide that by the multiplier for the actual events. So e.g. the Logitech multiplier 8 would send value 15 for each event in hi-res mode. This can be converted in userspace to whatever userspace needs (combined with a hwdb there that tells you wheel size/click angle/...). Conflicts: include/uapi/linux/input-event-codes.h -> I kept the new reserved event in the code, so I had to adapt the revert slightly Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Acked-by: Harry Cutts <hcutts@chromium.org> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Acked-by: Jiri Kosina <jkosina@suse.cz>
* Input: Add the `REL_WHEEL_HI_RES` event codeHarry Cutts2018-09-051-1/+10
| | | | | | | | | | | | | This event code represents scroll reports from high-resolution wheels, and will be used by future patches in this series. See the linux-input "Reporting high-resolution scroll events" thread [0] for more details. [0]: https://www.spinics.net/lists/linux-input/msg57380.html Signed-off-by: Harry Cutts <hcutts@chromium.org> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* input: add MT_TOOL_DIALBenjamin Tissoires2018-07-171-6/+6
| | | | | | | | | | | | | | | | | | | A dial is a tool you place on a multitouch surface which reports its orientation or a relative angle of rotation when rotating its knob. Some examples are the Dell Totem (on the Canvas 27"), the Microsoft Dial, or the Griffin Powermate, though the later can't be put on a touch surface. We give some extra space to account for other types of fingers if we need (MT_TOOL_THUMB) Slightly change the documentation to not make it mandatory to update each MT_TOOL we add. Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* Merge branch 'for-linus' of ↵Linus Torvalds2018-04-051-0/+57
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input updates from Dmitry Torokhov: - new driver for PhoenixRC Flight Controller Adapter - new driver for RAVE SP Power button - fixes for autosuspend-related deadlocks in a few unput USB dirvers - support for 2nd wheel in ATech PS/2 mouse - fix for ALPS trackpoint detection on Thinkpad L570 and Latitude 7370 - bunch of cleanups in various in PS/2 protocols - other assorted changes and fixes * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (35 commits) Input: i8042 - enable MUX on Sony VAIO VGN-CS series to fix touchpad Input: stmfts, s6sy761 - update my e-mail Input: stmfts - use async probe & suspend/resume to avoid 2s delay Input: ALPS - fix TrackStick detection on Thinkpad L570 and Latitude 7370 Input: xpad - add PDP device id 0x02a4 Input: alps - report pressure of v3 and v7 trackstick Input: pxrc - new driver for PhoenixRC Flight Controller Adapter Input: usbtouchscreen - do not rely on input_dev->users Input: usbtouchscreen - fix deadlock in autosuspend Input: pegasus_notetaker - do not rely on input_dev->users Input: pagasus_notetaker - fix deadlock in autosuspend Input: synaptics_usb - do not rely on input_dev->users Input: synaptics_usb - fix deadlock in autosuspend Input: gpio-keys - add support for wakeup event action Input: appletouch - use true and false for boolean values Input: silead - add Chuwi Hi8 support Input: analog - use get_cycles() on PPC Input: stmpe-keypad - remove VLA usage Input: i8042 - add Lenovo ThinkPad L460 to i8042 reset list Input: add RAVE SP Powerbutton driver ...
| * Input: pxrc - new driver for PhoenixRC Flight Controller AdapterMarcus Folkesson2018-03-261-0/+57
| | | | | | | | | | | | | | This driver let you plug in your RC controller to the adapter and use it as input device in various RC simulators. Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* | Input: alps - Update documentation for trackstick v3 formatPali Rohár2018-03-261-2/+5
|/ | | | | | | | Bits for M, R and L buttons are already processed in alps. Other newly documented bits not yet. Signed-off-by: Pali Rohár <pali.rohar@gmail.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
* Merge branch 'for-linus' of ↵Linus Torvalds2018-02-013-109/+6
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/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 ...
| * Input: docs - use PROPERTY_ENTRY_U32() directlyAndy Shevchenko2018-01-221-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | Instead of using PROPERTY_ENTRY_INTEGER() with explicitly supplied type, use PROPERTY_ENTRY_U32() dedicated macro. It will help modify internals of built-in device properties API. No functional change intended. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * Input: fix small typos in force feedback documentationJean-François Têtu2018-01-191-3/+3
| | | | | | | | | | | | | | | | Fix small typos in the Instructions and Uploading sections. Fix a typo in the start/stop effect example usage code. Signed-off-by: Jean-François Têtu <jean-francois.tetu@savoirfairelinux.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * Input: gpio_tilt - delete driverLinus Walleij2018-01-011-103/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This driver was merged in 2011 as a tool for detecting the orientation of a screen. The device driver assumes board file setup using the platform data from <linux/input/gpio_tilt.h>. But no boards in the kernel tree defines this platform data. As I am faced with refactoring drivers to use GPIO descriptors and pass decriptor tables from boards, or use the device tree device drivers like these creates a serious problem: I cannot fix them and cannot test them, not even compile-test them with a system actually using it (no in-tree boardfile). I suggest to delete this driver and rewrite it using device tree if it is still in use on actively maintained systems. I can also offer to rewrite it out of the blue using device tree if someone promise to test it and help me iterate it. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Heiko Stuebner <heiko@sntech.de> Patchwork-Id: 10133609 Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* | HID: hid-multitouch: support fine-grain orientation reportingWei-Ning Huang2017-12-011-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current hid-multitouch driver only allow the report of two orientations, vertical and horizontal. We use the Azimuth orientation usage 0x3F under the Digitizer usage page to report orientation if the device supports it. Changelog: v1 -> v2: - Fix commit message. - Remove resolution reporting for ABS_MT_ORIENTATION. v2 -> v3: - Fix commit message. v3 -> v4: - Fix ABS_MT_ORIENTATION ABS param range. - Don't set ABS_MT_ORIENTATION in ABS_DG_HEIGHT when it is already set by ABS_DG_AZIMUTH. v4 -> v5: - Improve multi-touch-protocol.rst documentation. Signed-off-by: Wei-Ning Huang <wnhuang@chromium.org> Signed-off-by: Wei-Ning Huang <wnhuang@google.com> Reviewed-by: Dmitry Torokhov <dtor@chromium.org> Reviewed-by: Henrik Rydberg <rydberg@bitmath.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* | Documentation: fix input related doc refsTom Saeger2017-10-121-1/+2
|/ | | | | | | | | | Make `input` document refs valid including: - joystick - joystick-parport Signed-off-by: Tom Saeger <tom.saeger@oracle.com> Reviewed-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
* Documentation:input: fix typoJohn de la Garza2017-08-301-1/+1
| | | | | Signed-off-by: John de la Garza <john@jjdev.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
* docs: fix nested numbering in the TOCMarkus Heiser2017-08-241-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With Sphinx 1.6 nested numbering is reported as warning:: ./input/joydev/index.rst:13: WARNING: input/joydev/joystick-api is already assigned section numbers (nested numbered toctree?) ./media/uapi/cec/cec-funcs.rst:8: WARNING: media/uapi/cec/cec-func-open is already assigned section numbers (nested numbered toctree?) ./media/uapi/cec/cec-funcs.rst:8: WARNING: media/uapi/cec/cec-func-close is already assigned section numbers (nested numbered toctree?) ./media/uapi/cec/cec-funcs.rst:8: WARNING: media/uapi/cec/cec-func-ioctl is already assigned section numbers (nested numbered toctree?) ./media/uapi/cec/cec-funcs.rst:8: WARNING: media/uapi/cec/cec-func-poll is already assigned section numbers (nested numbered toctree?) ./media/uapi/cec/cec-funcs.rst:8: WARNING: media/uapi/cec/cec-ioc-adap-g-caps is already assigned section numbers (nested numbered toctree?) ./media/uapi/cec/cec-funcs.rst:8: WARNING: media/uapi/cec/cec-ioc-adap-g-log-addrs is already assigned section numbers (nested numbered toctree?) ./media/uapi/cec/cec-funcs.rst:8: WARNING: media/uapi/cec/cec-ioc-adap-g-phys-addr is already assigned section numbers (nested numbered toctree?) ./media/uapi/cec/cec-funcs.rst:8: WARNING: media/uapi/cec/cec-ioc-dqevent is already assigned section numbers (nested numbered toctree?) ./media/uapi/cec/cec-funcs.rst:8: WARNING: media/uapi/cec/cec-ioc-g-mode is already assigned section numbers (nested numbered toctree?) ./media/uapi/cec/cec-funcs.rst:8: WARNING: media/uapi/cec/cec-ioc-receive is already assigned section numbers (nested numbered toctree?) TOC numbering is already set in:: ./input/devices/index.rst:9: ./media/uapi/cec/cec-api.rst:19: I guess the nested numbering in: ./input/joydev/index.rst ./media/uapi/cec/cec-funcs.rst is just a C&P typo, so lets remove it. Signed-off-by: Markus Heiser <markus.heiser@darmarit.de> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
* Merge tag '4.13-fixes' of git://git.lwn.net/linuxLinus Torvalds2017-07-131-1/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Pull documentation fixes from Jonathan Corbet: "A set of fixes for various warnings, including the one caused by the removal of kernel/rcu/srcu.c. Also correct a stray pointer in memory-barriers.txt" * tag '4.13-fixes' of git://git.lwn.net/linux: kokr/memory-barriers.txt: Fix obsolete link to atomic_ops.txt memory-barriers.txt: Fix broken link to atomic_ops.txt docs: Turn off section numbering for the input docs docs: Include uaccess docs from the right file docs: Do not include from kernel/rcu/srcu.c
| * docs: Turn off section numbering for the input docsJonathan Corbet2017-07-121-1/+0
| | | | | | | | | | | | | | | | | | The input docs enable section numbering at multiple levels, leading to a lot of bright-red "nested numbered toctree" warnings in newer Sphinx versions. Just take that directive out for now to help alleviate the global red-pixel shortage. Signed-off-by: Jonathan Corbet <corbet@lwn.net>
* | Merge branch 'for-linus' of ↵Linus Torvalds2017-05-261-1/+1
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input layer fixes from Dmitry Torokhov: "Just a few fixups to a couple of drivers" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: elan_i2c - ignore signals when finishing updating firmware Input: elan_i2c - clear INT before resetting controller Input: atmel_mxt_ts - add T100 as a readable object Input: edt-ft5x06 - increase allowed data range for threshold parameter