diff options
author | Nick Dyer <nick@shmanahar.org> | 2017-04-15 00:44:08 +0300 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2017-04-15 00:52:32 +0300 |
commit | a6869e3a76f46b26a2b208882701fa17537b18cd (patch) | |
tree | 26864b62fb366eed366d827e7fc315488be4179b /drivers/input/rmi4/rmi_f34.c | |
parent | 25670fb0373013ad9cdb2676afb468e4d88e1d53 (diff) | |
download | linux-a6869e3a76f46b26a2b208882701fa17537b18cd.tar.xz |
Input: synaptics-rmi4 - enable IRQ operation in F34 V7
The polled firmware update proved unreliable when testing on S7817. Use
attention to signal commands are complete.
Signed-off-by: Nick Dyer <nick@shmanahar.org>
Tested-by: Chris Healy <cphealy@gmail.com>
Acked-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/rmi4/rmi_f34.c')
-rw-r--r-- | drivers/input/rmi4/rmi_f34.c | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/drivers/input/rmi4/rmi_f34.c b/drivers/input/rmi4/rmi_f34.c index 425fe140e9df..b8ee78e0d61f 100644 --- a/drivers/input/rmi4/rmi_f34.c +++ b/drivers/input/rmi4/rmi_f34.c @@ -105,16 +105,27 @@ static int rmi_f34_attention(struct rmi_function *fn, unsigned long *irq_bits) { struct f34_data *f34 = dev_get_drvdata(&fn->dev); int ret; + u8 status; - if (f34->bl_version != 5) - return 0; + if (f34->bl_version == 5) { + ret = rmi_read(f34->fn->rmi_dev, f34->v5.ctrl_address, + &status); + rmi_dbg(RMI_DEBUG_FN, &fn->dev, "%s: status: %#02x, ret: %d\n", + __func__, status, ret); - ret = rmi_read(f34->fn->rmi_dev, f34->v5.ctrl_address, &f34->v5.status); - rmi_dbg(RMI_DEBUG_FN, &fn->dev, "%s: status: %#02x, ret: %d\n", - __func__, f34->v5.status, ret); - - if (!ret && !(f34->v5.status & 0x7f)) - complete(&f34->v5.cmd_done); + if (!ret && !(status & 0x7f)) + complete(&f34->v5.cmd_done); + } else { + ret = rmi_read_block(f34->fn->rmi_dev, + f34->fn->fd.data_base_addr + + f34->v7.off.flash_status, + &status, sizeof(status)); + rmi_dbg(RMI_DEBUG_FN, &fn->dev, "%s: status: %#02x, ret: %d\n", + __func__, status, ret); + + if (!ret && !(status & 0x1f)) + complete(&f34->v7.cmd_done); + } return 0; } |