1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-10-27 01:55:32 +03:00
systemd-stable/hwdb/60-sensor.hwdb
Thomas Hindoe Paaboel Andersen 128e6266ad hwdb: quirks for accelerometers in HP laptops
This patch adds quirks for the two laptops I could test on
(8540w and 8560w). The accelerometer is configured in the
kernel to report values according to the base of the laptop.
We want the values according to the screen instead.

It is likely (but untested) to match all HP laptops with the
lis3lv02d accelerometer on this list:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/platform/x86/hp_accel.c#n207
2017-03-03 21:35:57 +01:00

68 lines
2.4 KiB
Plaintext

# This file is part of systemd.
#
# The lookup keys are composed in:
# 60-sensor.rules
#
# Note: The format of the "sensor:" prefix match key is a
# contract between the rules file and the hardware data, it might
# change in later revisions to support more or better matches, it
# is not necessarily expected to be a stable ABI.
#
# Match string formats:
# sensor:modalias:<parent device modalias>:dmi:<dmi string>
#
# To add local entries, create a new file
# /etc/udev/hwdb.d/61-sensor-local.hwdb
# and add your rules there. To load the new rules execute (as root):
# systemd-hwdb update
# udevadm trigger -y `dirname $(udevadm info -n "/dev/iio:deviceXXX" -q path)`
# where /dev/iio:deviceXXX is the device in question.
#
# If your changes are generally applicable, preferably send them as a pull
# request to
# https://github.com/systemd/systemd
# or create a bug report on https://github.com/systemd/systemd/issues and
# include your new rules, a description of the device, and the output of
# udevadm info --export-db
#
# For hwdb format and systemd behavior:
# https://www.freedesktop.org/software/systemd/man/hwdb.html
#
# Allowed properties are:
# ACCEL_MOUNT_MATRIX=<matrix>
#
# where <matrix> is a mount-matrix in the format specified in the IIO
# subsystem[1]. The default, when unset, is equivalent to:
# ACCEL_MOUNT_MATRIX=1, 0, 0; 0, 1, 0; 0, 0, 1
# eg. the identity matrix.
#
# [1]: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=dfc57732ad38f93ae6232a3b4e64fd077383a0f1
#
#
# Sort by brand, model
#########################################
# AsusTek
#########################################
sensor:modalias:acpi:SMO8500*:dmi:*svn*ASUSTeK*:*pn*TP500LB*
ACCEL_MOUNT_MATRIX=0, 1, 0; 1, 0, 0; 0, 0, 0
#########################################
# Endless
#########################################
sensor:modalias:acpi:ACCE0001*:dmi:*svnEndless*:*pnELT-NL3*
ACCEL_MOUNT_MATRIX=0, 1, 0; 0, 0, -1; -1, 0, 0
#########################################
# HP
#########################################
sensor:modalias:platform:lis3lv02d:dmi:*svn*Hewlett-Packard*:*pn*HPEliteBook8540w*
sensor:modalias:platform:lis3lv02d:dmi:*svn*Hewlett-Packard*:*pn*HPEliteBook8560w*
ACCEL_MOUNT_MATRIX=1, 0, 0; 0, 0, -1; 0, 1, 0
#########################################
# Winbook
#########################################
sensor:modalias:acpi:BMA250*:dmi:*svn*WinBook*:*pn*TW100*
ACCEL_MOUNT_MATRIX=0, -1, 0; -1, 0, 0; 0, 0, 0