Lines Matching defs:input
24 #include <linux/input.h>
189 static int psxpad_spi_poll_open(struct input_dev *input)
191 struct psxpad *pad = input_get_drvdata(input);
198 static void psxpad_spi_poll_close(struct input_dev *input)
200 struct psxpad *pad = input_get_drvdata(input);
205 static void psxpad_spi_poll(struct input_dev *input)
207 struct psxpad *pad = input_get_drvdata(input);
229 input_report_abs(input, ABS_X, REVERSE_BIT(pad->response[7]));
230 input_report_abs(input, ABS_Y, REVERSE_BIT(pad->response[8]));
231 input_report_abs(input, ABS_RX, REVERSE_BIT(pad->response[5]));
232 input_report_abs(input, ABS_RY, REVERSE_BIT(pad->response[6]));
233 input_report_key(input, BTN_DPAD_UP, b_rsp3 & BIT(3));
234 input_report_key(input, BTN_DPAD_DOWN, b_rsp3 & BIT(1));
235 input_report_key(input, BTN_DPAD_LEFT, b_rsp3 & BIT(0));
236 input_report_key(input, BTN_DPAD_RIGHT, b_rsp3 & BIT(2));
237 input_report_key(input, BTN_X, b_rsp4 & BIT(3));
238 input_report_key(input, BTN_A, b_rsp4 & BIT(2));
239 input_report_key(input, BTN_B, b_rsp4 & BIT(1));
240 input_report_key(input, BTN_Y, b_rsp4 & BIT(0));
241 input_report_key(input, BTN_TL, b_rsp4 & BIT(5));
242 input_report_key(input, BTN_TR, b_rsp4 & BIT(4));
243 input_report_key(input, BTN_TL2, b_rsp4 & BIT(7));
244 input_report_key(input, BTN_TR2, b_rsp4 & BIT(6));
245 input_report_key(input, BTN_THUMBL, b_rsp3 & BIT(6));
246 input_report_key(input, BTN_THUMBR, b_rsp3 & BIT(5));
247 input_report_key(input, BTN_SELECT, b_rsp3 & BIT(7));
248 input_report_key(input, BTN_START, b_rsp3 & BIT(4));
256 input_report_abs(input, ABS_X, 0x80);
257 input_report_abs(input, ABS_Y, 0x80);
258 input_report_abs(input, ABS_RX, 0x80);
259 input_report_abs(input, ABS_RY, 0x80);
260 input_report_key(input, BTN_DPAD_UP, b_rsp3 & BIT(3));
261 input_report_key(input, BTN_DPAD_DOWN, b_rsp3 & BIT(1));
262 input_report_key(input, BTN_DPAD_LEFT, b_rsp3 & BIT(0));
263 input_report_key(input, BTN_DPAD_RIGHT, b_rsp3 & BIT(2));
264 input_report_key(input, BTN_X, b_rsp4 & BIT(3));
265 input_report_key(input, BTN_A, b_rsp4 & BIT(2));
266 input_report_key(input, BTN_B, b_rsp4 & BIT(1));
267 input_report_key(input, BTN_Y, b_rsp4 & BIT(0));
268 input_report_key(input, BTN_TL, b_rsp4 & BIT(5));
269 input_report_key(input, BTN_TR, b_rsp4 & BIT(4));
270 input_report_key(input, BTN_TL2, b_rsp4 & BIT(7));
271 input_report_key(input, BTN_TR2, b_rsp4 & BIT(6));
272 input_report_key(input, BTN_THUMBL, false);
273 input_report_key(input, BTN_THUMBR, false);
274 input_report_key(input, BTN_SELECT, b_rsp3 & BIT(7));
275 input_report_key(input, BTN_START, b_rsp3 & BIT(4));
279 input_sync(input);
294 dev_err(&spi->dev, "failed to allocate input device\n");
298 /* input poll device settings */
302 /* input device settings */
306 snprintf(pad->phys, sizeof(pad->phys), "%s/input", dev_name(&spi->dev));
361 /* register input poll device */
365 "failed to register input device: %d\n", err);