@@ -441,6 +441,14 @@ static int gamecube_hid_probe(struct hid_device *hdev,
return ret;
}
+#ifdef CONFIG_PM
+static int gamecube_resume(struct hid_device *hdev)
+{
+ gamecube_send_cmd_init(hdev);
+ return 0;
+}
+#endif
+
static void gamecube_hid_remove(struct hid_device *hdev)
{
struct gamecube_adapter *adpt = hid_get_drvdata(hdev);
@@ -462,6 +470,9 @@ static struct hid_driver gamecube_hid_driver = {
.probe = gamecube_hid_probe,
.remove = gamecube_hid_remove,
.raw_event = gamecube_hid_event,
+#ifdef CONFIG_PM
+ .reset_resume = gamecube_resume,
+#endif
};
module_hid_driver(gamecube_hid_driver);
Send the init command after suspend, so that we get input reports again. Signed-off-by: François-Xavier Carton <fx.carton91@gmail.com> --- drivers/hid/hid-gamecube-adapter.c | 11 +++++++++++ 1 file changed, 11 insertions(+)