From 37923b3d4824279658d50fb6c7052560ff47674e Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Thu, 1 Jul 2021 15:28:25 +0200 Subject: [PATCH] hwdb: Add accel orientation quirk for the Chuwi Hi13 (CWI534) with BMA250 sensor Recently the kernel has gotten support for reading the mount-matrix for BMA250 sensors represented by a BOSC0200 ACPI device from the ACPI tables, so that we don't need to add quirks for these. At least that was the theory. The Chuwi Hi13 (CWI534) with BMA250 sensor has the sensor mounted such that it works / needs the normal(ized) matrix, but the ACPI tables actually contain a wrong matrix inverting the X and Y axis. Add a quirk to override /sys/bus/iio/devices/iio:device?/in_mount_matrix with the norm-matrix, since the ACPI derived matrix is actually wrong on these devices (sigh) --- hwdb.d/60-sensor.hwdb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hwdb.d/60-sensor.hwdb b/hwdb.d/60-sensor.hwdb index bde00499d47..f1744b8d78c 100644 --- a/hwdb.d/60-sensor.hwdb +++ b/hwdb.d/60-sensor.hwdb @@ -216,6 +216,12 @@ sensor:modalias:acpi:BOSC0200*:dmi:*:svnHampoo:pnE4D6_HI-122LP:* sensor:modalias:acpi:KIOX000A*:dmi:*:svnChuwi*:pnHi13:* ACCEL_MOUNT_MATRIX=1, 0, 0; 0, -1, 0; 0, 0, 1 +# Chuwi Hi13 (CWI534) with BMA250 sensor +# Note this sets the norm matrix, since the matrix which the kernel reads +# from the ACPI tables is actually wrong on these models +sensor:modalias:acpi:BOSC0200*:dmi:*:svnChuwi*:pnHi13:* + ACCEL_MOUNT_MATRIX=1, 0, 0; 0, 1, 0; 0, 0, 1 + # Chuwi HiBook # Chuwi HiBook does not have its product name filled, so we # match the entire dmi-alias, assuming that the use of a BOSC0200 +