gpio-pcie-idio-24.c 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564
  1. // SPDX-License-Identifier: GPL-2.0-only
  2. /*
  3. * GPIO driver for the ACCES PCIe-IDIO-24 family
  4. * Copyright (C) 2018 William Breathitt Gray
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License, version 2, as
  8. * published by the Free Software Foundation.
  9. *
  10. * This program is distributed in the hope that it will be useful, but
  11. * WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  13. * General Public License for more details.
  14. *
  15. * This driver supports the following ACCES devices: PCIe-IDIO-24,
  16. * PCIe-IDI-24, PCIe-IDO-24, and PCIe-IDIO-12.
  17. */
  18. #include <linux/bitmap.h>
  19. #include <linux/bitops.h>
  20. #include <linux/device.h>
  21. #include <linux/errno.h>
  22. #include <linux/gpio/driver.h>
  23. #include <linux/interrupt.h>
  24. #include <linux/irqdesc.h>
  25. #include <linux/kernel.h>
  26. #include <linux/module.h>
  27. #include <linux/pci.h>
  28. #include <linux/spinlock.h>
  29. #include <linux/types.h>
  30. /**
  31. * struct idio_24_gpio_reg - GPIO device registers structure
  32. * @out0_7: Read: FET Outputs 0-7
  33. * Write: FET Outputs 0-7
  34. * @out8_15: Read: FET Outputs 8-15
  35. * Write: FET Outputs 8-15
  36. * @out16_23: Read: FET Outputs 16-23
  37. * Write: FET Outputs 16-23
  38. * @ttl_out0_7: Read: TTL/CMOS Outputs 0-7
  39. * Write: TTL/CMOS Outputs 0-7
  40. * @in0_7: Read: Isolated Inputs 0-7
  41. * Write: Reserved
  42. * @in8_15: Read: Isolated Inputs 8-15
  43. * Write: Reserved
  44. * @in16_23: Read: Isolated Inputs 16-23
  45. * Write: Reserved
  46. * @ttl_in0_7: Read: TTL/CMOS Inputs 0-7
  47. * Write: Reserved
  48. * @cos0_7: Read: COS Status Inputs 0-7
  49. * Write: COS Clear Inputs 0-7
  50. * @cos8_15: Read: COS Status Inputs 8-15
  51. * Write: COS Clear Inputs 8-15
  52. * @cos16_23: Read: COS Status Inputs 16-23
  53. * Write: COS Clear Inputs 16-23
  54. * @cos_ttl0_7: Read: COS Status TTL/CMOS 0-7
  55. * Write: COS Clear TTL/CMOS 0-7
  56. * @ctl: Read: Control Register
  57. * Write: Control Register
  58. * @reserved: Read: Reserved
  59. * Write: Reserved
  60. * @cos_enable: Read: COS Enable
  61. * Write: COS Enable
  62. * @soft_reset: Read: IRQ Output Pin Status
  63. * Write: Software Board Reset
  64. */
  65. struct idio_24_gpio_reg {
  66. u8 out0_7;
  67. u8 out8_15;
  68. u8 out16_23;
  69. u8 ttl_out0_7;
  70. u8 in0_7;
  71. u8 in8_15;
  72. u8 in16_23;
  73. u8 ttl_in0_7;
  74. u8 cos0_7;
  75. u8 cos8_15;
  76. u8 cos16_23;
  77. u8 cos_ttl0_7;
  78. u8 ctl;
  79. u8 reserved;
  80. u8 cos_enable;
  81. u8 soft_reset;
  82. };
  83. /**
  84. * struct idio_24_gpio - GPIO device private data structure
  85. * @chip: instance of the gpio_chip
  86. * @lock: synchronization lock to prevent I/O race conditions
  87. * @reg: I/O address offset for the GPIO device registers
  88. * @irq_mask: I/O bits affected by interrupts
  89. */
  90. struct idio_24_gpio {
  91. struct gpio_chip chip;
  92. raw_spinlock_t lock;
  93. struct idio_24_gpio_reg __iomem *reg;
  94. unsigned long irq_mask;
  95. };
  96. static int idio_24_gpio_get_direction(struct gpio_chip *chip,
  97. unsigned int offset)
  98. {
  99. struct idio_24_gpio *const idio24gpio = gpiochip_get_data(chip);
  100. const unsigned long out_mode_mask = BIT(1);
  101. /* FET Outputs */
  102. if (offset < 24)
  103. return 0;
  104. /* Isolated Inputs */
  105. if (offset < 48)
  106. return 1;
  107. /* TTL/CMOS I/O */
  108. /* OUT MODE = 1 when TTL/CMOS Output Mode is set */
  109. return !(ioread8(&idio24gpio->reg->ctl) & out_mode_mask);
  110. }
  111. static int idio_24_gpio_direction_input(struct gpio_chip *chip,
  112. unsigned int offset)
  113. {
  114. struct idio_24_gpio *const idio24gpio = gpiochip_get_data(chip);
  115. unsigned long flags;
  116. unsigned int ctl_state;
  117. const unsigned long out_mode_mask = BIT(1);
  118. /* TTL/CMOS I/O */
  119. if (offset > 47) {
  120. raw_spin_lock_irqsave(&idio24gpio->lock, flags);
  121. /* Clear TTL/CMOS Output Mode */
  122. ctl_state = ioread8(&idio24gpio->reg->ctl) & ~out_mode_mask;
  123. iowrite8(ctl_state, &idio24gpio->reg->ctl);
  124. raw_spin_unlock_irqrestore(&idio24gpio->lock, flags);
  125. }
  126. return 0;
  127. }
  128. static int idio_24_gpio_direction_output(struct gpio_chip *chip,
  129. unsigned int offset, int value)
  130. {
  131. struct idio_24_gpio *const idio24gpio = gpiochip_get_data(chip);
  132. unsigned long flags;
  133. unsigned int ctl_state;
  134. const unsigned long out_mode_mask = BIT(1);
  135. /* TTL/CMOS I/O */
  136. if (offset > 47) {
  137. raw_spin_lock_irqsave(&idio24gpio->lock, flags);
  138. /* Set TTL/CMOS Output Mode */
  139. ctl_state = ioread8(&idio24gpio->reg->ctl) | out_mode_mask;
  140. iowrite8(ctl_state, &idio24gpio->reg->ctl);
  141. raw_spin_unlock_irqrestore(&idio24gpio->lock, flags);
  142. }
  143. chip->set(chip, offset, value);
  144. return 0;
  145. }
  146. static int idio_24_gpio_get(struct gpio_chip *chip, unsigned int offset)
  147. {
  148. struct idio_24_gpio *const idio24gpio = gpiochip_get_data(chip);
  149. const unsigned long offset_mask = BIT(offset % 8);
  150. const unsigned long out_mode_mask = BIT(1);
  151. /* FET Outputs */
  152. if (offset < 8)
  153. return !!(ioread8(&idio24gpio->reg->out0_7) & offset_mask);
  154. if (offset < 16)
  155. return !!(ioread8(&idio24gpio->reg->out8_15) & offset_mask);
  156. if (offset < 24)
  157. return !!(ioread8(&idio24gpio->reg->out16_23) & offset_mask);
  158. /* Isolated Inputs */
  159. if (offset < 32)
  160. return !!(ioread8(&idio24gpio->reg->in0_7) & offset_mask);
  161. if (offset < 40)
  162. return !!(ioread8(&idio24gpio->reg->in8_15) & offset_mask);
  163. if (offset < 48)
  164. return !!(ioread8(&idio24gpio->reg->in16_23) & offset_mask);
  165. /* TTL/CMOS Outputs */
  166. if (ioread8(&idio24gpio->reg->ctl) & out_mode_mask)
  167. return !!(ioread8(&idio24gpio->reg->ttl_out0_7) & offset_mask);
  168. /* TTL/CMOS Inputs */
  169. return !!(ioread8(&idio24gpio->reg->ttl_in0_7) & offset_mask);
  170. }
  171. static int idio_24_gpio_get_multiple(struct gpio_chip *chip,
  172. unsigned long *mask, unsigned long *bits)
  173. {
  174. struct idio_24_gpio *const idio24gpio = gpiochip_get_data(chip);
  175. size_t i;
  176. const unsigned int gpio_reg_size = 8;
  177. unsigned int bits_offset;
  178. size_t word_index;
  179. unsigned int word_offset;
  180. unsigned long word_mask;
  181. const unsigned long port_mask = GENMASK(gpio_reg_size - 1, 0);
  182. unsigned long port_state;
  183. void __iomem *ports[] = {
  184. &idio24gpio->reg->out0_7, &idio24gpio->reg->out8_15,
  185. &idio24gpio->reg->out16_23, &idio24gpio->reg->in0_7,
  186. &idio24gpio->reg->in8_15, &idio24gpio->reg->in16_23,
  187. };
  188. const unsigned long out_mode_mask = BIT(1);
  189. /* clear bits array to a clean slate */
  190. bitmap_zero(bits, chip->ngpio);
  191. /* get bits are evaluated a gpio port register at a time */
  192. for (i = 0; i < ARRAY_SIZE(ports) + 1; i++) {
  193. /* gpio offset in bits array */
  194. bits_offset = i * gpio_reg_size;
  195. /* word index for bits array */
  196. word_index = BIT_WORD(bits_offset);
  197. /* gpio offset within current word of bits array */
  198. word_offset = bits_offset % BITS_PER_LONG;
  199. /* mask of get bits for current gpio within current word */
  200. word_mask = mask[word_index] & (port_mask << word_offset);
  201. if (!word_mask) {
  202. /* no get bits in this port so skip to next one */
  203. continue;
  204. }
  205. /* read bits from current gpio port (port 6 is TTL GPIO) */
  206. if (i < 6)
  207. port_state = ioread8(ports[i]);
  208. else if (ioread8(&idio24gpio->reg->ctl) & out_mode_mask)
  209. port_state = ioread8(&idio24gpio->reg->ttl_out0_7);
  210. else
  211. port_state = ioread8(&idio24gpio->reg->ttl_in0_7);
  212. /* store acquired bits at respective bits array offset */
  213. bits[word_index] |= port_state << word_offset;
  214. }
  215. return 0;
  216. }
  217. static void idio_24_gpio_set(struct gpio_chip *chip, unsigned int offset,
  218. int value)
  219. {
  220. struct idio_24_gpio *const idio24gpio = gpiochip_get_data(chip);
  221. const unsigned long out_mode_mask = BIT(1);
  222. void __iomem *base;
  223. const unsigned int mask = BIT(offset % 8);
  224. unsigned long flags;
  225. unsigned int out_state;
  226. /* Isolated Inputs */
  227. if (offset > 23 && offset < 48)
  228. return;
  229. /* TTL/CMOS Inputs */
  230. if (offset > 47 && !(ioread8(&idio24gpio->reg->ctl) & out_mode_mask))
  231. return;
  232. /* TTL/CMOS Outputs */
  233. if (offset > 47)
  234. base = &idio24gpio->reg->ttl_out0_7;
  235. /* FET Outputs */
  236. else if (offset > 15)
  237. base = &idio24gpio->reg->out16_23;
  238. else if (offset > 7)
  239. base = &idio24gpio->reg->out8_15;
  240. else
  241. base = &idio24gpio->reg->out0_7;
  242. raw_spin_lock_irqsave(&idio24gpio->lock, flags);
  243. if (value)
  244. out_state = ioread8(base) | mask;
  245. else
  246. out_state = ioread8(base) & ~mask;
  247. iowrite8(out_state, base);
  248. raw_spin_unlock_irqrestore(&idio24gpio->lock, flags);
  249. }
  250. static void idio_24_gpio_set_multiple(struct gpio_chip *chip,
  251. unsigned long *mask, unsigned long *bits)
  252. {
  253. struct idio_24_gpio *const idio24gpio = gpiochip_get_data(chip);
  254. size_t i;
  255. unsigned long bits_offset;
  256. unsigned long gpio_mask;
  257. const unsigned int gpio_reg_size = 8;
  258. const unsigned long port_mask = GENMASK(gpio_reg_size, 0);
  259. unsigned long flags;
  260. unsigned int out_state;
  261. void __iomem *ports[] = {
  262. &idio24gpio->reg->out0_7, &idio24gpio->reg->out8_15,
  263. &idio24gpio->reg->out16_23
  264. };
  265. const unsigned long out_mode_mask = BIT(1);
  266. const unsigned int ttl_offset = 48;
  267. const size_t ttl_i = BIT_WORD(ttl_offset);
  268. const unsigned int word_offset = ttl_offset % BITS_PER_LONG;
  269. const unsigned long ttl_mask = (mask[ttl_i] >> word_offset) & port_mask;
  270. const unsigned long ttl_bits = (bits[ttl_i] >> word_offset) & ttl_mask;
  271. /* set bits are processed a gpio port register at a time */
  272. for (i = 0; i < ARRAY_SIZE(ports); i++) {
  273. /* gpio offset in bits array */
  274. bits_offset = i * gpio_reg_size;
  275. /* check if any set bits for current port */
  276. gpio_mask = (*mask >> bits_offset) & port_mask;
  277. if (!gpio_mask) {
  278. /* no set bits for this port so move on to next port */
  279. continue;
  280. }
  281. raw_spin_lock_irqsave(&idio24gpio->lock, flags);
  282. /* process output lines */
  283. out_state = ioread8(ports[i]) & ~gpio_mask;
  284. out_state |= (*bits >> bits_offset) & gpio_mask;
  285. iowrite8(out_state, ports[i]);
  286. raw_spin_unlock_irqrestore(&idio24gpio->lock, flags);
  287. }
  288. /* check if setting TTL lines and if they are in output mode */
  289. if (!ttl_mask || !(ioread8(&idio24gpio->reg->ctl) & out_mode_mask))
  290. return;
  291. /* handle TTL output */
  292. raw_spin_lock_irqsave(&idio24gpio->lock, flags);
  293. /* process output lines */
  294. out_state = ioread8(&idio24gpio->reg->ttl_out0_7) & ~ttl_mask;
  295. out_state |= ttl_bits;
  296. iowrite8(out_state, &idio24gpio->reg->ttl_out0_7);
  297. raw_spin_unlock_irqrestore(&idio24gpio->lock, flags);
  298. }
  299. static void idio_24_irq_ack(struct irq_data *data)
  300. {
  301. }
  302. static void idio_24_irq_mask(struct irq_data *data)
  303. {
  304. struct gpio_chip *const chip = irq_data_get_irq_chip_data(data);
  305. struct idio_24_gpio *const idio24gpio = gpiochip_get_data(chip);
  306. unsigned long flags;
  307. const unsigned long bit_offset = irqd_to_hwirq(data) - 24;
  308. unsigned char new_irq_mask;
  309. const unsigned long bank_offset = bit_offset/8 * 8;
  310. unsigned char cos_enable_state;
  311. raw_spin_lock_irqsave(&idio24gpio->lock, flags);
  312. idio24gpio->irq_mask &= BIT(bit_offset);
  313. new_irq_mask = idio24gpio->irq_mask >> bank_offset;
  314. if (!new_irq_mask) {
  315. cos_enable_state = ioread8(&idio24gpio->reg->cos_enable);
  316. /* Disable Rising Edge detection */
  317. cos_enable_state &= ~BIT(bank_offset);
  318. /* Disable Falling Edge detection */
  319. cos_enable_state &= ~BIT(bank_offset + 4);
  320. iowrite8(cos_enable_state, &idio24gpio->reg->cos_enable);
  321. }
  322. raw_spin_unlock_irqrestore(&idio24gpio->lock, flags);
  323. }
  324. static void idio_24_irq_unmask(struct irq_data *data)
  325. {
  326. struct gpio_chip *const chip = irq_data_get_irq_chip_data(data);
  327. struct idio_24_gpio *const idio24gpio = gpiochip_get_data(chip);
  328. unsigned long flags;
  329. unsigned char prev_irq_mask;
  330. const unsigned long bit_offset = irqd_to_hwirq(data) - 24;
  331. const unsigned long bank_offset = bit_offset/8 * 8;
  332. unsigned char cos_enable_state;
  333. raw_spin_lock_irqsave(&idio24gpio->lock, flags);
  334. prev_irq_mask = idio24gpio->irq_mask >> bank_offset;
  335. idio24gpio->irq_mask |= BIT(bit_offset);
  336. if (!prev_irq_mask) {
  337. cos_enable_state = ioread8(&idio24gpio->reg->cos_enable);
  338. /* Enable Rising Edge detection */
  339. cos_enable_state |= BIT(bank_offset);
  340. /* Enable Falling Edge detection */
  341. cos_enable_state |= BIT(bank_offset + 4);
  342. iowrite8(cos_enable_state, &idio24gpio->reg->cos_enable);
  343. }
  344. raw_spin_unlock_irqrestore(&idio24gpio->lock, flags);
  345. }
  346. static int idio_24_irq_set_type(struct irq_data *data, unsigned int flow_type)
  347. {
  348. /* The only valid irq types are none and both-edges */
  349. if (flow_type != IRQ_TYPE_NONE &&
  350. (flow_type & IRQ_TYPE_EDGE_BOTH) != IRQ_TYPE_EDGE_BOTH)
  351. return -EINVAL;
  352. return 0;
  353. }
  354. static struct irq_chip idio_24_irqchip = {
  355. .name = "pcie-idio-24",
  356. .irq_ack = idio_24_irq_ack,
  357. .irq_mask = idio_24_irq_mask,
  358. .irq_unmask = idio_24_irq_unmask,
  359. .irq_set_type = idio_24_irq_set_type
  360. };
  361. static irqreturn_t idio_24_irq_handler(int irq, void *dev_id)
  362. {
  363. struct idio_24_gpio *const idio24gpio = dev_id;
  364. unsigned long irq_status;
  365. struct gpio_chip *const chip = &idio24gpio->chip;
  366. unsigned long irq_mask;
  367. int gpio;
  368. raw_spin_lock(&idio24gpio->lock);
  369. /* Read Change-Of-State status */
  370. irq_status = ioread32(&idio24gpio->reg->cos0_7);
  371. raw_spin_unlock(&idio24gpio->lock);
  372. /* Make sure our device generated IRQ */
  373. if (!irq_status)
  374. return IRQ_NONE;
  375. /* Handle only unmasked IRQ */
  376. irq_mask = idio24gpio->irq_mask & irq_status;
  377. for_each_set_bit(gpio, &irq_mask, chip->ngpio - 24)
  378. generic_handle_irq(irq_find_mapping(chip->irq.domain,
  379. gpio + 24));
  380. raw_spin_lock(&idio24gpio->lock);
  381. /* Clear Change-Of-State status */
  382. iowrite32(irq_status, &idio24gpio->reg->cos0_7);
  383. raw_spin_unlock(&idio24gpio->lock);
  384. return IRQ_HANDLED;
  385. }
  386. #define IDIO_24_NGPIO 56
  387. static const char *idio_24_names[IDIO_24_NGPIO] = {
  388. "OUT0", "OUT1", "OUT2", "OUT3", "OUT4", "OUT5", "OUT6", "OUT7",
  389. "OUT8", "OUT9", "OUT10", "OUT11", "OUT12", "OUT13", "OUT14", "OUT15",
  390. "OUT16", "OUT17", "OUT18", "OUT19", "OUT20", "OUT21", "OUT22", "OUT23",
  391. "IIN0", "IIN1", "IIN2", "IIN3", "IIN4", "IIN5", "IIN6", "IIN7",
  392. "IIN8", "IIN9", "IIN10", "IIN11", "IIN12", "IIN13", "IIN14", "IIN15",
  393. "IIN16", "IIN17", "IIN18", "IIN19", "IIN20", "IIN21", "IIN22", "IIN23",
  394. "TTL0", "TTL1", "TTL2", "TTL3", "TTL4", "TTL5", "TTL6", "TTL7"
  395. };
  396. static int idio_24_probe(struct pci_dev *pdev, const struct pci_device_id *id)
  397. {
  398. struct device *const dev = &pdev->dev;
  399. struct idio_24_gpio *idio24gpio;
  400. int err;
  401. const size_t pci_bar_index = 2;
  402. const char *const name = pci_name(pdev);
  403. idio24gpio = devm_kzalloc(dev, sizeof(*idio24gpio), GFP_KERNEL);
  404. if (!idio24gpio)
  405. return -ENOMEM;
  406. err = pcim_enable_device(pdev);
  407. if (err) {
  408. dev_err(dev, "Failed to enable PCI device (%d)\n", err);
  409. return err;
  410. }
  411. err = pcim_iomap_regions(pdev, BIT(pci_bar_index), name);
  412. if (err) {
  413. dev_err(dev, "Unable to map PCI I/O addresses (%d)\n", err);
  414. return err;
  415. }
  416. idio24gpio->reg = pcim_iomap_table(pdev)[pci_bar_index];
  417. idio24gpio->chip.label = name;
  418. idio24gpio->chip.parent = dev;
  419. idio24gpio->chip.owner = THIS_MODULE;
  420. idio24gpio->chip.base = -1;
  421. idio24gpio->chip.ngpio = IDIO_24_NGPIO;
  422. idio24gpio->chip.names = idio_24_names;
  423. idio24gpio->chip.get_direction = idio_24_gpio_get_direction;
  424. idio24gpio->chip.direction_input = idio_24_gpio_direction_input;
  425. idio24gpio->chip.direction_output = idio_24_gpio_direction_output;
  426. idio24gpio->chip.get = idio_24_gpio_get;
  427. idio24gpio->chip.get_multiple = idio_24_gpio_get_multiple;
  428. idio24gpio->chip.set = idio_24_gpio_set;
  429. idio24gpio->chip.set_multiple = idio_24_gpio_set_multiple;
  430. raw_spin_lock_init(&idio24gpio->lock);
  431. /* Software board reset */
  432. iowrite8(0, &idio24gpio->reg->soft_reset);
  433. err = devm_gpiochip_add_data(dev, &idio24gpio->chip, idio24gpio);
  434. if (err) {
  435. dev_err(dev, "GPIO registering failed (%d)\n", err);
  436. return err;
  437. }
  438. err = gpiochip_irqchip_add(&idio24gpio->chip, &idio_24_irqchip, 0,
  439. handle_edge_irq, IRQ_TYPE_NONE);
  440. if (err) {
  441. dev_err(dev, "Could not add irqchip (%d)\n", err);
  442. return err;
  443. }
  444. err = devm_request_irq(dev, pdev->irq, idio_24_irq_handler, IRQF_SHARED,
  445. name, idio24gpio);
  446. if (err) {
  447. dev_err(dev, "IRQ handler registering failed (%d)\n", err);
  448. return err;
  449. }
  450. return 0;
  451. }
  452. static const struct pci_device_id idio_24_pci_dev_id[] = {
  453. { PCI_DEVICE(0x494F, 0x0FD0) }, { PCI_DEVICE(0x494F, 0x0BD0) },
  454. { PCI_DEVICE(0x494F, 0x07D0) }, { PCI_DEVICE(0x494F, 0x0FC0) },
  455. { 0 }
  456. };
  457. MODULE_DEVICE_TABLE(pci, idio_24_pci_dev_id);
  458. static struct pci_driver idio_24_driver = {
  459. .name = "pcie-idio-24",
  460. .id_table = idio_24_pci_dev_id,
  461. .probe = idio_24_probe
  462. };
  463. module_pci_driver(idio_24_driver);
  464. MODULE_AUTHOR("William Breathitt Gray <vilhelm.gray@gmail.com>");
  465. MODULE_DESCRIPTION("ACCES PCIe-IDIO-24 GPIO driver");
  466. MODULE_LICENSE("GPL v2");