linux-surface/patches/5.4/0010-surface-sensors.patch
Maximilian Luz 5399769982
Update v5.4 patches
Changes:
 - SAM:
   - Move and split drivers to closer reflect upstreaming process
   - Various updates to HID and battery/AC drivers for upstreaming

 - Hotplug:
   - various fixes and improvements

 - GPE:
   - Fix Kconfig dependency

Links:
 - kernel: 531e6519a8
 - SAM: bee2add45f
 - GPE: 6ecfdb3905
 - Hotplug: 595ed62f24
2021-02-15 21:30:40 +01:00

55 lines
1.6 KiB
Diff

From 0da844f153e038ebf1dc3da125f8f5f37f8e9786 Mon Sep 17 00:00:00 2001
From: Max Leiter <maxwell.leiter@gmail.com>
Date: Sat, 19 Dec 2020 17:50:55 -0800
Subject: [PATCH] iio:light:apds9960 add detection for MSHW0184 ACPI device in
apds9960 driver
The device is used in the Microsoft Surface Book 3 and Surface Pro 7
Signed-off-by: Max Leiter <maxwell.leiter@gmail.com>
Reviewed-by: Matt Ranostay <matt.ranostay@konsulko.com>
Link: https://lore.kernel.org/r/20201220015057.107246-1-maxwell.leiter@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Patchset: surface-sensors
---
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 c5dfb9a6b5a1..ee4a576dc62c 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>
@@ -1116,6 +1117,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" },
{ }
@@ -1127,6 +1134,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.30.1