Commit Graph

201 Commits

Author SHA1 Message Date
Boian Bonev
9f366b943d
hwdb: Add Chromebook accel orientation quirks based on sysfs label
The base-mounted accelerometer on Chromebooks return values same as the
display when the lid angle is 180 degrees, instead of when the lid is
closed. To match userspace expectations we must further rotate the
existing accelerometer mounting matrix by 180 degrees around the X axis:

    [[-1,  0,  0],    [[ 1,  0,  0],    [[-1,  0,  0],
     [ 0, -1,  0],  X  [ 0, -1,  0],  =  [ 0,  1,  0],
     [ 0,  0, -1]]     [ 0,  0, -1]]     [ 0,  0,  1]]

A previous commit lets us distinguish between the two cros-ec-accel
devices on these boards by their 'label' sysfs file. Add hwdb entries
that make base-mounted accelerometers use this correct matrix, and
display-mounted ones use the existing one.

Note that the cros-ec-accel drivers use 'label' only since Linux v6.0.
The old match strings are not removed to support older kernels, even
though they are only correct for the display-mounted sensor.

systemd-commit fea267f8c71d0edffee5ccbb806755fb626c5e29
Author: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Date:   Thu Aug 18 18:24:05 2022 +0300
2022-09-22 01:28:34 +03:00
Boian Bonev
fa741e87a8
udev: hwdb: Match iio sensors based on their label
The IIO subsystem exposes a 'label' sysfs file to help userspace better
identify its devices [1]. Standardized labels include the sensor type
along with its location, including 'accel-base' and 'accel-display'.

Most Chrome OS boards have two accelerometers that are indistinguishable
except for this label (or a 'location' sysfs file before Linux v6.0),
and need different mounting matrix corrections based on their location.

Add a udev rule that matches hwdb entries using this label, so we can
correct both accelerometers on these devices with hwdb entries. The
existing rules and hwdb entries are not modified to keep potential
out-of-tree entries working, but new entries in this form will override
existing ones. Also add currently standardized labels to parse-hwdb.py.

[1] https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-bus-iio

systemd-commit e2f25ae64889ea7fe8a7556ee5fba91bc2a0eab8
Author: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Date:   Thu Aug 18 17:27:22 2022 +0300
2022-09-22 01:17:17 +03:00
Boian Bonev
6309427c50
Merge hwdb from systemd
All systemd's hwdb changes up to commit 5674b74c4f99e433fd8e7242e9f16f6ddfece94c
2022-05-26 11:18:11 +03:00
Arsen Arsenović
9b08e717b9
hwdb: sync with systemd/main 2021-12-01 21:21:46 +01:00
Max Verevkin
9aadd2bfd6
Pavilion 13 x360 keys
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2020-11-16 07:40:04 -05:00
Anthony G. Basile
c58b3204cb hwdb: updated tool to parse hwdb grammer
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2019-10-26 16:13:27 -04:00
Anthony G. Basile
e71f6f4b0b hwdb: sync with systemd/hwdb.d
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2019-10-26 16:10:55 -04:00
Anthony G. Basile
53bf38a6b4 hwdb: updated tool to parse hwdb grammer
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2019-08-19 20:06:53 -04:00
Anthony G. Basile
3879568b00 hwdb: sync with systemd/hwdb
as of 06e93130b4045db1c75f8de506d2447642de74cf

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2019-08-19 20:05:22 -04:00
Piraty
940a1a1392 hwdb: sync with systemd/hwdb
as of c1342d559739a07e1fe52bc73d6ccadff72f6920
2018-09-17 19:06:57 -04:00
Marcus Folkesson
83d918449f hwdb: update
Update to match systemd v235-1952-gba3182b91

Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2018-02-20 07:36:26 -05:00
Marcus Folkesson
e5fbcecaf9 hwdb: add tool to parse hwdb grammer
Inherited from systemd project.

Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2018-02-20 07:35:59 -05:00
Anthony G. Basile
7b3556d1ea hwdb: update
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2017-09-03 13:05:05 -04:00
Bastien Nocera
c61e6c912b udev: Add rules for accelerometer orientation quirks
This commit adds a rules file to extract the properties from hwdb
to set on i2c IIO devices. This is used to set the ACCEL_MOUNT_MATRIX
property on IIO devices, to be consumed by iio-sensor-proxy or
equivalent daemon.

The hwdb file contains documentation on how to write quirks. Note
however that mount information is usually exported in:
- the device-tree for ARM devices
- the ACPI DSDT for Intel-compatible devices
but currently not extracted by the kernel.

Also note that some devices have the framebuffer rotation that changes
between the bootloader and the main system, which might mean that the
accelerometer is then wrongly oriented. This is a missing feature in the
i915 kernel driver: https://bugs.freedesktop.org/show_bug.cgi?id=94894
which needs to be fixed, and won't require quirks.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2016-12-11 10:55:12 -05:00
Anthony G. Basile
48e435dcfd hwdb, rules: update
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2016-12-11 10:52:02 -05:00
Anthony G. Basile
d08aa94fec hwdb: update
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2016-11-23 11:44:20 -05:00
Anthony G. Basile
114908765f hwdb: update
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2016-05-25 13:53:22 -04:00
Anthony G. Basile
20a05c562a hwdb: update
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2016-05-10 07:57:32 -04:00
Anthony G. Basile
25a718a138 hwdb: update
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2016-03-21 09:12:21 -04:00
Anthony G. Basile
7f3b6d02cc hwdb: update 2016-02-27 02:57:08 -05:00
Anthony G. Basile
3677c2e3ae hwdb and rules: import changes from upstream. 2015-10-12 06:43:45 -04:00
Anthony G. Basile
9cb37638de rules: import 20-net-ifname.hwdb from upstream.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-07-20 08:20:16 -04:00
Marcel Holtmann
3792b2d508 hwdb: Update database of Bluetooth company identifiers
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-07-20 08:15:31 -04:00
Kay Sievers
871ed1d9f7 hwdb: update
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-07-20 08:14:29 -04:00
Peter Hutterer
af535a4466 hwdb: move a couple of entries to expected sort order
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-07-20 08:12:23 -04:00
Peter Hutterer
d5ffc84249 hwdb: add Logitech MX Revolution
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-07-20 08:11:13 -04:00
Lennart Poettering
d67ff38fd4 hwdb: update databases from upstream
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-07-20 08:10:33 -04:00
Marcel Holtmann
532135e20c hwdb: Update database of Bluetooth company identifiers
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-07-20 08:09:55 -04:00
Mario Limonciello
4c3c4bc941 hwdb: add support for Alienware graphics amplifier
Unplugging and plugging in the cable will create various scancodes
on the keyboard controller.

Userspace within X should be able to interact with these to show
interesting messages. Assign them to generic prog1/prog2.

(David: add comment to hwdb explaining that these keycodes are reserved)

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-07-20 08:09:21 -04:00
dslul
37f3e3b0f7 keymap: Add Samsung NP350V and NP670Z
typo

keymap: Add Samsung NP350V and NP670Z

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-07-20 08:08:42 -04:00
Peter Hutterer
43b1c1c4e8 hwdb: update Logitech's unifying receiver devices
Since 3.19, the devices have the proper vid/pid and the model number in the
name.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-07-20 08:08:04 -04:00
Peter Hutterer
a3d396fd36 hwdb: add Logitech TrackMan Marble Wheel USB
DPI is guesswork, no specs found on the web and calculating DPIs on a
trackball is tedious.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-07-20 08:07:27 -04:00
Peter Hutterer
62485d6d1c hwdb: add Apple MagicMouse entry 2015-07-20 08:06:45 -04:00
Kay Sievers
deccfc8b10 hwdb: update
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-07-20 08:05:47 -04:00
Marcel Holtmann
cead3921ab hwdb: Update database of Bluetooth company identifiers
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-07-20 08:05:00 -04:00
Peter Hutterer
a5cb5f0b4c Revert "hwdb: add a touchpad hwdb"
The main purpose of this hwdb was to tag touchpads that have the physical
trackstick buttons wired to the touchpad (Lenovo Carbon X1 3rd, Lenovo *50
series).  This hwdb is not required on kernels 4.0 and above, the kernel now
re-routes button presses through the trackstick's device node. Userspace does
not need to do anything.

See kernel commit cdd9dc195916ef5644cfac079094c3c1d1616e4c.

This reverts commit 001a247324b44c0e0b8fdba41a6fc66e7465b8b6.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-07-20 07:28:05 -04:00
Lennart Poettering
6fe5ac51c6 update hardware databases
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-26 10:27:22 -04:00
Peter Hutterer
1b8e79f601 hwdb: add MS Arc Touch Mouse SE
https://bugs.freedesktop.org/show_bug.cgi?id=90540

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-26 10:26:42 -04:00
Peter Hutterer
51421b5d8f hwdb: add Logitech M570 trackball
http://www.logitech.com/en-us/product/wireless-trackball-m570#specs
https://bugzilla.redhat.com/show_bug.cgi?id=1217881

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-26 10:26:00 -04:00
Hans de Goede
0bd129628e hwdb: Add trackpoint sensitivity setting for Thinkpad X230 tablet
This model needs the trackpoint sensitivity to be boosted to not be too slow
to be usable, see: https://bugzilla.redhat.com/show_bug.cgi?id=1200717

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-26 09:55:21 -04:00
Zbigniew Jędrzejewski-Szmek
ece5474ed4 hwdb: coalesce same pointingstick entries into one
Multiple models in the same hardware series are likely to have similar
specs. We should use organization similar to hwdb/60-evdev.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-03 13:54:17 -04:00
Hans de Goede
ab24ad9042 udev: hwdb: Add trackpoint sensitivity settings for Lenovo X240 and 540p
Like the T440s these need the sensitity to be set significantly higher
then the default of 128 for the trackpoint to be usable. Like with the
T440s 200 seems to be a good value to get a reasonable but not too high
sensitivity.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-03 13:53:46 -04:00
Peter Hutterer
43bca610f2 hwdb: fix typo - "sort by by..." -> "sort by..."
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-03 13:53:13 -04:00
Peter Hutterer
b71f26d8f5 hwdb: add HP X1000 DPI info
Device name is PixArt, but it's sold as a HP brand.

https://bugs.freedesktop.org/show_bug.cgi?id=90142

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-03 13:52:32 -04:00
Benjamin Tissoires
b574f77178 hwdb: add Chromebook pixel (2015) resolution fix
The atmel driver sets a default resolution of 20 for each touchpads it
creates. On this model, 10 is more appropriate.

The resolution is not set for the touchscreen by the kernel, so match
the name to both touchpad and touchscreen.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-03 13:51:49 -04:00
Benjamin Tissoires
e571fca1c0 hwdb: add evdev entry for the Lenovo X230 series touchpad
The Lenovo X230 advertize a vertical resolution of 136, which gives a true
size of 31 mm. The actual physical size of the touchpad is 40 mm, so
override the resolution to 100.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-03 13:51:11 -04:00
Hans de Goede
5983d43fbd hwdb: Add entries for the pointingstick on 2 Dell Latitudes
The pointingstick of the Dell Latitude E6400 is somewhat slow by default,
whereas the pointingstick of the Dell Latitude D620 is much too fast by
default, set POINTINGSTICK_CONST_ACCEL for both of them to adjust for this.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-03 13:50:16 -04:00
Hans de Goede
55c5046e38 hwdb: Add entries for the trackpoint on 2 Thinkpads
Lenovo has changed the sensitivity of the trackpoint on the x240 / T440s / T540
generation of Thinkpads, making them somewhat insensitive by default, add a
hwdb entry to tweak the sensitivity setting.

The ThinkPad X200s is way way too slow by default and unless you push the
trackpoint quite hard only sends delta events in the 1-2 range, tweak the
sensitivity to make it send a wider range of deltas and apply a const accel
factor to make it have a more reasonable speed by default.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-03 13:49:36 -04:00
Hans de Goede
c17bf40825 udev: keyboard-builtin: Add support for setting IBM trackpoint sensitivity
IBM / Lenovo trackpoints allow specifying a sensitivity setting through a
ps/2 command, which changes the range of the deltas sent when using the
trackpoint.

On some models with normal usage only deltas of 1 or 2 are send, resulting in
there only being 2 mouse cursor movement speeds, rather than the expected fluid
scale. Changing the sensitivity to a higher level than the bootup default fixes
this.

This commit adds support for setting a POINTINGSTICK_SENSITIVITY value
in hwdb to allow changing the sensitivity on boot through udev / hwdb.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-03 13:46:48 -04:00
Hans de Goede
eb38f78d79 udev: Add hwdb file for setting pointingstick properties
There is quite a wide spread in the delta events generated by pointingsticks,
some generate deltas of 1-2 under normal use, while others generate deltas
from 1-20.

This commit adds a hwdb file which allows specifying a per model
POINTINGSTICK_CONST_ACCEL value which can be used by the userspace input stack
to normalize the deltas so that all pointingsticks get the same feeling ootb.

The hwdb matching re-uses the existing 60-evdev.rules.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-03 13:45:55 -04:00