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