File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -935,6 +935,14 @@ static void i2c_hid_acpi_fix_up_power(struct device *dev)
935
935
acpi_device_fix_up_power (adev );
936
936
}
937
937
938
+ static void i2c_hid_acpi_enable_wakeup (struct device * dev )
939
+ {
940
+ if (acpi_gbl_FADT .flags & ACPI_FADT_LOW_POWER_S0 ) {
941
+ device_set_wakeup_capable (dev , true);
942
+ device_set_wakeup_enable (dev , false);
943
+ }
944
+ }
945
+
938
946
static const struct acpi_device_id i2c_hid_acpi_match [] = {
939
947
{"ACPI0C50" , 0 },
940
948
{"PNP0C50" , 0 },
@@ -949,6 +957,8 @@ static inline int i2c_hid_acpi_pdata(struct i2c_client *client,
949
957
}
950
958
951
959
static inline void i2c_hid_acpi_fix_up_power (struct device * dev ) {}
960
+
961
+ static inline void i2c_hid_acpi_enable_wakeup (struct device * dev ) {}
952
962
#endif
953
963
954
964
#ifdef CONFIG_OF
@@ -1076,6 +1086,8 @@ static int i2c_hid_probe(struct i2c_client *client,
1076
1086
1077
1087
i2c_hid_acpi_fix_up_power (& client -> dev );
1078
1088
1089
+ i2c_hid_acpi_enable_wakeup (& client -> dev );
1090
+
1079
1091
device_enable_async_suspend (& client -> dev );
1080
1092
1081
1093
/* Make sure there is something at this address */
You can’t perform that action at this time.
0 commit comments