Lines Matching refs:ts
29 struct touchscreen_data *ts = data; in micro_ts_receive() local
32 input_report_abs(ts->input, ABS_X, in micro_ts_receive()
34 input_report_abs(ts->input, ABS_Y, in micro_ts_receive()
36 input_report_key(ts->input, BTN_TOUCH, 1); in micro_ts_receive()
37 input_sync(ts->input); in micro_ts_receive()
39 input_report_abs(ts->input, ABS_X, 0); in micro_ts_receive()
40 input_report_abs(ts->input, ABS_Y, 0); in micro_ts_receive()
41 input_report_key(ts->input, BTN_TOUCH, 0); in micro_ts_receive()
42 input_sync(ts->input); in micro_ts_receive()
46 static void micro_ts_toggle_receive(struct touchscreen_data *ts, bool enable) in micro_ts_toggle_receive() argument
48 struct ipaq_micro *micro = ts->micro; in micro_ts_toggle_receive()
53 micro->ts = micro_ts_receive; in micro_ts_toggle_receive()
54 micro->ts_data = ts; in micro_ts_toggle_receive()
56 micro->ts = NULL; in micro_ts_toggle_receive()
60 spin_unlock_irq(&ts->micro->lock); in micro_ts_toggle_receive()
65 struct touchscreen_data *ts = input_get_drvdata(input); in micro_ts_open() local
67 micro_ts_toggle_receive(ts, true); in micro_ts_open()
74 struct touchscreen_data *ts = input_get_drvdata(input); in micro_ts_close() local
76 micro_ts_toggle_receive(ts, false); in micro_ts_close()
82 struct touchscreen_data *ts; in micro_ts_probe() local
85 ts = devm_kzalloc(&pdev->dev, sizeof(*ts), GFP_KERNEL); in micro_ts_probe()
86 if (!ts) in micro_ts_probe()
89 ts->micro = micro; in micro_ts_probe()
91 ts->input = devm_input_allocate_device(&pdev->dev); in micro_ts_probe()
92 if (!ts->input) { in micro_ts_probe()
97 ts->input->name = "ipaq micro ts"; in micro_ts_probe()
98 ts->input->open = micro_ts_open; in micro_ts_probe()
99 ts->input->close = micro_ts_close; in micro_ts_probe()
101 input_set_drvdata(ts->input, ts); in micro_ts_probe()
103 input_set_capability(ts->input, EV_KEY, BTN_TOUCH); in micro_ts_probe()
104 input_set_capability(ts->input, EV_ABS, ABS_X); in micro_ts_probe()
105 input_set_capability(ts->input, EV_ABS, ABS_Y); in micro_ts_probe()
106 input_set_abs_params(ts->input, ABS_X, 0, 1023, 0, 0); in micro_ts_probe()
107 input_set_abs_params(ts->input, ABS_Y, 0, 1023, 0, 0); in micro_ts_probe()
109 error = input_register_device(ts->input); in micro_ts_probe()
115 platform_set_drvdata(pdev, ts); in micro_ts_probe()
124 struct touchscreen_data *ts = dev_get_drvdata(dev); in micro_ts_suspend() local
126 micro_ts_toggle_receive(ts, false); in micro_ts_suspend()
133 struct touchscreen_data *ts = dev_get_drvdata(dev); in micro_ts_resume() local
134 struct input_dev *input = ts->input; in micro_ts_resume()
139 micro_ts_toggle_receive(ts, true); in micro_ts_resume()