History

Input: synaptics-rmi4 - switch to reduced reporting mode

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.

Lucas Stach committed 6 years ago

Commit c5ccf2a1 parent f61023d1 file · +14 −0Browse files

Unified · Split

drivers/input/rmi4/rmi_f11.c+14−0
@@ -412,6 +412,10 @@ struct f11_2d_sensor_queries { · 411 unmodified lines
412 412
413/* Defs for Ctrl0. */413/* Defs for Ctrl0. */
414#define RMI_F11_REPORT_MODE_MASK 0x07414#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#define RMI_F11_ABS_POS_FILT (1 << 3)419#define RMI_F11_ABS_POS_FILT (1 << 3)
416#define RMI_F11_REL_POS_FILT (1 << 4)420#define RMI_F11_REL_POS_FILT (1 << 4)
417#define RMI_F11_REL_BALLISTICS (1 << 5)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 ctrl->ctrl0_11[RMI_F11_DELTA_Y_THRESHOLD] =1199 ctrl->ctrl0_11[RMI_F11_DELTA_Y_THRESHOLD] =
1196 sensor->axis_align.delta_y_threshold;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 if (f11->sens_query.has_dribble) {1212 if (f11->sens_query.has_dribble) {
1199 switch (sensor->dribble) {1213 switch (sensor->dribble) {
1200 case RMI_REG_STATE_OFF:1214 case RMI_REG_STATE_OFF: