diff mbox series

[2/5] input: misc: bma150: Conditionally disable bma023 support

Message ID BN6PR04MB0660B420EFA83668BBF4F315A3A90@BN6PR04MB0660.namprd04.prod.outlook.com
State New
Headers show
Series [1/5] iio: accel: bma180: Prepare for different reset values | expand

Commit Message

Jonathan Bakker May 3, 2020, 5:22 p.m. UTC
The bma180 IIO driver has been extended for support for bma023.
However, this could cause conflicts with this driver.  Since some
setups may depend upon the evdev setup, disable support in this
driver for the bma023 only when the IIO driver is being built.

Signed-off-by: Jonathan Bakker <xc-racer2@live.ca>
---
 drivers/input/misc/bma150.c | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/drivers/input/misc/bma150.c b/drivers/input/misc/bma150.c
index a9d984da95f3..5d3f8b05b316 100644
--- a/drivers/input/misc/bma150.c
+++ b/drivers/input/misc/bma150.c
@@ -541,7 +541,10 @@  static UNIVERSAL_DEV_PM_OPS(bma150_pm, bma150_suspend, bma150_resume, NULL);
 static const struct i2c_device_id bma150_id[] = {
 	{ "bma150", 0 },
 	{ "smb380", 0 },
+	/* Prefer the IIO-based driver for bma023 if enabled */
+#if !IS_ENABLED(CONFIG_BMA180)
 	{ "bma023", 0 },
+#endif
 	{ }
 };