hid-magicmouse.c 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571
  1. /*
  2. * Apple "Magic" Wireless Mouse driver
  3. *
  4. * Copyright (c) 2010 Michael Poole <mdpoole@troilus.org>
  5. * Copyright (c) 2010 Chase Douglas <chase.douglas@canonical.com>
  6. */
  7. /*
  8. * This program is free software; you can redistribute it and/or modify it
  9. * under the terms of the GNU General Public License as published by the Free
  10. * Software Foundation; either version 2 of the License, or (at your option)
  11. * any later version.
  12. */
  13. #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
  14. #include <linux/device.h>
  15. #include <linux/hid.h>
  16. #include <linux/module.h>
  17. #include <linux/slab.h>
  18. #include <linux/usb.h>
  19. #include "hid-ids.h"
  20. static bool emulate_3button = true;
  21. module_param(emulate_3button, bool, 0644);
  22. MODULE_PARM_DESC(emulate_3button, "Emulate a middle button");
  23. static int middle_button_start = -350;
  24. static int middle_button_stop = +350;
  25. static bool emulate_scroll_wheel = true;
  26. module_param(emulate_scroll_wheel, bool, 0644);
  27. MODULE_PARM_DESC(emulate_scroll_wheel, "Emulate a scroll wheel");
  28. static unsigned int scroll_speed = 32;
  29. static int param_set_scroll_speed(const char *val, struct kernel_param *kp) {
  30. unsigned long speed;
  31. if (!val || strict_strtoul(val, 0, &speed) || speed > 63)
  32. return -EINVAL;
  33. scroll_speed = speed;
  34. return 0;
  35. }
  36. module_param_call(scroll_speed, param_set_scroll_speed, param_get_uint, &scroll_speed, 0644);
  37. MODULE_PARM_DESC(scroll_speed, "Scroll speed, value from 0 (slow) to 63 (fast)");
  38. static bool scroll_acceleration = false;
  39. module_param(scroll_acceleration, bool, 0644);
  40. MODULE_PARM_DESC(scroll_acceleration, "Accelerate sequential scroll events");
  41. static bool report_touches = true;
  42. module_param(report_touches, bool, 0644);
  43. MODULE_PARM_DESC(report_touches, "Emit touch records (otherwise, only use them for emulation)");
  44. static bool report_undeciphered;
  45. module_param(report_undeciphered, bool, 0644);
  46. MODULE_PARM_DESC(report_undeciphered, "Report undeciphered multi-touch state field using a MSC_RAW event");
  47. #define TRACKPAD_REPORT_ID 0x28
  48. #define MOUSE_REPORT_ID 0x29
  49. #define DOUBLE_REPORT_ID 0xf7
  50. /* These definitions are not precise, but they're close enough. (Bits
  51. * 0x03 seem to indicate the aspect ratio of the touch, bits 0x70 seem
  52. * to be some kind of bit mask -- 0x20 may be a near-field reading,
  53. * and 0x40 is actual contact, and 0x10 may be a start/stop or change
  54. * indication.)
  55. */
  56. #define TOUCH_STATE_MASK 0xf0
  57. #define TOUCH_STATE_NONE 0x00
  58. #define TOUCH_STATE_START 0x30
  59. #define TOUCH_STATE_DRAG 0x40
  60. #define SCROLL_ACCEL_DEFAULT 7
  61. /* Single touch emulation should only begin when no touches are currently down.
  62. * This is true when single_touch_id is equal to NO_TOUCHES. If multiple touches
  63. * are down and the touch providing for single touch emulation is lifted,
  64. * single_touch_id is equal to SINGLE_TOUCH_UP. While single touch emulation is
  65. * occurring, single_touch_id corresponds with the tracking id of the touch used.
  66. */
  67. #define NO_TOUCHES -1
  68. #define SINGLE_TOUCH_UP -2
  69. /**
  70. * struct magicmouse_sc - Tracks Magic Mouse-specific data.
  71. * @input: Input device through which we report events.
  72. * @quirks: Currently unused.
  73. * @ntouches: Number of touches in most recent touch report.
  74. * @scroll_accel: Number of consecutive scroll motions.
  75. * @scroll_jiffies: Time of last scroll motion.
  76. * @touches: Most recent data for a touch, indexed by tracking ID.
  77. * @tracking_ids: Mapping of current touch input data to @touches.
  78. */
  79. struct magicmouse_sc {
  80. struct input_dev *input;
  81. unsigned long quirks;
  82. int ntouches;
  83. int scroll_accel;
  84. unsigned long scroll_jiffies;
  85. struct {
  86. short x;
  87. short y;
  88. short scroll_x;
  89. short scroll_y;
  90. u8 size;
  91. } touches[16];
  92. int tracking_ids[16];
  93. int single_touch_id;
  94. };
  95. static int magicmouse_firm_touch(struct magicmouse_sc *msc)
  96. {
  97. int touch = -1;
  98. int ii;
  99. /* If there is only one "firm" touch, set touch to its
  100. * tracking ID.
  101. */
  102. for (ii = 0; ii < msc->ntouches; ii++) {
  103. int idx = msc->tracking_ids[ii];
  104. if (msc->touches[idx].size < 8) {
  105. /* Ignore this touch. */
  106. } else if (touch >= 0) {
  107. touch = -1;
  108. break;
  109. } else {
  110. touch = idx;
  111. }
  112. }
  113. return touch;
  114. }
  115. static void magicmouse_emit_buttons(struct magicmouse_sc *msc, int state)
  116. {
  117. int last_state = test_bit(BTN_LEFT, msc->input->key) << 0 |
  118. test_bit(BTN_RIGHT, msc->input->key) << 1 |
  119. test_bit(BTN_MIDDLE, msc->input->key) << 2;
  120. if (emulate_3button) {
  121. int id;
  122. /* If some button was pressed before, keep it held
  123. * down. Otherwise, if there's exactly one firm
  124. * touch, use that to override the mouse's guess.
  125. */
  126. if (state == 0) {
  127. /* The button was released. */
  128. } else if (last_state != 0) {
  129. state = last_state;
  130. } else if ((id = magicmouse_firm_touch(msc)) >= 0) {
  131. int x = msc->touches[id].x;
  132. if (x < middle_button_start)
  133. state = 1;
  134. else if (x > middle_button_stop)
  135. state = 2;
  136. else
  137. state = 4;
  138. } /* else: we keep the mouse's guess */
  139. input_report_key(msc->input, BTN_MIDDLE, state & 4);
  140. }
  141. input_report_key(msc->input, BTN_LEFT, state & 1);
  142. input_report_key(msc->input, BTN_RIGHT, state & 2);
  143. if (state != last_state)
  144. msc->scroll_accel = SCROLL_ACCEL_DEFAULT;
  145. }
  146. static void magicmouse_emit_touch(struct magicmouse_sc *msc, int raw_id, u8 *tdata)
  147. {
  148. struct input_dev *input = msc->input;
  149. int id, x, y, size, orientation, touch_major, touch_minor, state, down;
  150. if (input->id.product == USB_DEVICE_ID_APPLE_MAGICMOUSE) {
  151. id = (tdata[6] << 2 | tdata[5] >> 6) & 0xf;
  152. x = (tdata[1] << 28 | tdata[0] << 20) >> 20;
  153. y = -((tdata[2] << 24 | tdata[1] << 16) >> 20);
  154. size = tdata[5] & 0x3f;
  155. orientation = (tdata[6] >> 2) - 32;
  156. touch_major = tdata[3];
  157. touch_minor = tdata[4];
  158. state = tdata[7] & TOUCH_STATE_MASK;
  159. down = state != TOUCH_STATE_NONE;
  160. } else { /* USB_DEVICE_ID_APPLE_MAGICTRACKPAD */
  161. id = (tdata[7] << 2 | tdata[6] >> 6) & 0xf;
  162. x = (tdata[1] << 27 | tdata[0] << 19) >> 19;
  163. y = -((tdata[3] << 30 | tdata[2] << 22 | tdata[1] << 14) >> 19);
  164. size = tdata[6] & 0x3f;
  165. orientation = (tdata[7] >> 2) - 32;
  166. touch_major = tdata[4];
  167. touch_minor = tdata[5];
  168. state = tdata[8] & TOUCH_STATE_MASK;
  169. down = state != TOUCH_STATE_NONE;
  170. }
  171. /* Store tracking ID and other fields. */
  172. msc->tracking_ids[raw_id] = id;
  173. msc->touches[id].x = x;
  174. msc->touches[id].y = y;
  175. msc->touches[id].size = size;
  176. /* If requested, emulate a scroll wheel by detecting small
  177. * vertical touch motions.
  178. */
  179. if (emulate_scroll_wheel) {
  180. unsigned long now = jiffies;
  181. int step_x = msc->touches[id].scroll_x - x;
  182. int step_y = msc->touches[id].scroll_y - y;
  183. /* Calculate and apply the scroll motion. */
  184. switch (state) {
  185. case TOUCH_STATE_START:
  186. msc->touches[id].scroll_x = x;
  187. msc->touches[id].scroll_y = y;
  188. /* Reset acceleration after half a second. */
  189. if (scroll_acceleration && time_before(now,
  190. msc->scroll_jiffies + HZ / 2))
  191. msc->scroll_accel = max_t(int,
  192. msc->scroll_accel - 1, 1);
  193. else
  194. msc->scroll_accel = SCROLL_ACCEL_DEFAULT;
  195. break;
  196. case TOUCH_STATE_DRAG:
  197. step_x /= (64 - (int)scroll_speed) * msc->scroll_accel;
  198. if (step_x != 0) {
  199. msc->touches[id].scroll_x -= step_x *
  200. (64 - scroll_speed) * msc->scroll_accel;
  201. msc->scroll_jiffies = now;
  202. input_report_rel(input, REL_HWHEEL, -step_x);
  203. }
  204. step_y /= (64 - (int)scroll_speed) * msc->scroll_accel;
  205. if (step_y != 0) {
  206. msc->touches[id].scroll_y -= step_y *
  207. (64 - scroll_speed) * msc->scroll_accel;
  208. msc->scroll_jiffies = now;
  209. input_report_rel(input, REL_WHEEL, step_y);
  210. }
  211. break;
  212. }
  213. }
  214. if (down) {
  215. msc->ntouches++;
  216. if (msc->single_touch_id == NO_TOUCHES)
  217. msc->single_touch_id = id;
  218. } else if (msc->single_touch_id == id)
  219. msc->single_touch_id = SINGLE_TOUCH_UP;
  220. /* Generate the input events for this touch. */
  221. if (report_touches && down) {
  222. input_report_abs(input, ABS_MT_TRACKING_ID, id);
  223. input_report_abs(input, ABS_MT_TOUCH_MAJOR, touch_major << 2);
  224. input_report_abs(input, ABS_MT_TOUCH_MINOR, touch_minor << 2);
  225. input_report_abs(input, ABS_MT_ORIENTATION, -orientation);
  226. input_report_abs(input, ABS_MT_POSITION_X, x);
  227. input_report_abs(input, ABS_MT_POSITION_Y, y);
  228. if (report_undeciphered) {
  229. if (input->id.product == USB_DEVICE_ID_APPLE_MAGICMOUSE)
  230. input_event(input, EV_MSC, MSC_RAW, tdata[7]);
  231. else /* USB_DEVICE_ID_APPLE_MAGICTRACKPAD */
  232. input_event(input, EV_MSC, MSC_RAW, tdata[8]);
  233. }
  234. input_mt_sync(input);
  235. }
  236. }
  237. static int magicmouse_raw_event(struct hid_device *hdev,
  238. struct hid_report *report, u8 *data, int size)
  239. {
  240. struct magicmouse_sc *msc = hid_get_drvdata(hdev);
  241. struct input_dev *input = msc->input;
  242. int x = 0, y = 0, ii, clicks = 0, npoints;
  243. switch (data[0]) {
  244. case TRACKPAD_REPORT_ID:
  245. /* Expect four bytes of prefix, and N*9 bytes of touch data. */
  246. if (size < 4 || ((size - 4) % 9) != 0)
  247. return 0;
  248. npoints = (size - 4) / 9;
  249. msc->ntouches = 0;
  250. for (ii = 0; ii < npoints; ii++)
  251. magicmouse_emit_touch(msc, ii, data + ii * 9 + 4);
  252. /* We don't need an MT sync here because trackpad emits a
  253. * BTN_TOUCH event in a new frame when all touches are released.
  254. */
  255. if (msc->ntouches == 0)
  256. msc->single_touch_id = NO_TOUCHES;
  257. clicks = data[1];
  258. /* The following bits provide a device specific timestamp. They
  259. * are unused here.
  260. *
  261. * ts = data[1] >> 6 | data[2] << 2 | data[3] << 10;
  262. */
  263. break;
  264. case MOUSE_REPORT_ID:
  265. /* Expect six bytes of prefix, and N*8 bytes of touch data. */
  266. if (size < 6 || ((size - 6) % 8) != 0)
  267. return 0;
  268. npoints = (size - 6) / 8;
  269. msc->ntouches = 0;
  270. for (ii = 0; ii < npoints; ii++)
  271. magicmouse_emit_touch(msc, ii, data + ii * 8 + 6);
  272. if (report_touches && msc->ntouches == 0)
  273. input_mt_sync(input);
  274. /* When emulating three-button mode, it is important
  275. * to have the current touch information before
  276. * generating a click event.
  277. */
  278. x = (int)(((data[3] & 0x0c) << 28) | (data[1] << 22)) >> 22;
  279. y = (int)(((data[3] & 0x30) << 26) | (data[2] << 22)) >> 22;
  280. clicks = data[3];
  281. /* The following bits provide a device specific timestamp. They
  282. * are unused here.
  283. *
  284. * ts = data[3] >> 6 | data[4] << 2 | data[5] << 10;
  285. */
  286. break;
  287. case DOUBLE_REPORT_ID:
  288. /* Sometimes the trackpad sends two touch reports in one
  289. * packet.
  290. */
  291. magicmouse_raw_event(hdev, report, data + 2, data[1]);
  292. magicmouse_raw_event(hdev, report, data + 2 + data[1],
  293. size - 2 - data[1]);
  294. break;
  295. default:
  296. return 0;
  297. }
  298. if (input->id.product == USB_DEVICE_ID_APPLE_MAGICMOUSE) {
  299. magicmouse_emit_buttons(msc, clicks & 3);
  300. input_report_rel(input, REL_X, x);
  301. input_report_rel(input, REL_Y, y);
  302. } else { /* USB_DEVICE_ID_APPLE_MAGICTRACKPAD */
  303. input_report_key(input, BTN_MOUSE, clicks & 1);
  304. input_report_key(input, BTN_TOUCH, msc->ntouches > 0);
  305. input_report_key(input, BTN_TOOL_FINGER, msc->ntouches == 1);
  306. input_report_key(input, BTN_TOOL_DOUBLETAP, msc->ntouches == 2);
  307. input_report_key(input, BTN_TOOL_TRIPLETAP, msc->ntouches == 3);
  308. input_report_key(input, BTN_TOOL_QUADTAP, msc->ntouches == 4);
  309. if (msc->single_touch_id >= 0) {
  310. input_report_abs(input, ABS_X,
  311. msc->touches[msc->single_touch_id].x);
  312. input_report_abs(input, ABS_Y,
  313. msc->touches[msc->single_touch_id].y);
  314. }
  315. }
  316. input_sync(input);
  317. return 1;
  318. }
  319. static int magicmouse_setup_input(struct hid_device *hdev, struct hid_input *hi)
  320. {
  321. struct input_dev *input = hi->input;
  322. __set_bit(EV_KEY, input->evbit);
  323. if (input->id.product == USB_DEVICE_ID_APPLE_MAGICMOUSE) {
  324. __set_bit(BTN_LEFT, input->keybit);
  325. __set_bit(BTN_RIGHT, input->keybit);
  326. if (emulate_3button)
  327. __set_bit(BTN_MIDDLE, input->keybit);
  328. __set_bit(EV_REL, input->evbit);
  329. __set_bit(REL_X, input->relbit);
  330. __set_bit(REL_Y, input->relbit);
  331. if (emulate_scroll_wheel) {
  332. __set_bit(REL_WHEEL, input->relbit);
  333. __set_bit(REL_HWHEEL, input->relbit);
  334. }
  335. } else { /* USB_DEVICE_ID_APPLE_MAGICTRACKPAD */
  336. __set_bit(BTN_MOUSE, input->keybit);
  337. __set_bit(BTN_TOOL_FINGER, input->keybit);
  338. __set_bit(BTN_TOOL_DOUBLETAP, input->keybit);
  339. __set_bit(BTN_TOOL_TRIPLETAP, input->keybit);
  340. __set_bit(BTN_TOOL_QUADTAP, input->keybit);
  341. __set_bit(BTN_TOUCH, input->keybit);
  342. }
  343. if (report_touches) {
  344. __set_bit(EV_ABS, input->evbit);
  345. input_set_abs_params(input, ABS_MT_TRACKING_ID, 0, 15, 0, 0);
  346. input_set_abs_params(input, ABS_MT_TOUCH_MAJOR, 0, 255, 4, 0);
  347. input_set_abs_params(input, ABS_MT_TOUCH_MINOR, 0, 255, 4, 0);
  348. input_set_abs_params(input, ABS_MT_ORIENTATION, -31, 32, 1, 0);
  349. /* Note: Touch Y position from the device is inverted relative
  350. * to how pointer motion is reported (and relative to how USB
  351. * HID recommends the coordinates work). This driver keeps
  352. * the origin at the same position, and just uses the additive
  353. * inverse of the reported Y.
  354. */
  355. if (input->id.product == USB_DEVICE_ID_APPLE_MAGICMOUSE) {
  356. input_set_abs_params(input, ABS_MT_POSITION_X, -1100,
  357. 1358, 4, 0);
  358. input_set_abs_params(input, ABS_MT_POSITION_Y, -1589,
  359. 2047, 4, 0);
  360. } else { /* USB_DEVICE_ID_APPLE_MAGICTRACKPAD */
  361. input_set_abs_params(input, ABS_X, -2909, 3167, 4, 0);
  362. input_set_abs_params(input, ABS_Y, -2456, 2565, 4, 0);
  363. input_set_abs_params(input, ABS_MT_POSITION_X, -2909,
  364. 3167, 4, 0);
  365. input_set_abs_params(input, ABS_MT_POSITION_Y, -2456,
  366. 2565, 4, 0);
  367. }
  368. input_set_events_per_packet(input, 60);
  369. }
  370. if (report_undeciphered) {
  371. __set_bit(EV_MSC, input->evbit);
  372. __set_bit(MSC_RAW, input->mscbit);
  373. }
  374. return 0;
  375. }
  376. static int magicmouse_input_mapping(struct hid_device *hdev,
  377. struct hid_input *hi, struct hid_field *field,
  378. struct hid_usage *usage, unsigned long **bit, int *max)
  379. {
  380. struct magicmouse_sc *msc = hid_get_drvdata(hdev);
  381. if (!msc->input)
  382. msc->input = hi->input;
  383. /* Magic Trackpad does not give relative data after switching to MT */
  384. if (hi->input->id.product == USB_DEVICE_ID_APPLE_MAGICTRACKPAD &&
  385. field->flags & HID_MAIN_ITEM_RELATIVE)
  386. return -1;
  387. return 0;
  388. }
  389. static int magicmouse_probe(struct hid_device *hdev,
  390. const struct hid_device_id *id)
  391. {
  392. __u8 feature[] = { 0xd7, 0x01 };
  393. struct magicmouse_sc *msc;
  394. struct hid_report *report;
  395. int ret;
  396. msc = kzalloc(sizeof(*msc), GFP_KERNEL);
  397. if (msc == NULL) {
  398. hid_err(hdev, "can't alloc magicmouse descriptor\n");
  399. return -ENOMEM;
  400. }
  401. msc->scroll_accel = SCROLL_ACCEL_DEFAULT;
  402. msc->quirks = id->driver_data;
  403. hid_set_drvdata(hdev, msc);
  404. msc->single_touch_id = NO_TOUCHES;
  405. ret = hid_parse(hdev);
  406. if (ret) {
  407. hid_err(hdev, "magicmouse hid parse failed\n");
  408. goto err_free;
  409. }
  410. ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT);
  411. if (ret) {
  412. hid_err(hdev, "magicmouse hw start failed\n");
  413. goto err_free;
  414. }
  415. if (id->product == USB_DEVICE_ID_APPLE_MAGICMOUSE)
  416. report = hid_register_report(hdev, HID_INPUT_REPORT,
  417. MOUSE_REPORT_ID);
  418. else { /* USB_DEVICE_ID_APPLE_MAGICTRACKPAD */
  419. report = hid_register_report(hdev, HID_INPUT_REPORT,
  420. TRACKPAD_REPORT_ID);
  421. report = hid_register_report(hdev, HID_INPUT_REPORT,
  422. DOUBLE_REPORT_ID);
  423. }
  424. if (!report) {
  425. hid_err(hdev, "unable to register touch report\n");
  426. ret = -ENOMEM;
  427. goto err_stop_hw;
  428. }
  429. report->size = 6;
  430. /*
  431. * Some devices repond with 'invalid report id' when feature
  432. * report switching it into multitouch mode is sent to it.
  433. *
  434. * This results in -EIO from the _raw low-level transport callback,
  435. * but there seems to be no other way of switching the mode.
  436. * Thus the super-ugly hacky success check below.
  437. */
  438. ret = hdev->hid_output_raw_report(hdev, feature, sizeof(feature),
  439. HID_FEATURE_REPORT);
  440. if (ret != -EIO && ret != sizeof(feature)) {
  441. hid_err(hdev, "unable to request touch data (%d)\n", ret);
  442. goto err_stop_hw;
  443. }
  444. return 0;
  445. err_stop_hw:
  446. hid_hw_stop(hdev);
  447. err_free:
  448. kfree(msc);
  449. return ret;
  450. }
  451. static void magicmouse_remove(struct hid_device *hdev)
  452. {
  453. struct magicmouse_sc *msc = hid_get_drvdata(hdev);
  454. hid_hw_stop(hdev);
  455. kfree(msc);
  456. }
  457. static const struct hid_device_id magic_mice[] = {
  458. { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE,
  459. USB_DEVICE_ID_APPLE_MAGICMOUSE), .driver_data = 0 },
  460. { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE,
  461. USB_DEVICE_ID_APPLE_MAGICTRACKPAD), .driver_data = 0 },
  462. { }
  463. };
  464. MODULE_DEVICE_TABLE(hid, magic_mice);
  465. static struct hid_driver magicmouse_driver = {
  466. .name = "magicmouse",
  467. .id_table = magic_mice,
  468. .probe = magicmouse_probe,
  469. .remove = magicmouse_remove,
  470. .raw_event = magicmouse_raw_event,
  471. .input_mapping = magicmouse_input_mapping,
  472. .input_register = magicmouse_setup_input,
  473. };
  474. static int __init magicmouse_init(void)
  475. {
  476. int ret;
  477. ret = hid_register_driver(&magicmouse_driver);
  478. if (ret)
  479. pr_err("can't register magicmouse driver\n");
  480. return ret;
  481. }
  482. static void __exit magicmouse_exit(void)
  483. {
  484. hid_unregister_driver(&magicmouse_driver);
  485. }
  486. module_init(magicmouse_init);
  487. module_exit(magicmouse_exit);
  488. MODULE_LICENSE("GPL");