Lines Matching refs:vf50_ts
85 static void vf50_ts_enable_touch_detection(struct vf50_touch_device *vf50_ts) in vf50_ts_enable_touch_detection() argument
88 gpiod_set_value(vf50_ts->gpio_ym, 1); in vf50_ts_enable_touch_detection()
94 pinctrl_pm_select_idle_state(&vf50_ts->pdev->dev); in vf50_ts_enable_touch_detection()
105 struct vf50_touch_device *vf50_ts = private; in vf50_ts_irq_bh() local
106 struct device *dev = &vf50_ts->pdev->dev; in vf50_ts_irq_bh()
111 gpiod_set_value(vf50_ts->gpio_ym, 0); in vf50_ts_irq_bh()
116 while (!vf50_ts->stop_touchscreen) { in vf50_ts_irq_bh()
118 val_x = adc_ts_measure(&vf50_ts->channels[0], in vf50_ts_irq_bh()
119 vf50_ts->gpio_xp, vf50_ts->gpio_xm); in vf50_ts_irq_bh()
124 val_y = adc_ts_measure(&vf50_ts->channels[1], in vf50_ts_irq_bh()
125 vf50_ts->gpio_yp, vf50_ts->gpio_ym); in vf50_ts_irq_bh()
133 val_z1 = adc_ts_measure(&vf50_ts->channels[2], in vf50_ts_irq_bh()
134 vf50_ts->gpio_yp, vf50_ts->gpio_xm); in vf50_ts_irq_bh()
137 val_z2 = adc_ts_measure(&vf50_ts->channels[3], in vf50_ts_irq_bh()
138 vf50_ts->gpio_yp, vf50_ts->gpio_xm); in vf50_ts_irq_bh()
165 if (val_p < vf50_ts->min_pressure || val_p > 2000) in vf50_ts_irq_bh()
181 input_report_abs(vf50_ts->ts_input, in vf50_ts_irq_bh()
183 input_report_abs(vf50_ts->ts_input, in vf50_ts_irq_bh()
185 input_report_abs(vf50_ts->ts_input, in vf50_ts_irq_bh()
187 input_report_key(vf50_ts->ts_input, BTN_TOUCH, 1); in vf50_ts_irq_bh()
188 input_sync(vf50_ts->ts_input); in vf50_ts_irq_bh()
196 input_report_abs(vf50_ts->ts_input, ABS_PRESSURE, 0); in vf50_ts_irq_bh()
197 input_report_key(vf50_ts->ts_input, BTN_TOUCH, 0); in vf50_ts_irq_bh()
198 input_sync(vf50_ts->ts_input); in vf50_ts_irq_bh()
200 vf50_ts_enable_touch_detection(vf50_ts); in vf50_ts_irq_bh()