iio: accel: kxcjk-1013: Use new iio_read_acpi_mount_matrix() helper
authorHans de Goede <hdegoede@redhat.com>
Thu, 25 Apr 2024 12:57:52 +0000 (14:57 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 29 Apr 2024 19:53:25 +0000 (20:53 +0100)
commite074cc3080d507b3680160248bb5b450d7009efb
tree2d6acc3926972f15ac1fb02ffa240f7c5a73789a
parent02eae0bb9538dc7dcb5a6bc2c3066bd6ca682969
iio: accel: kxcjk-1013: Use new iio_read_acpi_mount_matrix() helper

Replace the duplicate ACPI "ROTM" data parsing code with the new
shared iio_read_acpi_mount_matrix() helper.

This also removes the limiting of the "ROTM" mount matrix to only ACPI
devices with an ACPI HID (Hardware-ID) of "KIOX000A". If kxcjk-1013 ACPI
devices with another HID have a ROTM method that should still be parsed
and if the method is not there then iio_read_acpi_mount_matrix() will
fail silently.

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-3-hdegoede@redhat.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/accel/kxcjk-1013.c