summaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-rmi.c
diff options
context:
space:
mode:
authorAndrew Duggan <aduggan@synaptics.com>2014-08-06 16:37:40 -0400
committerJiri Kosina <jkosina@suse.cz>2014-08-14 05:41:56 -0400
commitdaebdd7ee30b4ec7dd6a4e90f1f66c86ec113bbc (patch)
tree4e06bc878fba105be6c1894d55dde20802699ae6 /drivers/hid/hid-rmi.c
parent5be5db24fc0883d9e38df378c1de9a00f8933999 (diff)
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 <aduggan@synaptics.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/hid-rmi.c')
-rw-r--r--drivers/hid/hid-rmi.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/hid/hid-rmi.c b/drivers/hid/hid-rmi.c
index 0dc25142f451..8389e8109218 100644
--- a/drivers/hid/hid-rmi.c
+++ b/drivers/hid/hid-rmi.c
@@ -909,10 +909,15 @@ static int rmi_probe(struct hid_device *hdev, const struct hid_device_id *id)
909 return ret; 909 return ret;
910 } 910 }
911 911
912 if (!test_bit(RMI_STARTED, &data->flags)) { 912 if (!test_bit(RMI_STARTED, &data->flags))
913 hid_hw_stop(hdev); 913 /*
914 return -EIO; 914 * The device maybe in the bootloader if rmi_input_configured
915 } 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");
916 921
917 return 0; 922 return 0;
918} 923}