Lines Matching refs:f11
526 static void rmi_f11_rel_pos_report(struct f11_data *f11, u8 n_finger) in rmi_f11_rel_pos_report() argument
528 struct rmi_2d_sensor *sensor = &f11->sensor; in rmi_f11_rel_pos_report()
529 struct f11_2d_data *data = &f11->data; in rmi_f11_rel_pos_report()
538 static void rmi_f11_abs_pos_process(struct f11_data *f11, in rmi_f11_abs_pos_process() argument
544 struct f11_2d_data *data = &f11->data; in rmi_f11_abs_pos_process()
572 static void rmi_f11_finger_handler(struct f11_data *f11, in rmi_f11_finger_handler() argument
575 const u8 *f_state = f11->data.f_state; in rmi_f11_finger_handler()
597 rmi_f11_abs_pos_process(f11, sensor, &sensor->objs[i], in rmi_f11_finger_handler()
629 rmi_f11_rel_pos_report(f11, i); in rmi_f11_finger_handler()
634 static int f11_2d_construct_data(struct f11_data *f11) in f11_2d_construct_data() argument
636 struct rmi_2d_sensor *sensor = &f11->sensor; in f11_2d_construct_data()
637 struct f11_2d_sensor_queries *query = &f11->sens_query; in f11_2d_construct_data()
638 struct f11_2d_data *data = &f11->data; in f11_2d_construct_data()
765 struct f11_data *f11, in rmi_f11_get_query_parameters() argument
873 if (f11->has_query9) { in rmi_f11_get_query_parameters()
909 if (f11->has_query11) { in rmi_f11_get_query_parameters()
935 if (f11->has_query12) { in rmi_f11_get_query_parameters()
1013 if (f11->has_query27) in rmi_f11_get_query_parameters()
1016 if (f11->has_query28) { in rmi_f11_get_query_parameters()
1033 f11->has_acm = true; in rmi_f11_get_query_parameters()
1042 struct f11_data *f11; in rmi_f11_initialize() local
1063 f11 = devm_kzalloc(&fn->dev, sizeof(struct f11_data) + mask_size * 2, in rmi_f11_initialize()
1065 if (!f11) in rmi_f11_initialize()
1069 rc = rmi_2d_sensor_of_probe(&fn->dev, &f11->sensor_pdata); in rmi_f11_initialize()
1073 f11->sensor_pdata = pdata->sensor_pdata; in rmi_f11_initialize()
1076 f11->rezero_wait_ms = f11->sensor_pdata.rezero_wait; in rmi_f11_initialize()
1078 f11->abs_mask = (unsigned long *)((char *)f11 in rmi_f11_initialize()
1080 f11->rel_mask = (unsigned long *)((char *)f11 in rmi_f11_initialize()
1083 set_bit(fn->irq_pos, f11->abs_mask); in rmi_f11_initialize()
1084 set_bit(fn->irq_pos + 1, f11->rel_mask); in rmi_f11_initialize()
1093 f11->has_query9 = !!(buf & RMI_F11_HAS_QUERY9); in rmi_f11_initialize()
1094 f11->has_query11 = !!(buf & RMI_F11_HAS_QUERY11); in rmi_f11_initialize()
1095 f11->has_query12 = !!(buf & RMI_F11_HAS_QUERY12); in rmi_f11_initialize()
1096 f11->has_query27 = !!(buf & RMI_F11_HAS_QUERY27); in rmi_f11_initialize()
1097 f11->has_query28 = !!(buf & RMI_F11_HAS_QUERY28); in rmi_f11_initialize()
1100 sensor = &f11->sensor; in rmi_f11_initialize()
1103 rc = rmi_f11_get_query_parameters(rmi_dev, f11, in rmi_f11_initialize()
1104 &f11->sens_query, query_offset); in rmi_f11_initialize()
1109 rc = f11_read_control_regs(fn, &f11->dev_controls, in rmi_f11_initialize()
1117 if (f11->sens_query.has_info2) { in rmi_f11_initialize()
1118 if (f11->sens_query.is_clear) in rmi_f11_initialize()
1119 f11->sensor.sensor_type = rmi_sensor_touchscreen; in rmi_f11_initialize()
1121 f11->sensor.sensor_type = rmi_sensor_touchpad; in rmi_f11_initialize()
1124 sensor->report_abs = f11->sens_query.has_abs; in rmi_f11_initialize()
1127 f11->sensor_pdata.axis_align; in rmi_f11_initialize()
1129 sensor->topbuttonpad = f11->sensor_pdata.topbuttonpad; in rmi_f11_initialize()
1130 sensor->kernel_tracking = f11->sensor_pdata.kernel_tracking; in rmi_f11_initialize()
1131 sensor->dmax = f11->sensor_pdata.dmax; in rmi_f11_initialize()
1132 sensor->dribble = f11->sensor_pdata.dribble; in rmi_f11_initialize()
1133 sensor->palm_detect = f11->sensor_pdata.palm_detect; in rmi_f11_initialize()
1135 if (f11->sens_query.has_physical_props) { in rmi_f11_initialize()
1136 sensor->x_mm = f11->sens_query.x_sensor_size_mm; in rmi_f11_initialize()
1137 sensor->y_mm = f11->sens_query.y_sensor_size_mm; in rmi_f11_initialize()
1139 sensor->x_mm = f11->sensor_pdata.x_mm; in rmi_f11_initialize()
1140 sensor->y_mm = f11->sensor_pdata.y_mm; in rmi_f11_initialize()
1145 f11->sensor_pdata.sensor_type; in rmi_f11_initialize()
1148 && !(f11->sensor_pdata.disable_report_mask in rmi_f11_initialize()
1156 sensor->report_rel = f11->sens_query.has_rel; in rmi_f11_initialize()
1173 rc = f11_2d_construct_data(f11); in rmi_f11_initialize()
1177 if (f11->has_acm) in rmi_f11_initialize()
1178 f11->sensor.attn_size += f11->sensor.nbr_fingers * 2; in rmi_f11_initialize()
1193 ctrl = &f11->dev_controls; in rmi_f11_initialize()
1212 if (f11->sens_query.has_dribble) { in rmi_f11_initialize()
1226 if (f11->sens_query.has_palm_det) { in rmi_f11_initialize()
1240 rc = f11_write_control_regs(fn, &f11->sens_query, in rmi_f11_initialize()
1241 &f11->dev_controls, fn->fd.control_base_addr); in rmi_f11_initialize()
1245 mutex_init(&f11->dev_controls_mutex); in rmi_f11_initialize()
1247 dev_set_drvdata(&fn->dev, f11); in rmi_f11_initialize()
1254 struct f11_data *f11 = dev_get_drvdata(&fn->dev); in rmi_f11_config() local
1256 struct rmi_2d_sensor *sensor = &f11->sensor; in rmi_f11_config()
1260 drv->clear_irq_bits(fn->rmi_dev, f11->abs_mask); in rmi_f11_config()
1262 drv->set_irq_bits(fn->rmi_dev, f11->abs_mask); in rmi_f11_config()
1265 drv->clear_irq_bits(fn->rmi_dev, f11->rel_mask); in rmi_f11_config()
1267 drv->set_irq_bits(fn->rmi_dev, f11->rel_mask); in rmi_f11_config()
1269 rc = f11_write_control_regs(fn, &f11->sens_query, in rmi_f11_config()
1270 &f11->dev_controls, fn->fd.query_base_addr); in rmi_f11_config()
1282 struct f11_data *f11 = dev_get_drvdata(&fn->dev); in rmi_f11_attention() local
1285 int valid_bytes = f11->sensor.pkt_size; in rmi_f11_attention()
1292 if (f11->sensor.attn_size > drvdata->attn_data.size) in rmi_f11_attention()
1295 valid_bytes = f11->sensor.attn_size; in rmi_f11_attention()
1296 memcpy(f11->sensor.data_pkt, drvdata->attn_data.data, in rmi_f11_attention()
1302 data_base_addr, f11->sensor.data_pkt, in rmi_f11_attention()
1303 f11->sensor.pkt_size); in rmi_f11_attention()
1308 rmi_f11_finger_handler(f11, &f11->sensor, valid_bytes); in rmi_f11_attention()
1315 struct f11_data *f11 = dev_get_drvdata(&fn->dev); in rmi_f11_resume() local
1319 if (!f11->rezero_wait_ms) in rmi_f11_resume()
1322 mdelay(f11->rezero_wait_ms); in rmi_f11_resume()
1339 struct f11_data *f11; in rmi_f11_probe() local
1345 f11 = dev_get_drvdata(&fn->dev); in rmi_f11_probe()
1346 error = rmi_2d_sensor_configure_input(fn, &f11->sensor); in rmi_f11_probe()