diff options
author | Hans de Goede <hdegoede@redhat.com> | 2024-04-25 14:57:51 +0200 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2024-04-29 20:53:25 +0100 |
commit | 02eae0bb9538dc7dcb5a6bc2c3066bd6ca682969 (patch) | |
tree | 846f3cf6ea9f218f0589d969c666add1fa4b7f6f /tools/perf/scripts/python/export-to-postgresql.py | |
parent | 79df437b5661b2f7e1c0bad097fd18c4e154bb94 (diff) |
iio: core: Add iio_read_acpi_mount_matrix() helper function
The ACPI "ROTM" rotation matrix parsing code atm is already duplicated
between bmc150-accel-core.c and kxcjk-1013.c and a third user of this
is coming.
Add an iio_read_acpi_mount_matrix() helper function for this.
The 2 existing copies of the code are identical, except that
the kxcjk-1013.c has slightly better error logging.
To new helper is a 1:1 copy of the kxcjk-1013.c version, the only change
is the addition of a "char *acpi_method" parameter since some bmc150
dual-accel setups (360° hinges with 1 accel in kbd/base + 1 in display)
declare both accels in a single ACPI device with 2 different method names
for the 2 matrices. This new acpi_method parameter is not "const char *"
because the pathname parameter to acpi_evaluate_object() is not const.
The 2 existing copies of this function will be removed in further patches
in this series.
Acked-by: Rafael J. Wysocki <rafael@kernel.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20240425125754.76010-2-hdegoede@redhat.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions