When the distance thresholds are set the controller must be in reduced reporting mode for them to have any effect on the interrupt generation. This has a potentially large impact on the number of events the host needs to process.
Unified · Split
| @@ -412,6 +412,10 @@ struct f11_2d_sensor_queries { · 411 unmodified lines | ||
| 412 | 412 | |
| 413 | 413 | /* Defs for Ctrl0. */ |
| 414 | 414 | #define RMI_F11_REPORT_MODE_MASK 0x07 |
| 415 | +#define RMI_F11_REPORT_MODE_CONTINUOUS (0 << 0) | |
| 416 | +#define RMI_F11_REPORT_MODE_REDUCED (1 << 0) | |
| 417 | +#define RMI_F11_REPORT_MODE_FS_CHANGE (2 << 0) | |
| 418 | +#define RMI_F11_REPORT_MODE_FP_CHANGE (3 << 0) | |
| 415 | 419 | #define RMI_F11_ABS_POS_FILT (1 << 3) |
| 416 | 420 | #define RMI_F11_REL_POS_FILT (1 << 4) |
| 417 | 421 | #define RMI_F11_REL_BALLISTICS (1 << 5) |
| @@ -1195,6 +1199,16 @@ static int rmi_f11_initialize(struct rmi_function *fn) · 777 unmodified lines | ||
| 1195 | 1199 | ctrl->ctrl0_11[RMI_F11_DELTA_Y_THRESHOLD] = |
| 1196 | 1200 | sensor->axis_align.delta_y_threshold; |
| 1197 | 1201 | |
| 1202 | + /* | |
| 1203 | + * If distance threshold values are set, switch to reduced reporting | |
| 1204 | + * mode so they actually get used by the controller. | |
| 1205 | + */ | |
| 1206 | + if (ctrl->ctrl0_11[RMI_F11_DELTA_X_THRESHOLD] || | |
| 1207 | + ctrl->ctrl0_11[RMI_F11_DELTA_Y_THRESHOLD]) { | |
| 1208 | + ctrl->ctrl0_11[0] &= ~RMI_F11_REPORT_MODE_MASK; | |
| 1209 | + ctrl->ctrl0_11[0] |= RMI_F11_REPORT_MODE_REDUCED; | |
| 1210 | + } | |
| 1211 | + | |
| 1198 | 1212 | if (f11->sens_query.has_dribble) { |
| 1199 | 1213 | switch (sensor->dribble) { |
| 1200 | 1214 | case RMI_REG_STATE_OFF: |