Lines Matching full:sensor

36  * The properties for a given sensor are described by its query registers.  The
38 * the F11 device queries as well as the sensor query information.
40 * Similarly, each sensor has control registers that govern its behavior. The
41 * size and layout of the control registers for a given sensor can be determined
44 * And in a likewise fashion, each sensor has data registers where it reports
49 * registers in order to determine the attributes of a sensor. Then
51 * registers for sensor.
66 * Writing this to the F11 command register will cause the sensor to
181 * struct f11_2d_sensor_queries - describes sensor capabilities
185 * @nr_fingers: describes the maximum number of fingers the 2-D sensor
187 * @has_rel: the sensor supports relative motion reporting.
188 * @has_abs: the sensor supports absolute poition reporting.
189 * @has_gestures: the sensor supports gesture reporting.
190 * @has_sensitivity_adjust: the sensor supports a global sensitivity
192 * @configurable: the sensor supports various configuration options.
193 * @nr_x_electrodes: the maximum number of electrodes the 2-D sensor
195 * @nr_y_electrodes: the maximum number of electrodes the 2-D sensor
205 * @has_anchored_finger: then the sensor supports the high-precision second
210 * @has_dribble: the sensor supports the generation of dribble interrupts,
234 * @has_palm_det: the 2-D sensor notifies the host whenever a large conductive
235 * object such as a palm or a cheek touches the 2-D sensor.
238 * rectangular area on the sensor that behaves like a capacitive button.
239 * @has_scroll_zones: scrolling areas near the sensor edges are supported.
259 * @has_proximity: detection of fingers near the sensor is supported and
261 * @has_palm_det_sensitivity: the sensor supports the palm detect sensitivity
266 * @has_contact_geometry: the sensor supports the use of contact geometry to
281 * @has_z_tuning: if set, the sensor supports Z tuning and registers
284 * @has_w_tuning: the sensor supports Wx and Wy scaling and registers
286 * @has_pitch_info: the X and Y pitches of the sensor electrodes can be
288 * @has_finger_size: the default finger width settings for the sensor
291 * @has_segmentation_aggressiveness: the sensor’s ability to distinguish
294 * @has_XY_clip: the inactive outside borders of the sensor can be
296 * @has_drumming_filter: the sensor can be configured to distinguish
310 * of the sensor are present.
323 * @is_clear: if set, this is a clear sensor (indicating direct pointing
330 * @x_sensor_size_mm: size of the sensor in millimeters on the X axis.
331 * @y_sensor_size_mm: size of the sensor in millimeters on the Y axis.
511 /** Data pertaining to F11 in general. For per-sensor data, see struct
518 * milliseconds before rezeroing the sensor(s). This is useful in systems with
520 * sensor(s) coming out of sleep state may be bogus.
521 * @sensors - per sensor data structures.
533 struct rmi_2d_sensor sensor; member
550 struct rmi_2d_sensor *sensor = &f11->sensor; in rmi_f11_rel_pos_report() local
557 rmi_2d_sensor_rel_report(sensor, x, y); in rmi_f11_rel_pos_report()
561 struct rmi_2d_sensor *sensor, in rmi_f11_abs_pos_process() argument
585 rmi_2d_sensor_abs_process(sensor, obj, n_finger); in rmi_f11_abs_pos_process()
595 struct rmi_2d_sensor *sensor, int size) in rmi_f11_finger_handler() argument
602 int abs_size = sensor->nbr_fingers * RMI_F11_ABS_BYTES; in rmi_f11_finger_handler()
604 if (sensor->report_abs) { in rmi_f11_finger_handler()
608 abs_fingers = sensor->nbr_fingers; in rmi_f11_finger_handler()
619 rmi_f11_abs_pos_process(f11, sensor, &sensor->objs[i], in rmi_f11_finger_handler()
627 if (sensor->kernel_tracking) in rmi_f11_finger_handler()
628 input_mt_assign_slots(sensor->input, in rmi_f11_finger_handler()
629 sensor->tracking_slots, in rmi_f11_finger_handler()
630 sensor->tracking_pos, in rmi_f11_finger_handler()
631 sensor->nbr_fingers, in rmi_f11_finger_handler()
632 sensor->dmax); in rmi_f11_finger_handler()
640 rmi_2d_sensor_abs_report(sensor, &sensor->objs[i], i); in rmi_f11_finger_handler()
643 input_mt_sync_frame(sensor->input); in rmi_f11_finger_handler()
644 } else if (sensor->report_rel) { in rmi_f11_finger_handler()
645 if ((abs_size + sensor->nbr_fingers * RMI_F11_REL_BYTES) > size) in rmi_f11_finger_handler()
648 rel_fingers = sensor->nbr_fingers; in rmi_f11_finger_handler()
658 struct rmi_2d_sensor *sensor = &f11->sensor; in f11_2d_construct_data() local
663 sensor->nbr_fingers = (query->nr_fingers == 5 ? 10 : in f11_2d_construct_data()
666 sensor->pkt_size = DIV_ROUND_UP(sensor->nbr_fingers, 4); in f11_2d_construct_data()
669 sensor->pkt_size += (sensor->nbr_fingers * 5); in f11_2d_construct_data()
670 sensor->attn_size = sensor->pkt_size; in f11_2d_construct_data()
674 sensor->pkt_size += (sensor->nbr_fingers * 2); in f11_2d_construct_data()
678 sensor->pkt_size += sizeof(u8); in f11_2d_construct_data()
682 sensor->pkt_size += sizeof(u8); in f11_2d_construct_data()
685 sensor->pkt_size += 3; in f11_2d_construct_data()
687 sensor->pkt_size--; in f11_2d_construct_data()
689 sensor->pkt_size--; in f11_2d_construct_data()
693 sensor->pkt_size += in f11_2d_construct_data()
696 sensor->data_pkt = devm_kzalloc(&sensor->fn->dev, sensor->pkt_size, in f11_2d_construct_data()
698 if (!sensor->data_pkt) in f11_2d_construct_data()
701 data->f_state = sensor->data_pkt; in f11_2d_construct_data()
702 i = DIV_ROUND_UP(sensor->nbr_fingers, 4); in f11_2d_construct_data()
705 data->abs_pos = &sensor->data_pkt[i]; in f11_2d_construct_data()
706 i += (sensor->nbr_fingers * RMI_F11_ABS_BYTES); in f11_2d_construct_data()
710 data->rel_pos = &sensor->data_pkt[i]; in f11_2d_construct_data()
711 i += (sensor->nbr_fingers * RMI_F11_REL_BYTES); in f11_2d_construct_data()
715 data->gest_1 = &sensor->data_pkt[i]; in f11_2d_construct_data()
720 data->gest_2 = &sensor->data_pkt[i]; in f11_2d_construct_data()
725 data->pinch = &sensor->data_pkt[i]; in f11_2d_construct_data()
734 data->flick = &sensor->data_pkt[i]; in f11_2d_construct_data()
743 data->rotate = &sensor->data_pkt[i]; in f11_2d_construct_data()
749 data->shapes = &sensor->data_pkt[i]; in f11_2d_construct_data()
1029 * query 15 - 18 contain the size of the sensor in rmi_f11_get_query_parameters()
1074 struct rmi_2d_sensor *sensor; in rmi_f11_initialize() local
1122 sensor = &f11->sensor; in rmi_f11_initialize()
1123 sensor->fn = fn; in rmi_f11_initialize()
1141 f11->sensor.sensor_type = rmi_sensor_touchscreen; in rmi_f11_initialize()
1143 f11->sensor.sensor_type = rmi_sensor_touchpad; in rmi_f11_initialize()
1146 sensor->report_abs = f11->sens_query.has_abs; in rmi_f11_initialize()
1148 sensor->axis_align = in rmi_f11_initialize()
1151 sensor->topbuttonpad = f11->sensor_pdata.topbuttonpad; in rmi_f11_initialize()
1152 sensor->kernel_tracking = f11->sensor_pdata.kernel_tracking; in rmi_f11_initialize()
1153 sensor->dmax = f11->sensor_pdata.dmax; in rmi_f11_initialize()
1154 sensor->dribble = f11->sensor_pdata.dribble; in rmi_f11_initialize()
1155 sensor->palm_detect = f11->sensor_pdata.palm_detect; in rmi_f11_initialize()
1158 sensor->x_mm = f11->sens_query.x_sensor_size_mm; in rmi_f11_initialize()
1159 sensor->y_mm = f11->sens_query.y_sensor_size_mm; in rmi_f11_initialize()
1161 sensor->x_mm = f11->sensor_pdata.x_mm; in rmi_f11_initialize()
1162 sensor->y_mm = f11->sensor_pdata.y_mm; in rmi_f11_initialize()
1165 if (sensor->sensor_type == rmi_sensor_default) in rmi_f11_initialize()
1166 sensor->sensor_type = in rmi_f11_initialize()
1169 sensor->report_abs = sensor->report_abs in rmi_f11_initialize()
1173 if (!sensor->report_abs) in rmi_f11_initialize()
1178 sensor->report_rel = f11->sens_query.has_rel; in rmi_f11_initialize()
1192 sensor->max_x = max_x_pos; in rmi_f11_initialize()
1193 sensor->max_y = max_y_pos; in rmi_f11_initialize()
1200 f11->sensor.attn_size += f11->sensor.nbr_fingers * 2; in rmi_f11_initialize()
1203 sensor->tracking_pos = devm_kcalloc(&fn->dev, in rmi_f11_initialize()
1204 sensor->nbr_fingers, sizeof(struct input_mt_pos), in rmi_f11_initialize()
1206 sensor->tracking_slots = devm_kcalloc(&fn->dev, in rmi_f11_initialize()
1207 sensor->nbr_fingers, sizeof(int), GFP_KERNEL); in rmi_f11_initialize()
1208 sensor->objs = devm_kcalloc(&fn->dev, in rmi_f11_initialize()
1209 sensor->nbr_fingers, in rmi_f11_initialize()
1212 if (!sensor->tracking_pos || !sensor->tracking_slots || !sensor->objs) in rmi_f11_initialize()
1216 if (sensor->axis_align.delta_x_threshold) in rmi_f11_initialize()
1218 sensor->axis_align.delta_x_threshold; in rmi_f11_initialize()
1220 if (sensor->axis_align.delta_y_threshold) in rmi_f11_initialize()
1222 sensor->axis_align.delta_y_threshold; in rmi_f11_initialize()
1228 if (sensor->axis_align.delta_x_threshold || in rmi_f11_initialize()
1229 sensor->axis_align.delta_y_threshold) { in rmi_f11_initialize()
1235 switch (sensor->dribble) { in rmi_f11_initialize()
1249 switch (sensor->palm_detect) { in rmi_f11_initialize()
1278 struct rmi_2d_sensor *sensor = &f11->sensor; in rmi_f11_config() local
1281 if (!sensor->report_abs) in rmi_f11_config()
1286 if (!sensor->report_rel) in rmi_f11_config()
1307 int valid_bytes = f11->sensor.pkt_size; in rmi_f11_attention()
1314 if (f11->sensor.attn_size > drvdata->attn_data.size) in rmi_f11_attention()
1317 valid_bytes = f11->sensor.attn_size; in rmi_f11_attention()
1318 memcpy(f11->sensor.data_pkt, drvdata->attn_data.data, in rmi_f11_attention()
1324 data_base_addr, f11->sensor.data_pkt, in rmi_f11_attention()
1325 f11->sensor.pkt_size); in rmi_f11_attention()
1330 rmi_f11_finger_handler(f11, &f11->sensor, valid_bytes); in rmi_f11_attention()
1368 error = rmi_2d_sensor_configure_input(fn, &f11->sensor); in rmi_f11_probe()