aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iio/light/apds9960.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/iio/light/apds9960.c')
-rw-r--r--drivers/iio/light/apds9960.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/iio/light/apds9960.c b/drivers/iio/light/apds9960.c
index a4304edc3e0f..518a47e9377b 100644
--- a/drivers/iio/light/apds9960.c
+++ b/drivers/iio/light/apds9960.c
@@ -343,7 +343,7 @@ static struct attribute *apds9960_attributes[] = {
NULL,
};
-static struct attribute_group apds9960_attribute_group = {
+static const struct attribute_group apds9960_attribute_group = {
.attrs = apds9960_attributes,
};
@@ -1112,6 +1112,8 @@ static int apds9960_runtime_resume(struct device *dev)
#endif
static const struct dev_pm_ops apds9960_pm_ops = {
+ SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
+ pm_runtime_force_resume)
SET_RUNTIME_PM_OPS(apds9960_runtime_suspend,
apds9960_runtime_resume, NULL)
};
@@ -1122,9 +1124,16 @@ static const struct i2c_device_id apds9960_id[] = {
};
MODULE_DEVICE_TABLE(i2c, apds9960_id);
+static const struct of_device_id apds9960_of_match[] = {
+ { .compatible = "avago,apds9960" },
+ { }
+};
+MODULE_DEVICE_TABLE(of, apds9960_of_match);
+
static struct i2c_driver apds9960_driver = {
.driver = {
.name = APDS9960_DRV_NAME,
+ .of_match_table = apds9960_of_match,
.pm = &apds9960_pm_ops,
},
.probe = apds9960_probe,