Lines Matching refs:input
19 * This interface sends raw event input reports in a custom format, but only
38 #include <linux/input.h>
83 struct input_dev *input;
85 input = devm_input_allocate_device(&data->hdev->dev);
86 if (!input)
89 input->id.bustype = data->hdev->bus;
90 input->id.vendor = data->hdev->vendor;
91 input->id.product = data->hdev->product;
92 input->id.version = data->hdev->bus;
93 input->phys = data->hdev->phys;
94 input->uniq = data->hdev->uniq;
95 input->open = letsketch_open;
96 input->close = letsketch_close;
98 input_set_drvdata(input, data);
100 return input;
105 struct input_dev *input;
107 input = letsketch_alloc_input_dev(data);
108 if (!input)
111 input_set_abs_params(input, ABS_X, 0, 50800, 0, 0);
112 input_set_abs_params(input, ABS_Y, 0, 31750, 0, 0);
113 input_set_abs_params(input, ABS_PRESSURE, 0, 8192, 0, 0);
114 input_abs_set_res(input, ABS_X, 240);
115 input_abs_set_res(input, ABS_Y, 225);
116 input_set_capability(input, EV_KEY, BTN_TOUCH);
117 input_set_capability(input, EV_KEY, BTN_TOOL_PEN);
118 input_set_capability(input, EV_KEY, BTN_STYLUS);
119 input_set_capability(input, EV_KEY, BTN_STYLUS2);
122 input->name = "WP9620 Tablet";
124 data->input_tablet = input;
131 struct input_dev *input;
134 input = letsketch_alloc_input_dev(data);
135 if (!input)
139 input_set_capability(input, EV_KEY, BTN_0 + i);
145 input_set_abs_params(input, ABS_X, 0, 1, 0, 0);
146 input_set_abs_params(input, ABS_Y, 0, 1, 0, 0);
147 input_set_capability(input, EV_KEY, BTN_STYLUS);
149 input->name = "WP9620 Pad";
151 data->input_tablet_pad = input;
159 struct input_dev *input = data->input_tablet;
161 input_report_key(input, BTN_TOOL_PEN, 0);
162 input_sync(input);
170 struct input_dev *input;
178 input = data->input_tablet;
179 input_report_key(input, BTN_TOOL_PEN, 1);
180 input_report_key(input, BTN_TOUCH, raw_data[1] & 0x01);
181 input_report_key(input, BTN_STYLUS, raw_data[1] & 0x02);
182 input_report_key(input, BTN_STYLUS2, raw_data[1] & 0x04);
183 input_report_abs(input, ABS_X,
185 input_report_abs(input, ABS_Y,
187 input_report_abs(input, ABS_PRESSURE,
196 input = data->input_tablet_pad;
198 input_report_key(input, BTN_0 + i, raw_data[4] == (i + 1));
206 input_sync(input);