Lines Matching refs:idx

214 static void ad714x_button_state_machine(struct ad714x_chip *ad714x, int idx)  in ad714x_button_state_machine()  argument
216 struct ad714x_button_plat *hw = &ad714x->hw->button[idx]; in ad714x_button_state_machine()
217 struct ad714x_button_drv *sw = &ad714x->sw->button[idx]; in ad714x_button_state_machine()
223 dev_dbg(ad714x->dev, "button %d touched\n", idx); in ad714x_button_state_machine()
233 dev_dbg(ad714x->dev, "button %d released\n", idx); in ad714x_button_state_machine()
249 static void ad714x_slider_cal_sensor_val(struct ad714x_chip *ad714x, int idx) in ad714x_slider_cal_sensor_val() argument
251 struct ad714x_slider_plat *hw = &ad714x->hw->slider[idx]; in ad714x_slider_cal_sensor_val()
267 static void ad714x_slider_cal_highest_stage(struct ad714x_chip *ad714x, int idx) in ad714x_slider_cal_highest_stage() argument
269 struct ad714x_slider_plat *hw = &ad714x->hw->slider[idx]; in ad714x_slider_cal_highest_stage()
270 struct ad714x_slider_drv *sw = &ad714x->sw->slider[idx]; in ad714x_slider_cal_highest_stage()
275 dev_dbg(ad714x->dev, "slider %d highest_stage:%d\n", idx, in ad714x_slider_cal_highest_stage()
292 static void ad714x_slider_cal_abs_pos(struct ad714x_chip *ad714x, int idx) in ad714x_slider_cal_abs_pos() argument
294 struct ad714x_slider_plat *hw = &ad714x->hw->slider[idx]; in ad714x_slider_cal_abs_pos()
295 struct ad714x_slider_drv *sw = &ad714x->sw->slider[idx]; in ad714x_slider_cal_abs_pos()
300 dev_dbg(ad714x->dev, "slider %d absolute position:%d\n", idx, in ad714x_slider_cal_abs_pos()
314 static void ad714x_slider_cal_flt_pos(struct ad714x_chip *ad714x, int idx) in ad714x_slider_cal_flt_pos() argument
316 struct ad714x_slider_drv *sw = &ad714x->sw->slider[idx]; in ad714x_slider_cal_flt_pos()
321 dev_dbg(ad714x->dev, "slider %d filter position:%d\n", idx, in ad714x_slider_cal_flt_pos()
325 static void ad714x_slider_use_com_int(struct ad714x_chip *ad714x, int idx) in ad714x_slider_use_com_int() argument
327 struct ad714x_slider_plat *hw = &ad714x->hw->slider[idx]; in ad714x_slider_use_com_int()
332 static void ad714x_slider_use_thr_int(struct ad714x_chip *ad714x, int idx) in ad714x_slider_use_thr_int() argument
334 struct ad714x_slider_plat *hw = &ad714x->hw->slider[idx]; in ad714x_slider_use_thr_int()
339 static void ad714x_slider_state_machine(struct ad714x_chip *ad714x, int idx) in ad714x_slider_state_machine() argument
341 struct ad714x_slider_plat *hw = &ad714x->hw->slider[idx]; in ad714x_slider_state_machine()
342 struct ad714x_slider_drv *sw = &ad714x->sw->slider[idx]; in ad714x_slider_state_machine()
358 ad714x_slider_use_com_int(ad714x, idx); in ad714x_slider_state_machine()
359 dev_dbg(ad714x->dev, "slider %d touched\n", idx); in ad714x_slider_state_machine()
365 ad714x_slider_cal_sensor_val(ad714x, idx); in ad714x_slider_state_machine()
366 ad714x_slider_cal_highest_stage(ad714x, idx); in ad714x_slider_state_machine()
367 ad714x_slider_cal_abs_pos(ad714x, idx); in ad714x_slider_state_machine()
376 ad714x_slider_cal_sensor_val(ad714x, idx); in ad714x_slider_state_machine()
377 ad714x_slider_cal_highest_stage(ad714x, idx); in ad714x_slider_state_machine()
378 ad714x_slider_cal_abs_pos(ad714x, idx); in ad714x_slider_state_machine()
379 ad714x_slider_cal_flt_pos(ad714x, idx); in ad714x_slider_state_machine()
386 ad714x_slider_use_thr_int(ad714x, idx); in ad714x_slider_state_machine()
390 idx); in ad714x_slider_state_machine()
408 static void ad714x_wheel_cal_highest_stage(struct ad714x_chip *ad714x, int idx) in ad714x_wheel_cal_highest_stage() argument
410 struct ad714x_wheel_plat *hw = &ad714x->hw->wheel[idx]; in ad714x_wheel_cal_highest_stage()
411 struct ad714x_wheel_drv *sw = &ad714x->sw->wheel[idx]; in ad714x_wheel_cal_highest_stage()
417 dev_dbg(ad714x->dev, "wheel %d highest_stage:%d\n", idx, in ad714x_wheel_cal_highest_stage()
421 static void ad714x_wheel_cal_sensor_val(struct ad714x_chip *ad714x, int idx) in ad714x_wheel_cal_sensor_val() argument
423 struct ad714x_wheel_plat *hw = &ad714x->hw->wheel[idx]; in ad714x_wheel_cal_sensor_val()
450 static void ad714x_wheel_cal_abs_pos(struct ad714x_chip *ad714x, int idx) in ad714x_wheel_cal_abs_pos() argument
452 struct ad714x_wheel_plat *hw = &ad714x->hw->wheel[idx]; in ad714x_wheel_cal_abs_pos()
453 struct ad714x_wheel_drv *sw = &ad714x->sw->wheel[idx]; in ad714x_wheel_cal_abs_pos()
481 static void ad714x_wheel_cal_flt_pos(struct ad714x_chip *ad714x, int idx) in ad714x_wheel_cal_flt_pos() argument
483 struct ad714x_wheel_plat *hw = &ad714x->hw->wheel[idx]; in ad714x_wheel_cal_flt_pos()
484 struct ad714x_wheel_drv *sw = &ad714x->sw->wheel[idx]; in ad714x_wheel_cal_flt_pos()
497 static void ad714x_wheel_use_com_int(struct ad714x_chip *ad714x, int idx) in ad714x_wheel_use_com_int() argument
499 struct ad714x_wheel_plat *hw = &ad714x->hw->wheel[idx]; in ad714x_wheel_use_com_int()
504 static void ad714x_wheel_use_thr_int(struct ad714x_chip *ad714x, int idx) in ad714x_wheel_use_thr_int() argument
506 struct ad714x_wheel_plat *hw = &ad714x->hw->wheel[idx]; in ad714x_wheel_use_thr_int()
511 static void ad714x_wheel_state_machine(struct ad714x_chip *ad714x, int idx) in ad714x_wheel_state_machine() argument
513 struct ad714x_wheel_plat *hw = &ad714x->hw->wheel[idx]; in ad714x_wheel_state_machine()
514 struct ad714x_wheel_drv *sw = &ad714x->sw->wheel[idx]; in ad714x_wheel_state_machine()
530 ad714x_wheel_use_com_int(ad714x, idx); in ad714x_wheel_state_machine()
531 dev_dbg(ad714x->dev, "wheel %d touched\n", idx); in ad714x_wheel_state_machine()
537 ad714x_wheel_cal_sensor_val(ad714x, idx); in ad714x_wheel_state_machine()
538 ad714x_wheel_cal_highest_stage(ad714x, idx); in ad714x_wheel_state_machine()
539 ad714x_wheel_cal_abs_pos(ad714x, idx); in ad714x_wheel_state_machine()
548 ad714x_wheel_cal_sensor_val(ad714x, idx); in ad714x_wheel_state_machine()
549 ad714x_wheel_cal_highest_stage(ad714x, idx); in ad714x_wheel_state_machine()
550 ad714x_wheel_cal_abs_pos(ad714x, idx); in ad714x_wheel_state_machine()
551 ad714x_wheel_cal_flt_pos(ad714x, idx); in ad714x_wheel_state_machine()
559 ad714x_wheel_use_thr_int(ad714x, idx); in ad714x_wheel_state_machine()
564 idx); in ad714x_wheel_state_machine()
575 static void touchpad_cal_sensor_val(struct ad714x_chip *ad714x, int idx) in touchpad_cal_sensor_val() argument
577 struct ad714x_touchpad_plat *hw = &ad714x->hw->touchpad[idx]; in touchpad_cal_sensor_val()
595 static void touchpad_cal_highest_stage(struct ad714x_chip *ad714x, int idx) in touchpad_cal_highest_stage() argument
597 struct ad714x_touchpad_plat *hw = &ad714x->hw->touchpad[idx]; in touchpad_cal_highest_stage()
598 struct ad714x_touchpad_drv *sw = &ad714x->sw->touchpad[idx]; in touchpad_cal_highest_stage()
607 idx, sw->x_highest_stage, sw->y_highest_stage); in touchpad_cal_highest_stage()
616 static int touchpad_check_second_peak(struct ad714x_chip *ad714x, int idx) in touchpad_check_second_peak() argument
618 struct ad714x_touchpad_plat *hw = &ad714x->hw->touchpad[idx]; in touchpad_check_second_peak()
619 struct ad714x_touchpad_drv *sw = &ad714x->sw->touchpad[idx]; in touchpad_check_second_peak()
655 static void touchpad_cal_abs_pos(struct ad714x_chip *ad714x, int idx) in touchpad_cal_abs_pos() argument
657 struct ad714x_touchpad_plat *hw = &ad714x->hw->touchpad[idx]; in touchpad_cal_abs_pos()
658 struct ad714x_touchpad_drv *sw = &ad714x->sw->touchpad[idx]; in touchpad_cal_abs_pos()
665 dev_dbg(ad714x->dev, "touchpad %d absolute position:(%d, %d)\n", idx, in touchpad_cal_abs_pos()
669 static void touchpad_cal_flt_pos(struct ad714x_chip *ad714x, int idx) in touchpad_cal_flt_pos() argument
671 struct ad714x_touchpad_drv *sw = &ad714x->sw->touchpad[idx]; in touchpad_cal_flt_pos()
679 idx, sw->x_flt_pos, sw->y_flt_pos); in touchpad_cal_flt_pos()
700 static int touchpad_check_endpoint(struct ad714x_chip *ad714x, int idx) in touchpad_check_endpoint() argument
702 struct ad714x_touchpad_plat *hw = &ad714x->hw->touchpad[idx]; in touchpad_check_endpoint()
703 struct ad714x_touchpad_drv *sw = &ad714x->sw->touchpad[idx]; in touchpad_check_endpoint()
777 static void touchpad_use_com_int(struct ad714x_chip *ad714x, int idx) in touchpad_use_com_int() argument
779 struct ad714x_touchpad_plat *hw = &ad714x->hw->touchpad[idx]; in touchpad_use_com_int()
784 static void touchpad_use_thr_int(struct ad714x_chip *ad714x, int idx) in touchpad_use_thr_int() argument
786 struct ad714x_touchpad_plat *hw = &ad714x->hw->touchpad[idx]; in touchpad_use_thr_int()
792 static void ad714x_touchpad_state_machine(struct ad714x_chip *ad714x, int idx) in ad714x_touchpad_state_machine() argument
794 struct ad714x_touchpad_plat *hw = &ad714x->hw->touchpad[idx]; in ad714x_touchpad_state_machine()
795 struct ad714x_touchpad_drv *sw = &ad714x->sw->touchpad[idx]; in ad714x_touchpad_state_machine()
814 touchpad_use_com_int(ad714x, idx); in ad714x_touchpad_state_machine()
815 dev_dbg(ad714x->dev, "touchpad %d touched\n", idx); in ad714x_touchpad_state_machine()
821 touchpad_cal_sensor_val(ad714x, idx); in ad714x_touchpad_state_machine()
822 touchpad_cal_highest_stage(ad714x, idx); in ad714x_touchpad_state_machine()
823 if ((!touchpad_check_second_peak(ad714x, idx)) && in ad714x_touchpad_state_machine()
824 (!touchpad_check_endpoint(ad714x, idx))) { in ad714x_touchpad_state_machine()
827 idx); in ad714x_touchpad_state_machine()
828 touchpad_cal_abs_pos(ad714x, idx); in ad714x_touchpad_state_machine()
839 touchpad_cal_sensor_val(ad714x, idx); in ad714x_touchpad_state_machine()
840 touchpad_cal_highest_stage(ad714x, idx); in ad714x_touchpad_state_machine()
841 if ((!touchpad_check_second_peak(ad714x, idx)) in ad714x_touchpad_state_machine()
842 && (!touchpad_check_endpoint(ad714x, idx))) { in ad714x_touchpad_state_machine()
843 touchpad_cal_abs_pos(ad714x, idx); in ad714x_touchpad_state_machine()
844 touchpad_cal_flt_pos(ad714x, idx); in ad714x_touchpad_state_machine()
856 touchpad_use_thr_int(ad714x, idx); in ad714x_touchpad_state_machine()
860 idx); in ad714x_touchpad_state_machine()