104-quad-8.c 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598
  1. /*
  2. * IIO driver for the ACCES 104-QUAD-8
  3. * Copyright (C) 2016 William Breathitt Gray
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License, version 2, as
  7. * published by the Free Software Foundation.
  8. *
  9. * This program is distributed in the hope that it will be useful, but
  10. * WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. * General Public License for more details.
  13. *
  14. * This driver supports the ACCES 104-QUAD-8 and ACCES 104-QUAD-4.
  15. */
  16. #include <linux/bitops.h>
  17. #include <linux/device.h>
  18. #include <linux/errno.h>
  19. #include <linux/iio/iio.h>
  20. #include <linux/iio/types.h>
  21. #include <linux/io.h>
  22. #include <linux/ioport.h>
  23. #include <linux/isa.h>
  24. #include <linux/kernel.h>
  25. #include <linux/module.h>
  26. #include <linux/moduleparam.h>
  27. #include <linux/types.h>
  28. #define QUAD8_EXTENT 32
  29. static unsigned int base[max_num_isa_dev(QUAD8_EXTENT)];
  30. static unsigned int num_quad8;
  31. module_param_array(base, uint, &num_quad8, 0);
  32. MODULE_PARM_DESC(base, "ACCES 104-QUAD-8 base addresses");
  33. #define QUAD8_NUM_COUNTERS 8
  34. /**
  35. * struct quad8_iio - IIO device private data structure
  36. * @preset: array of preset values
  37. * @count_mode: array of count mode configurations
  38. * @quadrature_mode: array of quadrature mode configurations
  39. * @quadrature_scale: array of quadrature mode scale configurations
  40. * @ab_enable: array of A and B inputs enable configurations
  41. * @preset_enable: array of set_to_preset_on_index attribute configurations
  42. * @synchronous_mode: array of index function synchronous mode configurations
  43. * @index_polarity: array of index function polarity configurations
  44. * @base: base port address of the IIO device
  45. */
  46. struct quad8_iio {
  47. unsigned int preset[QUAD8_NUM_COUNTERS];
  48. unsigned int count_mode[QUAD8_NUM_COUNTERS];
  49. unsigned int quadrature_mode[QUAD8_NUM_COUNTERS];
  50. unsigned int quadrature_scale[QUAD8_NUM_COUNTERS];
  51. unsigned int ab_enable[QUAD8_NUM_COUNTERS];
  52. unsigned int preset_enable[QUAD8_NUM_COUNTERS];
  53. unsigned int synchronous_mode[QUAD8_NUM_COUNTERS];
  54. unsigned int index_polarity[QUAD8_NUM_COUNTERS];
  55. unsigned int base;
  56. };
  57. static int quad8_read_raw(struct iio_dev *indio_dev,
  58. struct iio_chan_spec const *chan, int *val, int *val2, long mask)
  59. {
  60. struct quad8_iio *const priv = iio_priv(indio_dev);
  61. const int base_offset = priv->base + 2 * chan->channel;
  62. unsigned int flags;
  63. unsigned int borrow;
  64. unsigned int carry;
  65. int i;
  66. switch (mask) {
  67. case IIO_CHAN_INFO_RAW:
  68. if (chan->type == IIO_INDEX) {
  69. *val = !!(inb(priv->base + 0x16) & BIT(chan->channel));
  70. return IIO_VAL_INT;
  71. }
  72. flags = inb(base_offset + 1);
  73. borrow = flags & BIT(0);
  74. carry = !!(flags & BIT(1));
  75. /* Borrow XOR Carry effectively doubles count range */
  76. *val = (borrow ^ carry) << 24;
  77. /* Reset Byte Pointer; transfer Counter to Output Latch */
  78. outb(0x11, base_offset + 1);
  79. for (i = 0; i < 3; i++)
  80. *val |= (unsigned int)inb(base_offset) << (8 * i);
  81. return IIO_VAL_INT;
  82. case IIO_CHAN_INFO_ENABLE:
  83. *val = priv->ab_enable[chan->channel];
  84. return IIO_VAL_INT;
  85. case IIO_CHAN_INFO_SCALE:
  86. *val = 1;
  87. *val2 = priv->quadrature_scale[chan->channel];
  88. return IIO_VAL_FRACTIONAL_LOG2;
  89. }
  90. return -EINVAL;
  91. }
  92. static int quad8_write_raw(struct iio_dev *indio_dev,
  93. struct iio_chan_spec const *chan, int val, int val2, long mask)
  94. {
  95. struct quad8_iio *const priv = iio_priv(indio_dev);
  96. const int base_offset = priv->base + 2 * chan->channel;
  97. int i;
  98. unsigned int ior_cfg;
  99. switch (mask) {
  100. case IIO_CHAN_INFO_RAW:
  101. if (chan->type == IIO_INDEX)
  102. return -EINVAL;
  103. /* Only 24-bit values are supported */
  104. if ((unsigned int)val > 0xFFFFFF)
  105. return -EINVAL;
  106. /* Reset Byte Pointer */
  107. outb(0x01, base_offset + 1);
  108. /* Counter can only be set via Preset Register */
  109. for (i = 0; i < 3; i++)
  110. outb(val >> (8 * i), base_offset);
  111. /* Transfer Preset Register to Counter */
  112. outb(0x08, base_offset + 1);
  113. /* Reset Byte Pointer */
  114. outb(0x01, base_offset + 1);
  115. /* Set Preset Register back to original value */
  116. val = priv->preset[chan->channel];
  117. for (i = 0; i < 3; i++)
  118. outb(val >> (8 * i), base_offset);
  119. /* Reset Borrow, Carry, Compare, and Sign flags */
  120. outb(0x04, base_offset + 1);
  121. /* Reset Error flag */
  122. outb(0x06, base_offset + 1);
  123. return 0;
  124. case IIO_CHAN_INFO_ENABLE:
  125. /* only boolean values accepted */
  126. if (val < 0 || val > 1)
  127. return -EINVAL;
  128. priv->ab_enable[chan->channel] = val;
  129. ior_cfg = val | priv->preset_enable[chan->channel] << 1;
  130. /* Load I/O control configuration */
  131. outb(0x40 | ior_cfg, base_offset + 1);
  132. return 0;
  133. case IIO_CHAN_INFO_SCALE:
  134. /* Quadrature scaling only available in quadrature mode */
  135. if (!priv->quadrature_mode[chan->channel] && (val2 || val != 1))
  136. return -EINVAL;
  137. /* Only three gain states (1, 0.5, 0.25) */
  138. if (val == 1 && !val2)
  139. priv->quadrature_scale[chan->channel] = 0;
  140. else if (!val)
  141. switch (val2) {
  142. case 500000:
  143. priv->quadrature_scale[chan->channel] = 1;
  144. break;
  145. case 250000:
  146. priv->quadrature_scale[chan->channel] = 2;
  147. break;
  148. default:
  149. return -EINVAL;
  150. }
  151. else
  152. return -EINVAL;
  153. return 0;
  154. }
  155. return -EINVAL;
  156. }
  157. static const struct iio_info quad8_info = {
  158. .driver_module = THIS_MODULE,
  159. .read_raw = quad8_read_raw,
  160. .write_raw = quad8_write_raw
  161. };
  162. static ssize_t quad8_read_preset(struct iio_dev *indio_dev, uintptr_t private,
  163. const struct iio_chan_spec *chan, char *buf)
  164. {
  165. const struct quad8_iio *const priv = iio_priv(indio_dev);
  166. return snprintf(buf, PAGE_SIZE, "%u\n", priv->preset[chan->channel]);
  167. }
  168. static ssize_t quad8_write_preset(struct iio_dev *indio_dev, uintptr_t private,
  169. const struct iio_chan_spec *chan, const char *buf, size_t len)
  170. {
  171. struct quad8_iio *const priv = iio_priv(indio_dev);
  172. const int base_offset = priv->base + 2 * chan->channel;
  173. unsigned int preset;
  174. int ret;
  175. int i;
  176. ret = kstrtouint(buf, 0, &preset);
  177. if (ret)
  178. return ret;
  179. /* Only 24-bit values are supported */
  180. if (preset > 0xFFFFFF)
  181. return -EINVAL;
  182. priv->preset[chan->channel] = preset;
  183. /* Reset Byte Pointer */
  184. outb(0x01, base_offset + 1);
  185. /* Set Preset Register */
  186. for (i = 0; i < 3; i++)
  187. outb(preset >> (8 * i), base_offset);
  188. return len;
  189. }
  190. static ssize_t quad8_read_set_to_preset_on_index(struct iio_dev *indio_dev,
  191. uintptr_t private, const struct iio_chan_spec *chan, char *buf)
  192. {
  193. const struct quad8_iio *const priv = iio_priv(indio_dev);
  194. return snprintf(buf, PAGE_SIZE, "%u\n",
  195. !priv->preset_enable[chan->channel]);
  196. }
  197. static ssize_t quad8_write_set_to_preset_on_index(struct iio_dev *indio_dev,
  198. uintptr_t private, const struct iio_chan_spec *chan, const char *buf,
  199. size_t len)
  200. {
  201. struct quad8_iio *const priv = iio_priv(indio_dev);
  202. const int base_offset = priv->base + 2 * chan->channel + 1;
  203. bool preset_enable;
  204. int ret;
  205. unsigned int ior_cfg;
  206. ret = kstrtobool(buf, &preset_enable);
  207. if (ret)
  208. return ret;
  209. /* Preset enable is active low in Input/Output Control register */
  210. preset_enable = !preset_enable;
  211. priv->preset_enable[chan->channel] = preset_enable;
  212. ior_cfg = priv->ab_enable[chan->channel] |
  213. (unsigned int)preset_enable << 1;
  214. /* Load I/O control configuration to Input / Output Control Register */
  215. outb(0x40 | ior_cfg, base_offset);
  216. return len;
  217. }
  218. static const char *const quad8_noise_error_states[] = {
  219. "No excessive noise is present at the count inputs",
  220. "Excessive noise is present at the count inputs"
  221. };
  222. static int quad8_get_noise_error(struct iio_dev *indio_dev,
  223. const struct iio_chan_spec *chan)
  224. {
  225. struct quad8_iio *const priv = iio_priv(indio_dev);
  226. const int base_offset = priv->base + 2 * chan->channel + 1;
  227. return !!(inb(base_offset) & BIT(4));
  228. }
  229. static const struct iio_enum quad8_noise_error_enum = {
  230. .items = quad8_noise_error_states,
  231. .num_items = ARRAY_SIZE(quad8_noise_error_states),
  232. .get = quad8_get_noise_error
  233. };
  234. static const char *const quad8_count_direction_states[] = {
  235. "down",
  236. "up"
  237. };
  238. static int quad8_get_count_direction(struct iio_dev *indio_dev,
  239. const struct iio_chan_spec *chan)
  240. {
  241. struct quad8_iio *const priv = iio_priv(indio_dev);
  242. const int base_offset = priv->base + 2 * chan->channel + 1;
  243. return !!(inb(base_offset) & BIT(5));
  244. }
  245. static const struct iio_enum quad8_count_direction_enum = {
  246. .items = quad8_count_direction_states,
  247. .num_items = ARRAY_SIZE(quad8_count_direction_states),
  248. .get = quad8_get_count_direction
  249. };
  250. static const char *const quad8_count_modes[] = {
  251. "normal",
  252. "range limit",
  253. "non-recycle",
  254. "modulo-n"
  255. };
  256. static int quad8_set_count_mode(struct iio_dev *indio_dev,
  257. const struct iio_chan_spec *chan, unsigned int count_mode)
  258. {
  259. struct quad8_iio *const priv = iio_priv(indio_dev);
  260. unsigned int mode_cfg = count_mode << 1;
  261. const int base_offset = priv->base + 2 * chan->channel + 1;
  262. priv->count_mode[chan->channel] = count_mode;
  263. /* Add quadrature mode configuration */
  264. if (priv->quadrature_mode[chan->channel])
  265. mode_cfg |= (priv->quadrature_scale[chan->channel] + 1) << 3;
  266. /* Load mode configuration to Counter Mode Register */
  267. outb(0x20 | mode_cfg, base_offset);
  268. return 0;
  269. }
  270. static int quad8_get_count_mode(struct iio_dev *indio_dev,
  271. const struct iio_chan_spec *chan)
  272. {
  273. const struct quad8_iio *const priv = iio_priv(indio_dev);
  274. return priv->count_mode[chan->channel];
  275. }
  276. static const struct iio_enum quad8_count_mode_enum = {
  277. .items = quad8_count_modes,
  278. .num_items = ARRAY_SIZE(quad8_count_modes),
  279. .set = quad8_set_count_mode,
  280. .get = quad8_get_count_mode
  281. };
  282. static const char *const quad8_synchronous_modes[] = {
  283. "non-synchronous",
  284. "synchronous"
  285. };
  286. static int quad8_set_synchronous_mode(struct iio_dev *indio_dev,
  287. const struct iio_chan_spec *chan, unsigned int synchronous_mode)
  288. {
  289. struct quad8_iio *const priv = iio_priv(indio_dev);
  290. const unsigned int idr_cfg = synchronous_mode |
  291. priv->index_polarity[chan->channel] << 1;
  292. const int base_offset = priv->base + 2 * chan->channel + 1;
  293. /* Index function must be non-synchronous in non-quadrature mode */
  294. if (synchronous_mode && !priv->quadrature_mode[chan->channel])
  295. return -EINVAL;
  296. priv->synchronous_mode[chan->channel] = synchronous_mode;
  297. /* Load Index Control configuration to Index Control Register */
  298. outb(0x60 | idr_cfg, base_offset);
  299. return 0;
  300. }
  301. static int quad8_get_synchronous_mode(struct iio_dev *indio_dev,
  302. const struct iio_chan_spec *chan)
  303. {
  304. const struct quad8_iio *const priv = iio_priv(indio_dev);
  305. return priv->synchronous_mode[chan->channel];
  306. }
  307. static const struct iio_enum quad8_synchronous_mode_enum = {
  308. .items = quad8_synchronous_modes,
  309. .num_items = ARRAY_SIZE(quad8_synchronous_modes),
  310. .set = quad8_set_synchronous_mode,
  311. .get = quad8_get_synchronous_mode
  312. };
  313. static const char *const quad8_quadrature_modes[] = {
  314. "non-quadrature",
  315. "quadrature"
  316. };
  317. static int quad8_set_quadrature_mode(struct iio_dev *indio_dev,
  318. const struct iio_chan_spec *chan, unsigned int quadrature_mode)
  319. {
  320. struct quad8_iio *const priv = iio_priv(indio_dev);
  321. unsigned int mode_cfg = priv->count_mode[chan->channel] << 1;
  322. const int base_offset = priv->base + 2 * chan->channel + 1;
  323. if (quadrature_mode)
  324. mode_cfg |= (priv->quadrature_scale[chan->channel] + 1) << 3;
  325. else {
  326. /* Quadrature scaling only available in quadrature mode */
  327. priv->quadrature_scale[chan->channel] = 0;
  328. /* Synchronous function not supported in non-quadrature mode */
  329. if (priv->synchronous_mode[chan->channel])
  330. quad8_set_synchronous_mode(indio_dev, chan, 0);
  331. }
  332. priv->quadrature_mode[chan->channel] = quadrature_mode;
  333. /* Load mode configuration to Counter Mode Register */
  334. outb(0x20 | mode_cfg, base_offset);
  335. return 0;
  336. }
  337. static int quad8_get_quadrature_mode(struct iio_dev *indio_dev,
  338. const struct iio_chan_spec *chan)
  339. {
  340. const struct quad8_iio *const priv = iio_priv(indio_dev);
  341. return priv->quadrature_mode[chan->channel];
  342. }
  343. static const struct iio_enum quad8_quadrature_mode_enum = {
  344. .items = quad8_quadrature_modes,
  345. .num_items = ARRAY_SIZE(quad8_quadrature_modes),
  346. .set = quad8_set_quadrature_mode,
  347. .get = quad8_get_quadrature_mode
  348. };
  349. static const char *const quad8_index_polarity_modes[] = {
  350. "negative",
  351. "positive"
  352. };
  353. static int quad8_set_index_polarity(struct iio_dev *indio_dev,
  354. const struct iio_chan_spec *chan, unsigned int index_polarity)
  355. {
  356. struct quad8_iio *const priv = iio_priv(indio_dev);
  357. const unsigned int idr_cfg = priv->synchronous_mode[chan->channel] |
  358. index_polarity << 1;
  359. const int base_offset = priv->base + 2 * chan->channel + 1;
  360. priv->index_polarity[chan->channel] = index_polarity;
  361. /* Load Index Control configuration to Index Control Register */
  362. outb(0x60 | idr_cfg, base_offset);
  363. return 0;
  364. }
  365. static int quad8_get_index_polarity(struct iio_dev *indio_dev,
  366. const struct iio_chan_spec *chan)
  367. {
  368. const struct quad8_iio *const priv = iio_priv(indio_dev);
  369. return priv->index_polarity[chan->channel];
  370. }
  371. static const struct iio_enum quad8_index_polarity_enum = {
  372. .items = quad8_index_polarity_modes,
  373. .num_items = ARRAY_SIZE(quad8_index_polarity_modes),
  374. .set = quad8_set_index_polarity,
  375. .get = quad8_get_index_polarity
  376. };
  377. static const struct iio_chan_spec_ext_info quad8_count_ext_info[] = {
  378. {
  379. .name = "preset",
  380. .shared = IIO_SEPARATE,
  381. .read = quad8_read_preset,
  382. .write = quad8_write_preset
  383. },
  384. {
  385. .name = "set_to_preset_on_index",
  386. .shared = IIO_SEPARATE,
  387. .read = quad8_read_set_to_preset_on_index,
  388. .write = quad8_write_set_to_preset_on_index
  389. },
  390. IIO_ENUM("noise_error", IIO_SEPARATE, &quad8_noise_error_enum),
  391. IIO_ENUM_AVAILABLE("noise_error", &quad8_noise_error_enum),
  392. IIO_ENUM("count_direction", IIO_SEPARATE, &quad8_count_direction_enum),
  393. IIO_ENUM_AVAILABLE("count_direction", &quad8_count_direction_enum),
  394. IIO_ENUM("count_mode", IIO_SEPARATE, &quad8_count_mode_enum),
  395. IIO_ENUM_AVAILABLE("count_mode", &quad8_count_mode_enum),
  396. IIO_ENUM("quadrature_mode", IIO_SEPARATE, &quad8_quadrature_mode_enum),
  397. IIO_ENUM_AVAILABLE("quadrature_mode", &quad8_quadrature_mode_enum),
  398. {}
  399. };
  400. static const struct iio_chan_spec_ext_info quad8_index_ext_info[] = {
  401. IIO_ENUM("synchronous_mode", IIO_SEPARATE,
  402. &quad8_synchronous_mode_enum),
  403. IIO_ENUM_AVAILABLE("synchronous_mode", &quad8_synchronous_mode_enum),
  404. IIO_ENUM("index_polarity", IIO_SEPARATE, &quad8_index_polarity_enum),
  405. IIO_ENUM_AVAILABLE("index_polarity", &quad8_index_polarity_enum),
  406. {}
  407. };
  408. #define QUAD8_COUNT_CHAN(_chan) { \
  409. .type = IIO_COUNT, \
  410. .channel = (_chan), \
  411. .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) | \
  412. BIT(IIO_CHAN_INFO_ENABLE) | BIT(IIO_CHAN_INFO_SCALE), \
  413. .ext_info = quad8_count_ext_info, \
  414. .indexed = 1 \
  415. }
  416. #define QUAD8_INDEX_CHAN(_chan) { \
  417. .type = IIO_INDEX, \
  418. .channel = (_chan), \
  419. .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), \
  420. .ext_info = quad8_index_ext_info, \
  421. .indexed = 1 \
  422. }
  423. static const struct iio_chan_spec quad8_channels[] = {
  424. QUAD8_COUNT_CHAN(0), QUAD8_INDEX_CHAN(0),
  425. QUAD8_COUNT_CHAN(1), QUAD8_INDEX_CHAN(1),
  426. QUAD8_COUNT_CHAN(2), QUAD8_INDEX_CHAN(2),
  427. QUAD8_COUNT_CHAN(3), QUAD8_INDEX_CHAN(3),
  428. QUAD8_COUNT_CHAN(4), QUAD8_INDEX_CHAN(4),
  429. QUAD8_COUNT_CHAN(5), QUAD8_INDEX_CHAN(5),
  430. QUAD8_COUNT_CHAN(6), QUAD8_INDEX_CHAN(6),
  431. QUAD8_COUNT_CHAN(7), QUAD8_INDEX_CHAN(7)
  432. };
  433. static int quad8_probe(struct device *dev, unsigned int id)
  434. {
  435. struct iio_dev *indio_dev;
  436. struct quad8_iio *priv;
  437. int i, j;
  438. unsigned int base_offset;
  439. indio_dev = devm_iio_device_alloc(dev, sizeof(*priv));
  440. if (!indio_dev)
  441. return -ENOMEM;
  442. if (!devm_request_region(dev, base[id], QUAD8_EXTENT,
  443. dev_name(dev))) {
  444. dev_err(dev, "Unable to lock port addresses (0x%X-0x%X)\n",
  445. base[id], base[id] + QUAD8_EXTENT);
  446. return -EBUSY;
  447. }
  448. indio_dev->info = &quad8_info;
  449. indio_dev->modes = INDIO_DIRECT_MODE;
  450. indio_dev->num_channels = ARRAY_SIZE(quad8_channels);
  451. indio_dev->channels = quad8_channels;
  452. indio_dev->name = dev_name(dev);
  453. indio_dev->dev.parent = dev;
  454. priv = iio_priv(indio_dev);
  455. priv->base = base[id];
  456. /* Reset all counters and disable interrupt function */
  457. outb(0x01, base[id] + 0x11);
  458. /* Set initial configuration for all counters */
  459. for (i = 0; i < QUAD8_NUM_COUNTERS; i++) {
  460. base_offset = base[id] + 2 * i;
  461. /* Reset Byte Pointer */
  462. outb(0x01, base_offset + 1);
  463. /* Reset Preset Register */
  464. for (j = 0; j < 3; j++)
  465. outb(0x00, base_offset);
  466. /* Reset Borrow, Carry, Compare, and Sign flags */
  467. outb(0x04, base_offset + 1);
  468. /* Reset Error flag */
  469. outb(0x06, base_offset + 1);
  470. /* Binary encoding; Normal count; non-quadrature mode */
  471. outb(0x20, base_offset + 1);
  472. /* Disable A and B inputs; preset on index; FLG1 as Carry */
  473. outb(0x40, base_offset + 1);
  474. /* Disable index function; negative index polarity */
  475. outb(0x60, base_offset + 1);
  476. }
  477. /* Enable all counters */
  478. outb(0x00, base[id] + 0x11);
  479. return devm_iio_device_register(dev, indio_dev);
  480. }
  481. static struct isa_driver quad8_driver = {
  482. .probe = quad8_probe,
  483. .driver = {
  484. .name = "104-quad-8"
  485. }
  486. };
  487. module_isa_driver(quad8_driver, num_quad8);
  488. MODULE_AUTHOR("William Breathitt Gray <vilhelm.gray@gmail.com>");
  489. MODULE_DESCRIPTION("ACCES 104-QUAD-8 IIO driver");
  490. MODULE_LICENSE("GPL v2");