diff options
author | Nick Dyer <nick@shmanahar.org> | 2016-11-23 02:44:12 +0100 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2016-11-23 02:59:23 +0100 |
commit | 29fd0ec2bdbef6734fd4c39c23f61d9f030a66a0 (patch) | |
tree | 5975ca58b4d44fb37eb2dda07577350910f60726 /drivers/input/rmi4/rmi_f01.c | |
parent | Input: synaptics-rmi4 - unlock on error (diff) | |
download | linux-29fd0ec2bdbef6734fd4c39c23f61d9f030a66a0.tar.xz linux-29fd0ec2bdbef6734fd4c39c23f61d9f030a66a0.zip |
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.c | 6 |
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); |