summaryrefslogtreecommitdiffstats
path: root/drivers/input/rmi4/rmi_f01.c
diff options
context:
space:
mode:
authorNick Dyer <nick@shmanahar.org>2016-11-22 17:44:12 -0800
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2016-11-22 17:59:23 -0800
commit29fd0ec2bdbef6734fd4c39c23f61d9f030a66a0 (patch)
tree5975ca58b4d44fb37eb2dda07577350910f60726 /drivers/input/rmi4/rmi_f01.c
parent792f497b22afd0563b94dd8fa129a05f762a2c25 (diff)
downloadlinux-29fd0ec2bdbef6734fd4c39c23f61d9f030a66a0.tar.bz2
Input: synaptics-rmi4 - add support for F34 device reflash
Add support for updating firmware, triggered by a sysfs attribute. This patch has been tested on Synaptics S7300. Signed-off-by: Nick Dyer <nick@shmanahar.org> Tested-by: Chris Healy <cphealy@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/rmi4/rmi_f01.c')
-rw-r--r--drivers/input/rmi4/rmi_f01.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/input/rmi4/rmi_f01.c b/drivers/input/rmi4/rmi_f01.c
index 2cfa9f64acfb..cae35c6cde31 100644
--- a/drivers/input/rmi4/rmi_f01.c
+++ b/drivers/input/rmi4/rmi_f01.c
@@ -63,6 +63,8 @@ struct f01_basic_properties {
#define RMI_F01_STATUS_CODE(status) ((status) & 0x0f)
/* The device has lost its configuration for some reason. */
#define RMI_F01_STATUS_UNCONFIGURED(status) (!!((status) & 0x80))
+/* The device is in bootloader mode */
+#define RMI_F01_STATUS_BOOTLOADER(status) ((status) & 0x40)
/* Control register bits */
@@ -594,6 +596,10 @@ static int rmi_f01_attention(struct rmi_function *fn,
return error;
}
+ if (RMI_F01_STATUS_BOOTLOADER(device_status))
+ dev_warn(&fn->dev,
+ "Device in bootloader mode, please update firmware\n");
+
if (RMI_F01_STATUS_UNCONFIGURED(device_status)) {
dev_warn(&fn->dev, "Device reset detected.\n");
error = rmi_dev->driver->reset_handler(rmi_dev);