Lines Matching refs:sensor
22 void rmi_2d_sensor_abs_process(struct rmi_2d_sensor *sensor, in rmi_2d_sensor_abs_process() argument
26 struct rmi_2d_axis_alignment *axis_align = &sensor->axis_align; in rmi_2d_sensor_abs_process()
33 obj->x = sensor->max_x - obj->x; in rmi_2d_sensor_abs_process()
36 obj->y = sensor->max_y - obj->y; in rmi_2d_sensor_abs_process()
56 obj->x = min(sensor->max_x, obj->x); in rmi_2d_sensor_abs_process()
59 obj->y = min(sensor->max_y, obj->y); in rmi_2d_sensor_abs_process()
61 sensor->tracking_pos[slot].x = obj->x; in rmi_2d_sensor_abs_process()
62 sensor->tracking_pos[slot].y = obj->y; in rmi_2d_sensor_abs_process()
66 void rmi_2d_sensor_abs_report(struct rmi_2d_sensor *sensor, in rmi_2d_sensor_abs_report() argument
70 struct rmi_2d_axis_alignment *axis_align = &sensor->axis_align; in rmi_2d_sensor_abs_report()
71 struct input_dev *input = sensor->input; in rmi_2d_sensor_abs_report()
74 if (sensor->kernel_tracking) in rmi_2d_sensor_abs_report()
75 input_mt_slot(input, sensor->tracking_slots[slot]); in rmi_2d_sensor_abs_report()
83 obj->x = sensor->tracking_pos[slot].x; in rmi_2d_sensor_abs_report()
84 obj->y = sensor->tracking_pos[slot].y; in rmi_2d_sensor_abs_report()
98 input_event(sensor->input, EV_ABS, ABS_MT_POSITION_X, obj->x); in rmi_2d_sensor_abs_report()
99 input_event(sensor->input, EV_ABS, ABS_MT_POSITION_Y, obj->y); in rmi_2d_sensor_abs_report()
100 input_event(sensor->input, EV_ABS, ABS_MT_ORIENTATION, wide); in rmi_2d_sensor_abs_report()
101 input_event(sensor->input, EV_ABS, ABS_MT_PRESSURE, obj->z); in rmi_2d_sensor_abs_report()
102 input_event(sensor->input, EV_ABS, ABS_MT_TOUCH_MAJOR, major); in rmi_2d_sensor_abs_report()
103 input_event(sensor->input, EV_ABS, ABS_MT_TOUCH_MINOR, minor); in rmi_2d_sensor_abs_report()
105 rmi_dbg(RMI_DEBUG_2D_SENSOR, &sensor->input->dev, in rmi_2d_sensor_abs_report()
113 void rmi_2d_sensor_rel_report(struct rmi_2d_sensor *sensor, int x, int y) in rmi_2d_sensor_rel_report() argument
115 struct rmi_2d_axis_alignment *axis_align = &sensor->axis_align; in rmi_2d_sensor_rel_report()
130 input_report_rel(sensor->input, REL_X, x); in rmi_2d_sensor_rel_report()
131 input_report_rel(sensor->input, REL_Y, y); in rmi_2d_sensor_rel_report()
136 static void rmi_2d_sensor_set_input_params(struct rmi_2d_sensor *sensor) in rmi_2d_sensor_set_input_params() argument
138 struct input_dev *input = sensor->input; in rmi_2d_sensor_set_input_params()
144 if (sensor->report_abs) { in rmi_2d_sensor_set_input_params()
145 sensor->min_x = sensor->axis_align.clip_x_low; in rmi_2d_sensor_set_input_params()
146 if (sensor->axis_align.clip_x_high) in rmi_2d_sensor_set_input_params()
147 sensor->max_x = min(sensor->max_x, in rmi_2d_sensor_set_input_params()
148 sensor->axis_align.clip_x_high); in rmi_2d_sensor_set_input_params()
150 sensor->min_y = sensor->axis_align.clip_y_low; in rmi_2d_sensor_set_input_params()
151 if (sensor->axis_align.clip_y_high) in rmi_2d_sensor_set_input_params()
152 sensor->max_y = min(sensor->max_y, in rmi_2d_sensor_set_input_params()
153 sensor->axis_align.clip_y_high); in rmi_2d_sensor_set_input_params()
157 max_x = sensor->max_x; in rmi_2d_sensor_set_input_params()
158 max_y = sensor->max_y; in rmi_2d_sensor_set_input_params()
159 if (sensor->axis_align.swap_axes) in rmi_2d_sensor_set_input_params()
164 if (sensor->x_mm && sensor->y_mm) { in rmi_2d_sensor_set_input_params()
165 res_x = (sensor->max_x - sensor->min_x) / sensor->x_mm; in rmi_2d_sensor_set_input_params()
166 res_y = (sensor->max_y - sensor->min_y) / sensor->y_mm; in rmi_2d_sensor_set_input_params()
167 if (sensor->axis_align.swap_axes) in rmi_2d_sensor_set_input_params()
176 if (!sensor->dmax) in rmi_2d_sensor_set_input_params()
177 sensor->dmax = DMAX * res_x; in rmi_2d_sensor_set_input_params()
187 if (sensor->sensor_type == rmi_sensor_touchpad) in rmi_2d_sensor_set_input_params()
192 if (sensor->kernel_tracking) in rmi_2d_sensor_set_input_params()
195 input_mt_init_slots(input, sensor->nbr_fingers, input_flags); in rmi_2d_sensor_set_input_params()
198 if (sensor->report_rel) { in rmi_2d_sensor_set_input_params()
204 if (sensor->topbuttonpad) in rmi_2d_sensor_set_input_params()
209 struct rmi_2d_sensor *sensor) in rmi_2d_sensor_configure_input() argument
217 sensor->input = drv_data->input; in rmi_2d_sensor_configure_input()
218 rmi_2d_sensor_set_input_params(sensor); in rmi_2d_sensor_configure_input()