Skip to content

Commit daebdd7

Browse files
aduggan-synaJiri Kosina
authored andcommitted
HID: rmi: print an error if F11 is not found instead of stopping the device
Currently rmi_probe will return -EIO if the device doesn't report that it has F11. This would indicate that something happened and the device is in the bootloader. We can recover the device using a userspace firmware update tool, but it needs access to the device through the hidraw device file. If the probe returns -EIO the hidraw device won't be created. So instead of failing the probe, just print an error message, but leave the device accessible from userspace. Signed-off-by: Andrew Duggan <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent 5be5db2 commit daebdd7

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

drivers/hid/hid-rmi.c

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -909,10 +909,15 @@ static int rmi_probe(struct hid_device *hdev, const struct hid_device_id *id)
909909
return ret;
910910
}
911911

912-
if (!test_bit(RMI_STARTED, &data->flags)) {
913-
hid_hw_stop(hdev);
914-
return -EIO;
915-
}
912+
if (!test_bit(RMI_STARTED, &data->flags))
913+
/*
914+
* The device maybe in the bootloader if rmi_input_configured
915+
* failed to find F11 in the PDT. Print an error, but don't
916+
* return an error from rmi_probe so that hidraw will be
917+
* accessible from userspace. That way a userspace tool
918+
* can be used to reload working firmware on the touchpad.
919+
*/
920+
hid_err(hdev, "Device failed to be properly configured\n");
916921

917922
return 0;
918923
}

0 commit comments

Comments
 (0)