Lines Matching refs:f12
63 static int rmi_f12_read_sensor_tuning(struct f12_data *f12) in rmi_f12_read_sensor_tuning() argument
66 struct rmi_2d_sensor *sensor = &f12->sensor; in rmi_f12_read_sensor_tuning()
77 item = rmi_get_register_desc_item(&f12->control_reg_desc, 8); in rmi_f12_read_sensor_tuning()
84 offset = rmi_register_desc_calc_reg_offset(&f12->control_reg_desc, 8); in rmi_f12_read_sensor_tuning()
144 static void rmi_f12_process_objects(struct f12_data *f12, u8 *data1, int size) in rmi_f12_process_objects() argument
147 struct rmi_2d_sensor *sensor = &f12->sensor; in rmi_f12_process_objects()
148 int objects = f12->data1->num_subpackets; in rmi_f12_process_objects()
150 if ((f12->data1->num_subpackets * F12_DATA1_BYTES_PER_OBJ) > size) in rmi_f12_process_objects()
204 struct f12_data *f12 = dev_get_drvdata(&fn->dev); in rmi_f12_attention() local
205 struct rmi_2d_sensor *sensor = &f12->sensor; in rmi_f12_attention()
218 retval = rmi_read_block(rmi_dev, f12->data_addr, in rmi_f12_attention()
227 if (f12->data1) in rmi_f12_attention()
228 rmi_f12_process_objects(f12, in rmi_f12_attention()
229 &sensor->data_pkt[f12->data1_offset], valid_bytes); in rmi_f12_attention()
241 struct f12_data *f12 = dev_get_drvdata(&fn->dev); in rmi_f12_write_control_regs() local
247 if (f12->has_dribble in rmi_f12_write_control_regs()
248 && (f12->sensor.dribble != RMI_REG_STATE_DEFAULT)) { in rmi_f12_write_control_regs()
249 item = rmi_get_register_desc_item(&f12->control_reg_desc, 20); in rmi_f12_write_control_regs()
252 &f12->control_reg_desc, 20); in rmi_f12_write_control_regs()
270 switch (f12->sensor.dribble) { in rmi_f12_write_control_regs()
297 struct f12_data *f12 = dev_get_drvdata(&fn->dev); in rmi_f12_config() local
301 sensor = &f12->sensor; in rmi_f12_config()
304 drv->clear_irq_bits(fn->rmi_dev, f12->abs_mask); in rmi_f12_config()
306 drv->set_irq_bits(fn->rmi_dev, f12->abs_mask); in rmi_f12_config()
308 drv->clear_irq_bits(fn->rmi_dev, f12->rel_mask); in rmi_f12_config()
320 struct f12_data *f12; in rmi_f12_probe() local
350 f12 = devm_kzalloc(&fn->dev, sizeof(struct f12_data) + mask_size * 2, in rmi_f12_probe()
352 if (!f12) in rmi_f12_probe()
355 f12->abs_mask = (unsigned long *)((char *)f12 in rmi_f12_probe()
357 f12->rel_mask = (unsigned long *)((char *)f12 in rmi_f12_probe()
360 set_bit(fn->irq_pos, f12->abs_mask); in rmi_f12_probe()
361 set_bit(fn->irq_pos + 1, f12->rel_mask); in rmi_f12_probe()
363 f12->has_dribble = !!(buf & BIT(3)); in rmi_f12_probe()
366 ret = rmi_2d_sensor_of_probe(&fn->dev, &f12->sensor_pdata); in rmi_f12_probe()
370 f12->sensor_pdata = pdata->sensor_pdata; in rmi_f12_probe()
374 &f12->query_reg_desc); in rmi_f12_probe()
384 &f12->control_reg_desc); in rmi_f12_probe()
394 &f12->data_reg_desc); in rmi_f12_probe()
403 sensor = &f12->sensor; in rmi_f12_probe()
405 f12->data_addr = fn->fd.data_base_addr; in rmi_f12_probe()
406 sensor->pkt_size = rmi_register_desc_calc_size(&f12->data_reg_desc); in rmi_f12_probe()
409 f12->sensor_pdata.axis_align; in rmi_f12_probe()
411 sensor->x_mm = f12->sensor_pdata.x_mm; in rmi_f12_probe()
412 sensor->y_mm = f12->sensor_pdata.y_mm; in rmi_f12_probe()
413 sensor->dribble = f12->sensor_pdata.dribble; in rmi_f12_probe()
417 f12->sensor_pdata.sensor_type; in rmi_f12_probe()
425 dev_set_drvdata(&fn->dev, f12); in rmi_f12_probe()
427 ret = rmi_f12_read_sensor_tuning(f12); in rmi_f12_probe()
438 item = rmi_get_register_desc_item(&f12->data_reg_desc, 0); in rmi_f12_probe()
442 item = rmi_get_register_desc_item(&f12->data_reg_desc, 1); in rmi_f12_probe()
444 f12->data1 = item; in rmi_f12_probe()
445 f12->data1_offset = data_offset; in rmi_f12_probe()
452 item = rmi_get_register_desc_item(&f12->data_reg_desc, 2); in rmi_f12_probe()
456 item = rmi_get_register_desc_item(&f12->data_reg_desc, 3); in rmi_f12_probe()
460 item = rmi_get_register_desc_item(&f12->data_reg_desc, 4); in rmi_f12_probe()
464 item = rmi_get_register_desc_item(&f12->data_reg_desc, 5); in rmi_f12_probe()
466 f12->data5 = item; in rmi_f12_probe()
467 f12->data5_offset = data_offset; in rmi_f12_probe()
472 item = rmi_get_register_desc_item(&f12->data_reg_desc, 6); in rmi_f12_probe()
474 f12->data6 = item; in rmi_f12_probe()
475 f12->data6_offset = data_offset; in rmi_f12_probe()
479 item = rmi_get_register_desc_item(&f12->data_reg_desc, 7); in rmi_f12_probe()
483 item = rmi_get_register_desc_item(&f12->data_reg_desc, 8); in rmi_f12_probe()
487 item = rmi_get_register_desc_item(&f12->data_reg_desc, 9); in rmi_f12_probe()
489 f12->data9 = item; in rmi_f12_probe()
490 f12->data9_offset = data_offset; in rmi_f12_probe()
496 item = rmi_get_register_desc_item(&f12->data_reg_desc, 10); in rmi_f12_probe()
500 item = rmi_get_register_desc_item(&f12->data_reg_desc, 11); in rmi_f12_probe()
504 item = rmi_get_register_desc_item(&f12->data_reg_desc, 12); in rmi_f12_probe()
508 item = rmi_get_register_desc_item(&f12->data_reg_desc, 13); in rmi_f12_probe()
512 item = rmi_get_register_desc_item(&f12->data_reg_desc, 14); in rmi_f12_probe()
516 item = rmi_get_register_desc_item(&f12->data_reg_desc, 15); in rmi_f12_probe()
518 f12->data15 = item; in rmi_f12_probe()
519 f12->data15_offset = data_offset; in rmi_f12_probe()