Lines Matching refs:idx
213 static void ad714x_button_state_machine(struct ad714x_chip *ad714x, int idx) in ad714x_button_state_machine() argument
215 struct ad714x_button_plat *hw = &ad714x->hw->button[idx]; in ad714x_button_state_machine()
216 struct ad714x_button_drv *sw = &ad714x->sw->button[idx]; in ad714x_button_state_machine()
222 dev_dbg(ad714x->dev, "button %d touched\n", idx); in ad714x_button_state_machine()
232 dev_dbg(ad714x->dev, "button %d released\n", idx); in ad714x_button_state_machine()
248 static void ad714x_slider_cal_sensor_val(struct ad714x_chip *ad714x, int idx) in ad714x_slider_cal_sensor_val() argument
250 struct ad714x_slider_plat *hw = &ad714x->hw->slider[idx]; in ad714x_slider_cal_sensor_val()
266 static void ad714x_slider_cal_highest_stage(struct ad714x_chip *ad714x, int idx) in ad714x_slider_cal_highest_stage() argument
268 struct ad714x_slider_plat *hw = &ad714x->hw->slider[idx]; in ad714x_slider_cal_highest_stage()
269 struct ad714x_slider_drv *sw = &ad714x->sw->slider[idx]; in ad714x_slider_cal_highest_stage()
274 dev_dbg(ad714x->dev, "slider %d highest_stage:%d\n", idx, in ad714x_slider_cal_highest_stage()
291 static void ad714x_slider_cal_abs_pos(struct ad714x_chip *ad714x, int idx) in ad714x_slider_cal_abs_pos() argument
293 struct ad714x_slider_plat *hw = &ad714x->hw->slider[idx]; in ad714x_slider_cal_abs_pos()
294 struct ad714x_slider_drv *sw = &ad714x->sw->slider[idx]; in ad714x_slider_cal_abs_pos()
299 dev_dbg(ad714x->dev, "slider %d absolute position:%d\n", idx, in ad714x_slider_cal_abs_pos()
313 static void ad714x_slider_cal_flt_pos(struct ad714x_chip *ad714x, int idx) in ad714x_slider_cal_flt_pos() argument
315 struct ad714x_slider_drv *sw = &ad714x->sw->slider[idx]; in ad714x_slider_cal_flt_pos()
320 dev_dbg(ad714x->dev, "slider %d filter position:%d\n", idx, in ad714x_slider_cal_flt_pos()
324 static void ad714x_slider_use_com_int(struct ad714x_chip *ad714x, int idx) in ad714x_slider_use_com_int() argument
326 struct ad714x_slider_plat *hw = &ad714x->hw->slider[idx]; in ad714x_slider_use_com_int()
331 static void ad714x_slider_use_thr_int(struct ad714x_chip *ad714x, int idx) in ad714x_slider_use_thr_int() argument
333 struct ad714x_slider_plat *hw = &ad714x->hw->slider[idx]; in ad714x_slider_use_thr_int()
338 static void ad714x_slider_state_machine(struct ad714x_chip *ad714x, int idx) in ad714x_slider_state_machine() argument
340 struct ad714x_slider_plat *hw = &ad714x->hw->slider[idx]; in ad714x_slider_state_machine()
341 struct ad714x_slider_drv *sw = &ad714x->sw->slider[idx]; in ad714x_slider_state_machine()
357 ad714x_slider_use_com_int(ad714x, idx); in ad714x_slider_state_machine()
358 dev_dbg(ad714x->dev, "slider %d touched\n", idx); in ad714x_slider_state_machine()
364 ad714x_slider_cal_sensor_val(ad714x, idx); in ad714x_slider_state_machine()
365 ad714x_slider_cal_highest_stage(ad714x, idx); in ad714x_slider_state_machine()
366 ad714x_slider_cal_abs_pos(ad714x, idx); in ad714x_slider_state_machine()
375 ad714x_slider_cal_sensor_val(ad714x, idx); in ad714x_slider_state_machine()
376 ad714x_slider_cal_highest_stage(ad714x, idx); in ad714x_slider_state_machine()
377 ad714x_slider_cal_abs_pos(ad714x, idx); in ad714x_slider_state_machine()
378 ad714x_slider_cal_flt_pos(ad714x, idx); in ad714x_slider_state_machine()
385 ad714x_slider_use_thr_int(ad714x, idx); in ad714x_slider_state_machine()
389 idx); in ad714x_slider_state_machine()
407 static void ad714x_wheel_cal_highest_stage(struct ad714x_chip *ad714x, int idx) in ad714x_wheel_cal_highest_stage() argument
409 struct ad714x_wheel_plat *hw = &ad714x->hw->wheel[idx]; in ad714x_wheel_cal_highest_stage()
410 struct ad714x_wheel_drv *sw = &ad714x->sw->wheel[idx]; in ad714x_wheel_cal_highest_stage()
416 dev_dbg(ad714x->dev, "wheel %d highest_stage:%d\n", idx, in ad714x_wheel_cal_highest_stage()
420 static void ad714x_wheel_cal_sensor_val(struct ad714x_chip *ad714x, int idx) in ad714x_wheel_cal_sensor_val() argument
422 struct ad714x_wheel_plat *hw = &ad714x->hw->wheel[idx]; in ad714x_wheel_cal_sensor_val()
449 static void ad714x_wheel_cal_abs_pos(struct ad714x_chip *ad714x, int idx) in ad714x_wheel_cal_abs_pos() argument
451 struct ad714x_wheel_plat *hw = &ad714x->hw->wheel[idx]; in ad714x_wheel_cal_abs_pos()
452 struct ad714x_wheel_drv *sw = &ad714x->sw->wheel[idx]; in ad714x_wheel_cal_abs_pos()
480 static void ad714x_wheel_cal_flt_pos(struct ad714x_chip *ad714x, int idx) in ad714x_wheel_cal_flt_pos() argument
482 struct ad714x_wheel_plat *hw = &ad714x->hw->wheel[idx]; in ad714x_wheel_cal_flt_pos()
483 struct ad714x_wheel_drv *sw = &ad714x->sw->wheel[idx]; in ad714x_wheel_cal_flt_pos()
496 static void ad714x_wheel_use_com_int(struct ad714x_chip *ad714x, int idx) in ad714x_wheel_use_com_int() argument
498 struct ad714x_wheel_plat *hw = &ad714x->hw->wheel[idx]; in ad714x_wheel_use_com_int()
503 static void ad714x_wheel_use_thr_int(struct ad714x_chip *ad714x, int idx) in ad714x_wheel_use_thr_int() argument
505 struct ad714x_wheel_plat *hw = &ad714x->hw->wheel[idx]; in ad714x_wheel_use_thr_int()
510 static void ad714x_wheel_state_machine(struct ad714x_chip *ad714x, int idx) in ad714x_wheel_state_machine() argument
512 struct ad714x_wheel_plat *hw = &ad714x->hw->wheel[idx]; in ad714x_wheel_state_machine()
513 struct ad714x_wheel_drv *sw = &ad714x->sw->wheel[idx]; in ad714x_wheel_state_machine()
529 ad714x_wheel_use_com_int(ad714x, idx); in ad714x_wheel_state_machine()
530 dev_dbg(ad714x->dev, "wheel %d touched\n", idx); in ad714x_wheel_state_machine()
536 ad714x_wheel_cal_sensor_val(ad714x, idx); in ad714x_wheel_state_machine()
537 ad714x_wheel_cal_highest_stage(ad714x, idx); in ad714x_wheel_state_machine()
538 ad714x_wheel_cal_abs_pos(ad714x, idx); in ad714x_wheel_state_machine()
547 ad714x_wheel_cal_sensor_val(ad714x, idx); in ad714x_wheel_state_machine()
548 ad714x_wheel_cal_highest_stage(ad714x, idx); in ad714x_wheel_state_machine()
549 ad714x_wheel_cal_abs_pos(ad714x, idx); in ad714x_wheel_state_machine()
550 ad714x_wheel_cal_flt_pos(ad714x, idx); in ad714x_wheel_state_machine()
558 ad714x_wheel_use_thr_int(ad714x, idx); in ad714x_wheel_state_machine()
563 idx); in ad714x_wheel_state_machine()
574 static void touchpad_cal_sensor_val(struct ad714x_chip *ad714x, int idx) in touchpad_cal_sensor_val() argument
576 struct ad714x_touchpad_plat *hw = &ad714x->hw->touchpad[idx]; in touchpad_cal_sensor_val()
594 static void touchpad_cal_highest_stage(struct ad714x_chip *ad714x, int idx) in touchpad_cal_highest_stage() argument
596 struct ad714x_touchpad_plat *hw = &ad714x->hw->touchpad[idx]; in touchpad_cal_highest_stage()
597 struct ad714x_touchpad_drv *sw = &ad714x->sw->touchpad[idx]; in touchpad_cal_highest_stage()
606 idx, sw->x_highest_stage, sw->y_highest_stage); in touchpad_cal_highest_stage()
615 static int touchpad_check_second_peak(struct ad714x_chip *ad714x, int idx) in touchpad_check_second_peak() argument
617 struct ad714x_touchpad_plat *hw = &ad714x->hw->touchpad[idx]; in touchpad_check_second_peak()
618 struct ad714x_touchpad_drv *sw = &ad714x->sw->touchpad[idx]; in touchpad_check_second_peak()
654 static void touchpad_cal_abs_pos(struct ad714x_chip *ad714x, int idx) in touchpad_cal_abs_pos() argument
656 struct ad714x_touchpad_plat *hw = &ad714x->hw->touchpad[idx]; in touchpad_cal_abs_pos()
657 struct ad714x_touchpad_drv *sw = &ad714x->sw->touchpad[idx]; in touchpad_cal_abs_pos()
664 dev_dbg(ad714x->dev, "touchpad %d absolute position:(%d, %d)\n", idx, in touchpad_cal_abs_pos()
668 static void touchpad_cal_flt_pos(struct ad714x_chip *ad714x, int idx) in touchpad_cal_flt_pos() argument
670 struct ad714x_touchpad_drv *sw = &ad714x->sw->touchpad[idx]; in touchpad_cal_flt_pos()
678 idx, sw->x_flt_pos, sw->y_flt_pos); in touchpad_cal_flt_pos()
699 static int touchpad_check_endpoint(struct ad714x_chip *ad714x, int idx) in touchpad_check_endpoint() argument
701 struct ad714x_touchpad_plat *hw = &ad714x->hw->touchpad[idx]; in touchpad_check_endpoint()
702 struct ad714x_touchpad_drv *sw = &ad714x->sw->touchpad[idx]; in touchpad_check_endpoint()
776 static void touchpad_use_com_int(struct ad714x_chip *ad714x, int idx) in touchpad_use_com_int() argument
778 struct ad714x_touchpad_plat *hw = &ad714x->hw->touchpad[idx]; in touchpad_use_com_int()
783 static void touchpad_use_thr_int(struct ad714x_chip *ad714x, int idx) in touchpad_use_thr_int() argument
785 struct ad714x_touchpad_plat *hw = &ad714x->hw->touchpad[idx]; in touchpad_use_thr_int()
791 static void ad714x_touchpad_state_machine(struct ad714x_chip *ad714x, int idx) in ad714x_touchpad_state_machine() argument
793 struct ad714x_touchpad_plat *hw = &ad714x->hw->touchpad[idx]; in ad714x_touchpad_state_machine()
794 struct ad714x_touchpad_drv *sw = &ad714x->sw->touchpad[idx]; in ad714x_touchpad_state_machine()
813 touchpad_use_com_int(ad714x, idx); in ad714x_touchpad_state_machine()
814 dev_dbg(ad714x->dev, "touchpad %d touched\n", idx); in ad714x_touchpad_state_machine()
820 touchpad_cal_sensor_val(ad714x, idx); in ad714x_touchpad_state_machine()
821 touchpad_cal_highest_stage(ad714x, idx); in ad714x_touchpad_state_machine()
822 if ((!touchpad_check_second_peak(ad714x, idx)) && in ad714x_touchpad_state_machine()
823 (!touchpad_check_endpoint(ad714x, idx))) { in ad714x_touchpad_state_machine()
826 idx); in ad714x_touchpad_state_machine()
827 touchpad_cal_abs_pos(ad714x, idx); in ad714x_touchpad_state_machine()
838 touchpad_cal_sensor_val(ad714x, idx); in ad714x_touchpad_state_machine()
839 touchpad_cal_highest_stage(ad714x, idx); in ad714x_touchpad_state_machine()
840 if ((!touchpad_check_second_peak(ad714x, idx)) in ad714x_touchpad_state_machine()
841 && (!touchpad_check_endpoint(ad714x, idx))) { in ad714x_touchpad_state_machine()
842 touchpad_cal_abs_pos(ad714x, idx); in ad714x_touchpad_state_machine()
843 touchpad_cal_flt_pos(ad714x, idx); in ad714x_touchpad_state_machine()
855 touchpad_use_thr_int(ad714x, idx); in ad714x_touchpad_state_machine()
859 idx); in ad714x_touchpad_state_machine()