diff options
author | Wei-Han Chen <stimim@google.com> | 2018-05-24 19:59:58 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-05-29 06:02:11 -0700 |
commit | ffcf7cf3fbb1456eaf7129a3632ea2758154e204 (patch) | |
tree | e195b1e9fbf64c3adae2b389751ae7816ad32a2a /driver/touchpad_st.h | |
parent | b73431f6733225799d0519966dc79fdf226f61a8 (diff) | |
download | chrome-ec-ffcf7cf3fbb1456eaf7129a3632ea2758154e204.tar.gz |
driver/touchpad_st.c: wait for event "controller ready" after reset
After resetting touchpad, we should wait for "controller ready" event
before sending any commands to touchpad.
BRANCH=none
BUG=b:70482333
BUG=b:78483107
TEST=manual
Signed-off-by: Wei-Han Chen <stimim@chromium.org>
Change-Id: I7049579db23c083e518137055a8243fee400e924
Reviewed-on: https://chromium-review.googlesource.com/1071313
Commit-Ready: Wei-Han Chen <stimim@chromium.org>
Tested-by: Wei-Han Chen <stimim@chromium.org>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
Diffstat (limited to 'driver/touchpad_st.h')
-rw-r--r-- | driver/touchpad_st.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/driver/touchpad_st.h b/driver/touchpad_st.h index 23bb404d36..db4a8f4bc1 100644 --- a/driver/touchpad_st.h +++ b/driver/touchpad_st.h @@ -197,8 +197,10 @@ struct st_tp_host_buffer_heat_map_t { } __packed; struct st_tp_event_t { +#define ST_TP_EVENT_MAGIC 0x3 unsigned magic:2; /* should always be 0x3 */ unsigned major_high:2; +#define ST_TP_EVENT_ID_CONTROLLER_READY 0x0 #define ST_TP_EVENT_ID_ENTER_POINTER 0x1 #define ST_TP_EVENT_ID_MOTION_POINTER 0x2 #define ST_TP_EVENT_ID_LEAVE_POINTER 0x3 @@ -226,7 +228,7 @@ struct st_tp_event_t { struct { uint8_t report_type; - uint32_t info; + uint8_t info[4]; uint8_t reserved; } __packed report; } __packed ; /* anonymous */ |