mbox series

[v3,0/4] iio: accel: Share ACPI ROTM parsing between drivers and add it to mxc4005

Message ID 20240425125754.76010-1-hdegoede@redhat.com (mailing list archive)
Headers show
Series iio: accel: Share ACPI ROTM parsing between drivers and add it to mxc4005 | expand

Message

Hans de Goede April 25, 2024, 12:57 p.m. UTC
Hi All,

Here is v2 of the patch series to refactor the ACPI ROTM orientation matrix
handling in kxcjk-1013 + bmc150-accel to share the code instead of having
2 copies and then also use the shared implementation in the mxc4005 driver
since some MXC6655 ACPI firmware nodes also include this.

Changes in v2:
- Add comment about the Microsoft specification for the "ROTM" ACPI method

Changes in v3:
- Add the new iio_read_acpi_mount_matrix() helper to industrialio.ko instead
  of making it a static inline

Regards,

Hans


Hans de Goede (4):
  iio: core: Add iio_read_acpi_mount_matrix() helper function
  iio: accel: kxcjk-1013: Use new iio_read_acpi_mount_matrix() helper
  iio: bmc150-accel-core: Use iio_read_acpi_mount_matrix() helper
  iio: accel: mxc4005: Read orientation matrix from ACPI ROTM method

 drivers/iio/Makefile                  |  1 +
 drivers/iio/accel/bmc150-accel-core.c | 44 +-------------
 drivers/iio/accel/kxcjk-1013.c        | 80 +------------------------
 drivers/iio/accel/mxc4005.c           | 22 +++++++
 drivers/iio/industrialio-acpi.c       | 85 +++++++++++++++++++++++++++
 include/linux/iio/iio.h               | 13 ++++
 6 files changed, 124 insertions(+), 121 deletions(-)
 create mode 100644 drivers/iio/industrialio-acpi.c

Comments

Jonathan Cameron April 28, 2024, 1:30 p.m. UTC | #1
On Thu, 25 Apr 2024 14:57:50 +0200
Hans de Goede <hdegoede@redhat.com> wrote:

> Hi All,
> 
> Here is v2 of the patch series to refactor the ACPI ROTM orientation matrix
> handling in kxcjk-1013 + bmc150-accel to share the code instead of having
> 2 copies and then also use the shared implementation in the mxc4005 driver
> since some MXC6655 ACPI firmware nodes also include this.
> 
> Changes in v2:
> - Add comment about the Microsoft specification for the "ROTM" ACPI method
> 
> Changes in v3:
> - Add the new iio_read_acpi_mount_matrix() helper to industrialio.ko instead
>   of making it a static inline
> 
> Regards,
> 
> Hans
LGTM
Applied to the togreg branch of iio.git and pushed out as testing for 0-day
to play with it.

Thanks for tidying this up.

Jonathan
> 
> 
> Hans de Goede (4):
>   iio: core: Add iio_read_acpi_mount_matrix() helper function
>   iio: accel: kxcjk-1013: Use new iio_read_acpi_mount_matrix() helper
>   iio: bmc150-accel-core: Use iio_read_acpi_mount_matrix() helper
>   iio: accel: mxc4005: Read orientation matrix from ACPI ROTM method
> 
>  drivers/iio/Makefile                  |  1 +
>  drivers/iio/accel/bmc150-accel-core.c | 44 +-------------
>  drivers/iio/accel/kxcjk-1013.c        | 80 +------------------------
>  drivers/iio/accel/mxc4005.c           | 22 +++++++
>  drivers/iio/industrialio-acpi.c       | 85 +++++++++++++++++++++++++++
>  include/linux/iio/iio.h               | 13 ++++
>  6 files changed, 124 insertions(+), 121 deletions(-)
>  create mode 100644 drivers/iio/industrialio-acpi.c
>