[PATCH 2/2] iio: imu: bmi323: Add and enable ACPI Match Table

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>From c65d1ef44d749958f02d2b9a50a0e788b4497854 Mon Sep 17 00:00:00 2001
From: Jonathan LoBue <jlobue10@xxxxxxxxx>
Date: Sat, 10 Feb 2024 12:31:54 -0800
Subject: [PATCH 2/2] iio: imu: bmi323: Add and enable ACPI Match Table

This patch adds the ACPI match table for ASUS ROG ALLY to load the bmi323
driver with an ACPI match of "BOSC0200".

Co-developed-by: Jonathan LoBue <jlobue10@xxxxxxxxx>
Signed-off-by: Jonathan LoBue <jlobue10@xxxxxxxxx>
Co-developed-by: Luke D. Jones <luke@xxxxxxxxxx>
Signed-off-by: Luke D. Jones <luke@xxxxxxxxxx>
Co-developed-by: Denis Benato <benato.denis96@xxxxxxxxx>
Signed-off-by: Denis Benato <benato.denis96@xxxxxxxxx>
Co-developed-by: Antheas Kapenekakis <lkml@xxxxxxxxxxx>
Signed-off-by: Antheas Kapenekakis <lkml@xxxxxxxxxxx>
---
 drivers/iio/imu/bmi323/bmi323_i2c.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/iio/imu/bmi323/bmi323_i2c.c b/drivers/iio/imu/bmi323/bmi323_i2c.c
index 20a8001b9956..346ba2d1a169 100644
--- a/drivers/iio/imu/bmi323/bmi323_i2c.c
+++ b/drivers/iio/imu/bmi323/bmi323_i2c.c
@@ -5,6 +5,7 @@
  * Copyright (C) 2023, Jagath Jog J <jagathjog1996@xxxxxxxxx>
  */
 
+#include <linux/acpi.h>
 #include <linux/i2c.h>
 #include <linux/mod_devicetable.h>
 #include <linux/module.h>
@@ -93,6 +94,12 @@ static int bmi323_i2c_probe(struct i2c_client *i2c)
 	return bmi323_core_probe(dev);
 }
 
+static const struct acpi_device_id bmi323_acpi_match[] = {
+	{"BOSC0200"},
+	{ },
+};
+MODULE_DEVICE_TABLE(acpi, bmi323_acpi_match);
+
 static const struct i2c_device_id bmi323_i2c_ids[] = {
 	{ "bmi323" },
 	{ }
@@ -109,6 +116,7 @@ static struct i2c_driver bmi323_i2c_driver = {
 	.driver = {
 		.name = "bmi323",
 		.of_match_table = bmi323_of_i2c_match,
+		.acpi_match_table = ACPI_PTR(bmi323_acpi_match),
 	},
 	.probe = bmi323_i2c_probe,
 	.id_table = bmi323_i2c_ids,
-- 
2.43.0

Attachment: signature.asc
Description: This is a digitally signed message part.


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux