summaryrefslogtreecommitdiff
path: root/drivers/input/rmi4/rmi_f34.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/rmi4/rmi_f34.c')
-rw-r--r--drivers/input/rmi4/rmi_f34.c27
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;
}