public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] iio:light:apds9960 add detection for MSHW0184 ACPI device in apds9960 driver
@ 2020-12-20  1:50 Max Leiter
  2020-12-20 22:05 ` Matt Ranostay
  0 siblings, 1 reply; 3+ messages in thread
From: Max Leiter @ 2020-12-20  1:50 UTC (permalink / raw)
  To: linux-iio
  Cc: blaz, matt.ranostay, Max Leiter, Jonathan Cameron,
	Lars-Peter Clausen, Peter Meerwald-Stadler, Alexandru Ardelean,
	linux-kernel

The device is used in the Microsoft Surface Book 3 and Surface Pro 7

Signed-off-by: Max Leiter <maxwell.leiter@gmail.com>
---
 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..20719141c03a 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>
@@ -1113,6 +1114,12 @@ static const struct i2c_device_id apds9960_id[] = {
 };
 MODULE_DEVICE_TABLE(i2c, apds9960_id);
 
+static const struct acpi_device_id apds9960_acpi_match[] = {
+	{ "MSHW0184" },
+	{ }
+};
+MODULE_DEVICE_TABLE(acpi, apds9960_acpi_match);
+
 static const struct of_device_id apds9960_of_match[] = {
 	{ .compatible = "avago,apds9960" },
 	{ }
@@ -1124,6 +1131,7 @@ static struct i2c_driver apds9960_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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-12-21 14:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-20  1:50 [PATCH] iio:light:apds9960 add detection for MSHW0184 ACPI device in apds9960 driver Max Leiter
2020-12-20 22:05 ` Matt Ranostay
2020-12-21 14:42   ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox