Skip to content

Instantly share code, notes, and snippets.

@MaxLeiter
Created December 10, 2020 19:31
Show Gist options
  • Save MaxLeiter/800146e7fbb5abee792d1b50f6e3dcbc to your computer and use it in GitHub Desktop.
Save MaxLeiter/800146e7fbb5abee792d1b50f6e3dcbc to your computer and use it in GitHub Desktop.
From 5c87b8f57e28e12e04e3434419ca4f80ba442e1e Mon Sep 17 00:00:00 2001
From: Max Leiter <maxwell.leiter@gmail.com>
Date: Thu, 10 Dec 2020 11:21:43 -0800
Subject: [PATCH] MSHW0184 binding
---
drivers/iio/light/apds9960.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/iio/light/apds9960.c b/drivers/iio/light/apds9960.c
index 9afb3fcc74e6..04b9cc52fe07 100644
--- a/drivers/iio/light/apds9960.c
+++ b/drivers/iio/light/apds9960.c
@@ -8,6 +8,7 @@
* TODO: gesture + proximity calib offsets
*/
+#include <linux/acpi.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/interrupt.h>
@@ -1119,11 +1120,18 @@ static const struct of_device_id apds9960_of_match[] = {
};
MODULE_DEVICE_TABLE(of, apds9960_of_match);
+static const struct acpi_device_id apds9960_acpi_match[] = {
+ { "MSHW0184" },
+ { }
+};
+MODULE_DEVICE_TABLE(acpi, apds9960_acpi_match);
+
static struct i2c_driver apds9960_driver = {
.driver = {
.name = APDS9960_DRV_NAME,
.of_match_table = apds9960_of_match,
.pm = &apds9960_pm_ops,
+ .acpi_match_table = apds9960_acpi_match,
},
.probe = apds9960_probe,
.remove = apds9960_remove,
--
2.29.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment