[PATCH 1/2] iio: accel: bmc150: ASUS ROG ALLY Abort Loading

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

 



>From 0aed4d398be185d43b92db63693bb1c5c6a8a78b Mon Sep 17 00:00:00 2001
From: Jonathan LoBue <jlobue10@xxxxxxxxx>
Date: Sat, 10 Feb 2024 12:28:35 -0800
Subject: [PATCH 1/2] iio: accel: bmc150: ASUS ROG ALLY Abort Loading

This portion of the patch series aborts the loading of the bmc150 driver
upon DMI board match for ASUS ROG ALLY and Ayaneo Air Plus (requested by
ChimeraOS dev).

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/accel/bmc150-accel-core.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/iio/accel/bmc150-accel-core.c b/drivers/iio/accel/bmc150-accel-core.c
index 110591804b4c..576da9def8eb 100644
--- a/drivers/iio/accel/bmc150-accel-core.c
+++ b/drivers/iio/accel/bmc150-accel-core.c
@@ -10,6 +10,7 @@
 #include <linux/delay.h>
 #include <linux/slab.h>
 #include <linux/acpi.h>
+#include <linux/dmi.h>
 #include <linux/of_irq.h>
 #include <linux/pm.h>
 #include <linux/pm_runtime.h>
@@ -1670,6 +1671,9 @@ int bmc150_accel_core_probe(struct device *dev, struct regmap *regmap, int irq,
 	struct iio_dev *indio_dev;
 	int ret;
 
+	if (dmi_match(DMI_BOARD_NAME, "RC71L") || (dmi_match(DMI_BOARD_NAME, "AB05-AMD") && dmi_match(DMI_PRODUCT_NAME, "AIR Plus")))
+		return -ENODEV; // Abort loading bmc150 for ASUS ROG ALLY, Ayaneo Air Plus
+
 	indio_dev = devm_iio_device_alloc(dev, sizeof(*data));
 	if (!indio_dev)
 		return -ENOMEM;
-- 
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