hid-wacom.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623
  1. /*
  2. * Bluetooth Wacom Tablet support
  3. *
  4. * Copyright (c) 1999 Andreas Gal
  5. * Copyright (c) 2000-2005 Vojtech Pavlik <vojtech@suse.cz>
  6. * Copyright (c) 2005 Michael Haboustak <mike-@cinci.rr.com> for Concept2, Inc
  7. * Copyright (c) 2006-2007 Jiri Kosina
  8. * Copyright (c) 2007 Paul Walmsley
  9. * Copyright (c) 2008 Jiri Slaby <jirislaby@gmail.com>
  10. * Copyright (c) 2006 Andrew Zabolotny <zap@homelink.ru>
  11. * Copyright (c) 2009 Bastien Nocera <hadess@hadess.net>
  12. * Copyright (c) 2011 Przemysław Firszt <przemo@firszt.eu>
  13. */
  14. /*
  15. * This program is free software; you can redistribute it and/or modify it
  16. * under the terms of the GNU General Public License as published by the Free
  17. * Software Foundation; either version 2 of the License, or (at your option)
  18. * any later version.
  19. */
  20. #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
  21. #include <linux/device.h>
  22. #include <linux/hid.h>
  23. #include <linux/module.h>
  24. #include <linux/slab.h>
  25. #ifdef CONFIG_HID_WACOM_POWER_SUPPLY
  26. #include <linux/power_supply.h>
  27. #endif
  28. #include "hid-ids.h"
  29. struct wacom_data {
  30. __u16 tool;
  31. unsigned char butstate;
  32. __u8 features;
  33. unsigned char high_speed;
  34. #ifdef CONFIG_HID_WACOM_POWER_SUPPLY
  35. int battery_capacity;
  36. struct power_supply battery;
  37. struct power_supply ac;
  38. #endif
  39. };
  40. #ifdef CONFIG_HID_WACOM_POWER_SUPPLY
  41. /*percent of battery capacity, 0 means AC online*/
  42. static unsigned short batcap[8] = { 1, 15, 25, 35, 50, 70, 100, 0 };
  43. static enum power_supply_property wacom_battery_props[] = {
  44. POWER_SUPPLY_PROP_PRESENT,
  45. POWER_SUPPLY_PROP_CAPACITY,
  46. POWER_SUPPLY_PROP_SCOPE,
  47. };
  48. static enum power_supply_property wacom_ac_props[] = {
  49. POWER_SUPPLY_PROP_PRESENT,
  50. POWER_SUPPLY_PROP_ONLINE,
  51. POWER_SUPPLY_PROP_SCOPE,
  52. };
  53. static int wacom_battery_get_property(struct power_supply *psy,
  54. enum power_supply_property psp,
  55. union power_supply_propval *val)
  56. {
  57. struct wacom_data *wdata = container_of(psy,
  58. struct wacom_data, battery);
  59. int power_state = batcap[wdata->battery_capacity];
  60. int ret = 0;
  61. switch (psp) {
  62. case POWER_SUPPLY_PROP_PRESENT:
  63. val->intval = 1;
  64. break;
  65. case POWER_SUPPLY_PROP_SCOPE:
  66. val->intval = POWER_SUPPLY_SCOPE_DEVICE;
  67. break;
  68. case POWER_SUPPLY_PROP_CAPACITY:
  69. /* show 100% battery capacity when charging */
  70. if (power_state == 0)
  71. val->intval = 100;
  72. else
  73. val->intval = power_state;
  74. break;
  75. default:
  76. ret = -EINVAL;
  77. break;
  78. }
  79. return ret;
  80. }
  81. static int wacom_ac_get_property(struct power_supply *psy,
  82. enum power_supply_property psp,
  83. union power_supply_propval *val)
  84. {
  85. struct wacom_data *wdata = container_of(psy, struct wacom_data, ac);
  86. int power_state = batcap[wdata->battery_capacity];
  87. int ret = 0;
  88. switch (psp) {
  89. case POWER_SUPPLY_PROP_PRESENT:
  90. /* fall through */
  91. case POWER_SUPPLY_PROP_ONLINE:
  92. if (power_state == 0)
  93. val->intval = 1;
  94. else
  95. val->intval = 0;
  96. break;
  97. case POWER_SUPPLY_PROP_SCOPE:
  98. val->intval = POWER_SUPPLY_SCOPE_DEVICE;
  99. break;
  100. default:
  101. ret = -EINVAL;
  102. break;
  103. }
  104. return ret;
  105. }
  106. #endif
  107. static void wacom_set_features(struct hid_device *hdev)
  108. {
  109. int ret;
  110. __u8 rep_data[2];
  111. /*set high speed, tablet mode*/
  112. rep_data[0] = 0x03;
  113. rep_data[1] = 0x20;
  114. ret = hdev->hid_output_raw_report(hdev, rep_data, 2,
  115. HID_FEATURE_REPORT);
  116. return;
  117. }
  118. static void wacom_poke(struct hid_device *hdev, u8 speed)
  119. {
  120. struct wacom_data *wdata = hid_get_drvdata(hdev);
  121. int limit, ret;
  122. char rep_data[2];
  123. rep_data[0] = 0x03 ; rep_data[1] = 0x00;
  124. limit = 3;
  125. do {
  126. ret = hdev->hid_output_raw_report(hdev, rep_data, 2,
  127. HID_FEATURE_REPORT);
  128. } while (ret < 0 && limit-- > 0);
  129. if (ret >= 0) {
  130. if (speed == 0)
  131. rep_data[0] = 0x05;
  132. else
  133. rep_data[0] = 0x06;
  134. rep_data[1] = 0x00;
  135. limit = 3;
  136. do {
  137. ret = hdev->hid_output_raw_report(hdev, rep_data, 2,
  138. HID_FEATURE_REPORT);
  139. } while (ret < 0 && limit-- > 0);
  140. if (ret >= 0) {
  141. wdata->high_speed = speed;
  142. return;
  143. }
  144. }
  145. /*
  146. * Note that if the raw queries fail, it's not a hard failure and it
  147. * is safe to continue
  148. */
  149. hid_warn(hdev, "failed to poke device, command %d, err %d\n",
  150. rep_data[0], ret);
  151. return;
  152. }
  153. static ssize_t wacom_show_speed(struct device *dev,
  154. struct device_attribute
  155. *attr, char *buf)
  156. {
  157. struct wacom_data *wdata = dev_get_drvdata(dev);
  158. return snprintf(buf, PAGE_SIZE, "%i\n", wdata->high_speed);
  159. }
  160. static ssize_t wacom_store_speed(struct device *dev,
  161. struct device_attribute *attr,
  162. const char *buf, size_t count)
  163. {
  164. struct hid_device *hdev = container_of(dev, struct hid_device, dev);
  165. int new_speed;
  166. if (sscanf(buf, "%1d", &new_speed ) != 1)
  167. return -EINVAL;
  168. if (new_speed == 0 || new_speed == 1) {
  169. wacom_poke(hdev, new_speed);
  170. return strnlen(buf, PAGE_SIZE);
  171. } else
  172. return -EINVAL;
  173. }
  174. static DEVICE_ATTR(speed, S_IRUGO | S_IWUSR | S_IWGRP,
  175. wacom_show_speed, wacom_store_speed);
  176. static int wacom_gr_parse_report(struct hid_device *hdev,
  177. struct wacom_data *wdata,
  178. struct input_dev *input, unsigned char *data)
  179. {
  180. int tool, x, y, rw;
  181. tool = 0;
  182. /* Get X & Y positions */
  183. x = le16_to_cpu(*(__le16 *) &data[2]);
  184. y = le16_to_cpu(*(__le16 *) &data[4]);
  185. /* Get current tool identifier */
  186. if (data[1] & 0x90) { /* If pen is in the in/active area */
  187. switch ((data[1] >> 5) & 3) {
  188. case 0: /* Pen */
  189. tool = BTN_TOOL_PEN;
  190. break;
  191. case 1: /* Rubber */
  192. tool = BTN_TOOL_RUBBER;
  193. break;
  194. case 2: /* Mouse with wheel */
  195. case 3: /* Mouse without wheel */
  196. tool = BTN_TOOL_MOUSE;
  197. break;
  198. }
  199. /* Reset tool if out of active tablet area */
  200. if (!(data[1] & 0x10))
  201. tool = 0;
  202. }
  203. /* If tool changed, notify input subsystem */
  204. if (wdata->tool != tool) {
  205. if (wdata->tool) {
  206. /* Completely reset old tool state */
  207. if (wdata->tool == BTN_TOOL_MOUSE) {
  208. input_report_key(input, BTN_LEFT, 0);
  209. input_report_key(input, BTN_RIGHT, 0);
  210. input_report_key(input, BTN_MIDDLE, 0);
  211. input_report_abs(input, ABS_DISTANCE,
  212. input_abs_get_max(input, ABS_DISTANCE));
  213. } else {
  214. input_report_key(input, BTN_TOUCH, 0);
  215. input_report_key(input, BTN_STYLUS, 0);
  216. input_report_key(input, BTN_STYLUS2, 0);
  217. input_report_abs(input, ABS_PRESSURE, 0);
  218. }
  219. input_report_key(input, wdata->tool, 0);
  220. input_sync(input);
  221. }
  222. wdata->tool = tool;
  223. if (tool)
  224. input_report_key(input, tool, 1);
  225. }
  226. if (tool) {
  227. input_report_abs(input, ABS_X, x);
  228. input_report_abs(input, ABS_Y, y);
  229. switch ((data[1] >> 5) & 3) {
  230. case 2: /* Mouse with wheel */
  231. input_report_key(input, BTN_MIDDLE, data[1] & 0x04);
  232. rw = (data[6] & 0x01) ? -1 :
  233. (data[6] & 0x02) ? 1 : 0;
  234. input_report_rel(input, REL_WHEEL, rw);
  235. /* fall through */
  236. case 3: /* Mouse without wheel */
  237. input_report_key(input, BTN_LEFT, data[1] & 0x01);
  238. input_report_key(input, BTN_RIGHT, data[1] & 0x02);
  239. /* Compute distance between mouse and tablet */
  240. rw = 44 - (data[6] >> 2);
  241. if (rw < 0)
  242. rw = 0;
  243. else if (rw > 31)
  244. rw = 31;
  245. input_report_abs(input, ABS_DISTANCE, rw);
  246. break;
  247. default:
  248. input_report_abs(input, ABS_PRESSURE,
  249. data[6] | (((__u16) (data[1] & 0x08)) << 5));
  250. input_report_key(input, BTN_TOUCH, data[1] & 0x01);
  251. input_report_key(input, BTN_STYLUS, data[1] & 0x02);
  252. input_report_key(input, BTN_STYLUS2, (tool == BTN_TOOL_PEN) && data[1] & 0x04);
  253. break;
  254. }
  255. input_sync(input);
  256. }
  257. /* Report the state of the two buttons at the top of the tablet
  258. * as two extra fingerpad keys (buttons 4 & 5). */
  259. rw = data[7] & 0x03;
  260. if (rw != wdata->butstate) {
  261. wdata->butstate = rw;
  262. input_report_key(input, BTN_0, rw & 0x02);
  263. input_report_key(input, BTN_1, rw & 0x01);
  264. input_report_key(input, BTN_TOOL_FINGER, 0xf0);
  265. input_event(input, EV_MSC, MSC_SERIAL, 0xf0);
  266. input_sync(input);
  267. }
  268. #ifdef CONFIG_HID_WACOM_POWER_SUPPLY
  269. /* Store current battery capacity */
  270. rw = (data[7] >> 2 & 0x07);
  271. if (rw != wdata->battery_capacity)
  272. wdata->battery_capacity = rw;
  273. #endif
  274. return 1;
  275. }
  276. static void wacom_i4_parse_pen_report(struct wacom_data *wdata,
  277. struct input_dev *input, unsigned char *data)
  278. {
  279. __u16 x, y, pressure;
  280. __u32 id;
  281. switch (data[1]) {
  282. case 0x80: /* Out of proximity report */
  283. wdata->tool = 0;
  284. input_report_key(input, BTN_TOUCH, 0);
  285. input_report_abs(input, ABS_PRESSURE, 0);
  286. input_report_key(input, wdata->tool, 0);
  287. input_sync(input);
  288. break;
  289. case 0xC2: /* Tool report */
  290. id = ((data[2] << 4) | (data[3] >> 4) |
  291. ((data[7] & 0x0f) << 20) |
  292. ((data[8] & 0xf0) << 12)) & 0xfffff;
  293. switch (id) {
  294. case 0x802:
  295. wdata->tool = BTN_TOOL_PEN;
  296. break;
  297. case 0x80A:
  298. wdata->tool = BTN_TOOL_RUBBER;
  299. break;
  300. }
  301. break;
  302. default: /* Position/pressure report */
  303. x = data[2] << 9 | data[3] << 1 | ((data[9] & 0x02) >> 1);
  304. y = data[4] << 9 | data[5] << 1 | (data[9] & 0x01);
  305. pressure = (data[6] << 3) | ((data[7] & 0xC0) >> 5)
  306. | (data[1] & 0x01);
  307. input_report_key(input, BTN_TOUCH, pressure > 1);
  308. input_report_key(input, BTN_STYLUS, data[1] & 0x02);
  309. input_report_key(input, BTN_STYLUS2, data[1] & 0x04);
  310. input_report_key(input, wdata->tool, 1);
  311. input_report_abs(input, ABS_X, x);
  312. input_report_abs(input, ABS_Y, y);
  313. input_report_abs(input, ABS_PRESSURE, pressure);
  314. input_sync(input);
  315. break;
  316. }
  317. return;
  318. }
  319. static void wacom_i4_parse_report(struct hid_device *hdev,
  320. struct wacom_data *wdata,
  321. struct input_dev *input, unsigned char *data)
  322. {
  323. switch (data[0]) {
  324. case 0x00: /* Empty report */
  325. break;
  326. case 0x02: /* Pen report */
  327. wacom_i4_parse_pen_report(wdata, input, data);
  328. break;
  329. case 0x03: /* Features Report */
  330. wdata->features = data[2];
  331. break;
  332. case 0x0C: /* Button report */
  333. break;
  334. default:
  335. hid_err(hdev, "Unknown report: %d,%d\n", data[0], data[1]);
  336. break;
  337. }
  338. }
  339. static int wacom_raw_event(struct hid_device *hdev, struct hid_report *report,
  340. u8 *raw_data, int size)
  341. {
  342. struct wacom_data *wdata = hid_get_drvdata(hdev);
  343. struct hid_input *hidinput;
  344. struct input_dev *input;
  345. unsigned char *data = (unsigned char *) raw_data;
  346. int i;
  347. if (!(hdev->claimed & HID_CLAIMED_INPUT))
  348. return 0;
  349. hidinput = list_entry(hdev->inputs.next, struct hid_input, list);
  350. input = hidinput->input;
  351. /* Check if this is a tablet report */
  352. if (data[0] != 0x03)
  353. return 0;
  354. switch (hdev->product) {
  355. case USB_DEVICE_ID_WACOM_GRAPHIRE_BLUETOOTH:
  356. return wacom_gr_parse_report(hdev, wdata, input, data);
  357. break;
  358. case USB_DEVICE_ID_WACOM_INTUOS4_BLUETOOTH:
  359. i = 1;
  360. switch (data[0]) {
  361. case 0x04:
  362. wacom_i4_parse_report(hdev, wdata, input, data + i);
  363. i += 10;
  364. /* fall through */
  365. case 0x03:
  366. wacom_i4_parse_report(hdev, wdata, input, data + i);
  367. i += 10;
  368. wacom_i4_parse_report(hdev, wdata, input, data + i);
  369. break;
  370. default:
  371. hid_err(hdev, "Unknown report: %d,%d size:%d\n",
  372. data[0], data[1], size);
  373. return 0;
  374. }
  375. }
  376. return 1;
  377. }
  378. static int wacom_input_mapped(struct hid_device *hdev, struct hid_input *hi,
  379. struct hid_field *field, struct hid_usage *usage, unsigned long **bit,
  380. int *max)
  381. {
  382. struct input_dev *input = hi->input;
  383. __set_bit(INPUT_PROP_POINTER, input->propbit);
  384. /* Basics */
  385. input->evbit[0] |= BIT(EV_KEY) | BIT(EV_ABS) | BIT(EV_REL);
  386. __set_bit(REL_WHEEL, input->relbit);
  387. __set_bit(BTN_TOOL_PEN, input->keybit);
  388. __set_bit(BTN_TOUCH, input->keybit);
  389. __set_bit(BTN_STYLUS, input->keybit);
  390. __set_bit(BTN_STYLUS2, input->keybit);
  391. __set_bit(BTN_LEFT, input->keybit);
  392. __set_bit(BTN_RIGHT, input->keybit);
  393. __set_bit(BTN_MIDDLE, input->keybit);
  394. /* Pad */
  395. input->evbit[0] |= BIT(EV_MSC);
  396. __set_bit(MSC_SERIAL, input->mscbit);
  397. __set_bit(BTN_0, input->keybit);
  398. __set_bit(BTN_1, input->keybit);
  399. __set_bit(BTN_TOOL_FINGER, input->keybit);
  400. /* Distance, rubber and mouse */
  401. __set_bit(BTN_TOOL_RUBBER, input->keybit);
  402. __set_bit(BTN_TOOL_MOUSE, input->keybit);
  403. switch (hdev->product) {
  404. case USB_DEVICE_ID_WACOM_GRAPHIRE_BLUETOOTH:
  405. input_set_abs_params(input, ABS_X, 0, 16704, 4, 0);
  406. input_set_abs_params(input, ABS_Y, 0, 12064, 4, 0);
  407. input_set_abs_params(input, ABS_PRESSURE, 0, 511, 0, 0);
  408. input_set_abs_params(input, ABS_DISTANCE, 0, 32, 0, 0);
  409. break;
  410. case USB_DEVICE_ID_WACOM_INTUOS4_BLUETOOTH:
  411. input_set_abs_params(input, ABS_X, 0, 40640, 4, 0);
  412. input_set_abs_params(input, ABS_Y, 0, 25400, 4, 0);
  413. input_set_abs_params(input, ABS_PRESSURE, 0, 2047, 0, 0);
  414. break;
  415. }
  416. return 0;
  417. }
  418. static int wacom_probe(struct hid_device *hdev,
  419. const struct hid_device_id *id)
  420. {
  421. struct wacom_data *wdata;
  422. int ret;
  423. wdata = kzalloc(sizeof(*wdata), GFP_KERNEL);
  424. if (wdata == NULL) {
  425. hid_err(hdev, "can't alloc wacom descriptor\n");
  426. return -ENOMEM;
  427. }
  428. hid_set_drvdata(hdev, wdata);
  429. /* Parse the HID report now */
  430. ret = hid_parse(hdev);
  431. if (ret) {
  432. hid_err(hdev, "parse failed\n");
  433. goto err_free;
  434. }
  435. ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT);
  436. if (ret) {
  437. hid_err(hdev, "hw start failed\n");
  438. goto err_free;
  439. }
  440. ret = device_create_file(&hdev->dev, &dev_attr_speed);
  441. if (ret)
  442. hid_warn(hdev,
  443. "can't create sysfs speed attribute err: %d\n", ret);
  444. switch (hdev->product) {
  445. case USB_DEVICE_ID_WACOM_GRAPHIRE_BLUETOOTH:
  446. /* Set Wacom mode 2 with high reporting speed */
  447. wacom_poke(hdev, 1);
  448. break;
  449. case USB_DEVICE_ID_WACOM_INTUOS4_BLUETOOTH:
  450. wdata->features = 0;
  451. wacom_set_features(hdev);
  452. break;
  453. }
  454. #ifdef CONFIG_HID_WACOM_POWER_SUPPLY
  455. wdata->battery.properties = wacom_battery_props;
  456. wdata->battery.num_properties = ARRAY_SIZE(wacom_battery_props);
  457. wdata->battery.get_property = wacom_battery_get_property;
  458. wdata->battery.name = "wacom_battery";
  459. wdata->battery.type = POWER_SUPPLY_TYPE_BATTERY;
  460. wdata->battery.use_for_apm = 0;
  461. power_supply_powers(&wdata->battery, &hdev->dev);
  462. ret = power_supply_register(&hdev->dev, &wdata->battery);
  463. if (ret) {
  464. hid_warn(hdev, "can't create sysfs battery attribute, err: %d\n",
  465. ret);
  466. goto err_battery;
  467. }
  468. wdata->ac.properties = wacom_ac_props;
  469. wdata->ac.num_properties = ARRAY_SIZE(wacom_ac_props);
  470. wdata->ac.get_property = wacom_ac_get_property;
  471. wdata->ac.name = "wacom_ac";
  472. wdata->ac.type = POWER_SUPPLY_TYPE_MAINS;
  473. wdata->ac.use_for_apm = 0;
  474. power_supply_powers(&wdata->battery, &hdev->dev);
  475. ret = power_supply_register(&hdev->dev, &wdata->ac);
  476. if (ret) {
  477. hid_warn(hdev,
  478. "can't create ac battery attribute, err: %d\n", ret);
  479. goto err_ac;
  480. }
  481. #endif
  482. return 0;
  483. #ifdef CONFIG_HID_WACOM_POWER_SUPPLY
  484. err_ac:
  485. power_supply_unregister(&wdata->battery);
  486. err_battery:
  487. device_remove_file(&hdev->dev, &dev_attr_speed);
  488. hid_hw_stop(hdev);
  489. #endif
  490. err_free:
  491. kfree(wdata);
  492. return ret;
  493. }
  494. static void wacom_remove(struct hid_device *hdev)
  495. {
  496. #ifdef CONFIG_HID_WACOM_POWER_SUPPLY
  497. struct wacom_data *wdata = hid_get_drvdata(hdev);
  498. #endif
  499. device_remove_file(&hdev->dev, &dev_attr_speed);
  500. hid_hw_stop(hdev);
  501. #ifdef CONFIG_HID_WACOM_POWER_SUPPLY
  502. power_supply_unregister(&wdata->battery);
  503. power_supply_unregister(&wdata->ac);
  504. #endif
  505. kfree(hid_get_drvdata(hdev));
  506. }
  507. static const struct hid_device_id wacom_devices[] = {
  508. { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_GRAPHIRE_BLUETOOTH) },
  509. { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS4_BLUETOOTH) },
  510. { }
  511. };
  512. MODULE_DEVICE_TABLE(hid, wacom_devices);
  513. static struct hid_driver wacom_driver = {
  514. .name = "wacom",
  515. .id_table = wacom_devices,
  516. .probe = wacom_probe,
  517. .remove = wacom_remove,
  518. .raw_event = wacom_raw_event,
  519. .input_mapped = wacom_input_mapped,
  520. };
  521. static int __init wacom_init(void)
  522. {
  523. int ret;
  524. ret = hid_register_driver(&wacom_driver);
  525. if (ret)
  526. pr_err("can't register wacom driver\n");
  527. return ret;
  528. }
  529. static void __exit wacom_exit(void)
  530. {
  531. hid_unregister_driver(&wacom_driver);
  532. }
  533. module_init(wacom_init);
  534. module_exit(wacom_exit);
  535. MODULE_LICENSE("GPL");