summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--driver/touchpad_st.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/driver/touchpad_st.c b/driver/touchpad_st.c
index 424069c275..f6c29a9a01 100644
--- a/driver/touchpad_st.c
+++ b/driver/touchpad_st.c
@@ -1176,14 +1176,15 @@ static int heatmap_send_packet(struct usb_isochronous_config const *config)
static int st_tp_usb_set_interface(usb_uint alternate_setting,
usb_uint interface)
{
- if ((system_info.release_info & 0xFF) < ST_TP_MIN_HEATMAP_VERSION) {
- CPRINTS("release version %04x doesn't support heatmap",
- system_info.release_info);
- /* Heatmap mode is not supported in this version. */
- return -1;
- }
-
if (alternate_setting == 1) {
+ if ((system_info.release_info & 0xFF) <
+ ST_TP_MIN_HEATMAP_VERSION) {
+ CPRINTS("release version %04x doesn't support heatmap",
+ system_info.release_info);
+ /* Heatmap mode is not supported in this version. */
+ return -1;
+ }
+
hook_call_deferred(&st_tp_enable_heat_map_data, 0);
return 0;
} else if (alternate_setting == 0) {