File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree 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)
935935 acpi_device_fix_up_power (adev );
936936}
937937
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+
938946static const struct acpi_device_id i2c_hid_acpi_match [] = {
939947 {"ACPI0C50" , 0 },
940948 {"PNP0C50" , 0 },
@@ -949,6 +957,8 @@ static inline int i2c_hid_acpi_pdata(struct i2c_client *client,
949957}
950958
951959static inline void i2c_hid_acpi_fix_up_power (struct device * dev ) {}
960+
961+ static inline void i2c_hid_acpi_enable_wakeup (struct device * dev ) {}
952962#endif
953963
954964#ifdef CONFIG_OF
@@ -1076,6 +1086,8 @@ static int i2c_hid_probe(struct i2c_client *client,
10761086
10771087 i2c_hid_acpi_fix_up_power (& client -> dev );
10781088
1089+ i2c_hid_acpi_enable_wakeup (& client -> dev );
1090+
10791091 device_enable_async_suspend (& client -> dev );
10801092
10811093 /* Make sure there is something at this address */
You can’t perform that action at this time.
0 commit comments