udraw 104 drivers/hid/hid-udraw-ps3.c struct udraw *udraw = hid_get_drvdata(hdev); udraw 121 drivers/hid/hid-udraw-ps3.c input_report_key(udraw->joy_input_dev, BTN_WEST, data[0] & 1); udraw 122 drivers/hid/hid-udraw-ps3.c input_report_key(udraw->joy_input_dev, BTN_SOUTH, !!(data[0] & 2)); udraw 123 drivers/hid/hid-udraw-ps3.c input_report_key(udraw->joy_input_dev, BTN_EAST, !!(data[0] & 4)); udraw 124 drivers/hid/hid-udraw-ps3.c input_report_key(udraw->joy_input_dev, BTN_NORTH, !!(data[0] & 8)); udraw 126 drivers/hid/hid-udraw-ps3.c input_report_key(udraw->joy_input_dev, BTN_SELECT, !!(data[1] & 1)); udraw 127 drivers/hid/hid-udraw-ps3.c input_report_key(udraw->joy_input_dev, BTN_START, !!(data[1] & 2)); udraw 128 drivers/hid/hid-udraw-ps3.c input_report_key(udraw->joy_input_dev, BTN_MODE, !!(data[1] & 16)); udraw 164 drivers/hid/hid-udraw-ps3.c input_report_abs(udraw->joy_input_dev, ABS_X, x); udraw 165 drivers/hid/hid-udraw-ps3.c input_report_abs(udraw->joy_input_dev, ABS_Y, y); udraw 167 drivers/hid/hid-udraw-ps3.c input_sync(udraw->joy_input_dev); udraw 180 drivers/hid/hid-udraw-ps3.c udraw->last_one_finger_x = x; udraw 181 drivers/hid/hid-udraw-ps3.c udraw->last_one_finger_y = y; udraw 182 drivers/hid/hid-udraw-ps3.c udraw->last_two_finger_x = -1; udraw 183 drivers/hid/hid-udraw-ps3.c udraw->last_two_finger_y = -1; udraw 193 drivers/hid/hid-udraw-ps3.c if (udraw->last_two_finger_x == -1) { udraw 195 drivers/hid/hid-udraw-ps3.c udraw->last_two_finger_x = x; udraw 196 drivers/hid/hid-udraw-ps3.c udraw->last_two_finger_y = y; udraw 198 drivers/hid/hid-udraw-ps3.c x = udraw->last_one_finger_x; udraw 199 drivers/hid/hid-udraw-ps3.c y = udraw->last_one_finger_y; udraw 205 drivers/hid/hid-udraw-ps3.c x = x - (udraw->last_two_finger_x udraw 206 drivers/hid/hid-udraw-ps3.c - udraw->last_one_finger_x); udraw 207 drivers/hid/hid-udraw-ps3.c y = y - (udraw->last_two_finger_y udraw 208 drivers/hid/hid-udraw-ps3.c - udraw->last_one_finger_y); udraw 214 drivers/hid/hid-udraw-ps3.c input_report_key(udraw->touch_input_dev, BTN_TOUCH, 1); udraw 215 drivers/hid/hid-udraw-ps3.c input_report_key(udraw->touch_input_dev, BTN_TOOL_FINGER, udraw 217 drivers/hid/hid-udraw-ps3.c input_report_key(udraw->touch_input_dev, BTN_TOOL_DOUBLETAP, udraw 220 drivers/hid/hid-udraw-ps3.c input_report_abs(udraw->touch_input_dev, ABS_X, x); udraw 221 drivers/hid/hid-udraw-ps3.c input_report_abs(udraw->touch_input_dev, ABS_Y, y); udraw 223 drivers/hid/hid-udraw-ps3.c input_report_key(udraw->touch_input_dev, BTN_TOUCH, 0); udraw 224 drivers/hid/hid-udraw-ps3.c input_report_key(udraw->touch_input_dev, BTN_TOOL_FINGER, 0); udraw 225 drivers/hid/hid-udraw-ps3.c input_report_key(udraw->touch_input_dev, BTN_TOOL_DOUBLETAP, 0); udraw 227 drivers/hid/hid-udraw-ps3.c input_sync(udraw->touch_input_dev); udraw 236 drivers/hid/hid-udraw-ps3.c input_report_key(udraw->pen_input_dev, BTN_TOUCH, (level != 0)); udraw 237 drivers/hid/hid-udraw-ps3.c input_report_key(udraw->pen_input_dev, BTN_TOOL_PEN, 1); udraw 238 drivers/hid/hid-udraw-ps3.c input_report_abs(udraw->pen_input_dev, ABS_PRESSURE, level); udraw 239 drivers/hid/hid-udraw-ps3.c input_report_abs(udraw->pen_input_dev, ABS_X, x); udraw 240 drivers/hid/hid-udraw-ps3.c input_report_abs(udraw->pen_input_dev, ABS_Y, y); udraw 242 drivers/hid/hid-udraw-ps3.c input_report_key(udraw->pen_input_dev, BTN_TOUCH, 0); udraw 243 drivers/hid/hid-udraw-ps3.c input_report_key(udraw->pen_input_dev, BTN_TOOL_PEN, 0); udraw 244 drivers/hid/hid-udraw-ps3.c input_report_abs(udraw->pen_input_dev, ABS_PRESSURE, 0); udraw 246 drivers/hid/hid-udraw-ps3.c input_sync(udraw->pen_input_dev); udraw 255 drivers/hid/hid-udraw-ps3.c input_report_abs(udraw->accel_input_dev, ABS_X, x); udraw 256 drivers/hid/hid-udraw-ps3.c input_report_abs(udraw->accel_input_dev, ABS_Y, y); udraw 257 drivers/hid/hid-udraw-ps3.c input_report_abs(udraw->accel_input_dev, ABS_Z, z); udraw 258 drivers/hid/hid-udraw-ps3.c input_sync(udraw->accel_input_dev); udraw 266 drivers/hid/hid-udraw-ps3.c struct udraw *udraw = input_get_drvdata(dev); udraw 268 drivers/hid/hid-udraw-ps3.c return hid_hw_open(udraw->hdev); udraw 273 drivers/hid/hid-udraw-ps3.c struct udraw *udraw = input_get_drvdata(dev); udraw 275 drivers/hid/hid-udraw-ps3.c hid_hw_close(udraw->hdev); udraw 302 drivers/hid/hid-udraw-ps3.c static bool udraw_setup_touch(struct udraw *udraw, udraw 324 drivers/hid/hid-udraw-ps3.c udraw->touch_input_dev = input_dev; udraw 329 drivers/hid/hid-udraw-ps3.c static bool udraw_setup_pen(struct udraw *udraw, udraw 352 drivers/hid/hid-udraw-ps3.c udraw->pen_input_dev = input_dev; udraw 357 drivers/hid/hid-udraw-ps3.c static bool udraw_setup_accel(struct udraw *udraw, udraw 375 drivers/hid/hid-udraw-ps3.c udraw->accel_input_dev = input_dev; udraw 380 drivers/hid/hid-udraw-ps3.c static bool udraw_setup_joypad(struct udraw *udraw, udraw 402 drivers/hid/hid-udraw-ps3.c udraw->joy_input_dev = input_dev; udraw 409 drivers/hid/hid-udraw-ps3.c struct udraw *udraw; udraw 412 drivers/hid/hid-udraw-ps3.c udraw = devm_kzalloc(&hdev->dev, sizeof(struct udraw), GFP_KERNEL); udraw 413 drivers/hid/hid-udraw-ps3.c if (!udraw) udraw 416 drivers/hid/hid-udraw-ps3.c udraw->hdev = hdev; udraw 417 drivers/hid/hid-udraw-ps3.c udraw->last_two_finger_x = -1; udraw 418 drivers/hid/hid-udraw-ps3.c udraw->last_two_finger_y = -1; udraw 420 drivers/hid/hid-udraw-ps3.c hid_set_drvdata(hdev, udraw); udraw 428 drivers/hid/hid-udraw-ps3.c if (!udraw_setup_joypad(udraw, hdev) || udraw 429 drivers/hid/hid-udraw-ps3.c !udraw_setup_touch(udraw, hdev) || udraw 430 drivers/hid/hid-udraw-ps3.c !udraw_setup_pen(udraw, hdev) || udraw 431 drivers/hid/hid-udraw-ps3.c !udraw_setup_accel(udraw, hdev)) { udraw 436 drivers/hid/hid-udraw-ps3.c ret = input_register_device(udraw->joy_input_dev) || udraw 437 drivers/hid/hid-udraw-ps3.c input_register_device(udraw->touch_input_dev) || udraw 438 drivers/hid/hid-udraw-ps3.c input_register_device(udraw->pen_input_dev) || udraw 439 drivers/hid/hid-udraw-ps3.c input_register_device(udraw->accel_input_dev);