gpio-rcar.c 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611
  1. /*
  2. * Renesas R-Car GPIO Support
  3. *
  4. * Copyright (C) 2014 Renesas Electronics Corporation
  5. * Copyright (C) 2013 Magnus Damm
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation; either version 2 of the License
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. */
  16. #include <linux/err.h>
  17. #include <linux/gpio/driver.h>
  18. #include <linux/init.h>
  19. #include <linux/interrupt.h>
  20. #include <linux/io.h>
  21. #include <linux/ioport.h>
  22. #include <linux/irq.h>
  23. #include <linux/module.h>
  24. #include <linux/of.h>
  25. #include <linux/of_device.h>
  26. #include <linux/pinctrl/consumer.h>
  27. #include <linux/platform_device.h>
  28. #include <linux/pm_runtime.h>
  29. #include <linux/spinlock.h>
  30. #include <linux/slab.h>
  31. struct gpio_rcar_bank_info {
  32. u32 iointsel;
  33. u32 inoutsel;
  34. u32 outdt;
  35. u32 posneg;
  36. u32 edglevel;
  37. u32 bothedge;
  38. u32 intmsk;
  39. };
  40. struct gpio_rcar_priv {
  41. void __iomem *base;
  42. spinlock_t lock;
  43. struct platform_device *pdev;
  44. struct gpio_chip gpio_chip;
  45. struct irq_chip irq_chip;
  46. unsigned int irq_parent;
  47. atomic_t wakeup_path;
  48. bool has_both_edge_trigger;
  49. struct gpio_rcar_bank_info bank_info;
  50. };
  51. #define IOINTSEL 0x00 /* General IO/Interrupt Switching Register */
  52. #define INOUTSEL 0x04 /* General Input/Output Switching Register */
  53. #define OUTDT 0x08 /* General Output Register */
  54. #define INDT 0x0c /* General Input Register */
  55. #define INTDT 0x10 /* Interrupt Display Register */
  56. #define INTCLR 0x14 /* Interrupt Clear Register */
  57. #define INTMSK 0x18 /* Interrupt Mask Register */
  58. #define MSKCLR 0x1c /* Interrupt Mask Clear Register */
  59. #define POSNEG 0x20 /* Positive/Negative Logic Select Register */
  60. #define EDGLEVEL 0x24 /* Edge/level Select Register */
  61. #define FILONOFF 0x28 /* Chattering Prevention On/Off Register */
  62. #define BOTHEDGE 0x4c /* One Edge/Both Edge Select Register */
  63. #define RCAR_MAX_GPIO_PER_BANK 32
  64. static inline u32 gpio_rcar_read(struct gpio_rcar_priv *p, int offs)
  65. {
  66. return ioread32(p->base + offs);
  67. }
  68. static inline void gpio_rcar_write(struct gpio_rcar_priv *p, int offs,
  69. u32 value)
  70. {
  71. iowrite32(value, p->base + offs);
  72. }
  73. static void gpio_rcar_modify_bit(struct gpio_rcar_priv *p, int offs,
  74. int bit, bool value)
  75. {
  76. u32 tmp = gpio_rcar_read(p, offs);
  77. if (value)
  78. tmp |= BIT(bit);
  79. else
  80. tmp &= ~BIT(bit);
  81. gpio_rcar_write(p, offs, tmp);
  82. }
  83. static void gpio_rcar_irq_disable(struct irq_data *d)
  84. {
  85. struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
  86. struct gpio_rcar_priv *p = gpiochip_get_data(gc);
  87. gpio_rcar_write(p, INTMSK, ~BIT(irqd_to_hwirq(d)));
  88. }
  89. static void gpio_rcar_irq_enable(struct irq_data *d)
  90. {
  91. struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
  92. struct gpio_rcar_priv *p = gpiochip_get_data(gc);
  93. gpio_rcar_write(p, MSKCLR, BIT(irqd_to_hwirq(d)));
  94. }
  95. static void gpio_rcar_config_interrupt_input_mode(struct gpio_rcar_priv *p,
  96. unsigned int hwirq,
  97. bool active_high_rising_edge,
  98. bool level_trigger,
  99. bool both)
  100. {
  101. unsigned long flags;
  102. /* follow steps in the GPIO documentation for
  103. * "Setting Edge-Sensitive Interrupt Input Mode" and
  104. * "Setting Level-Sensitive Interrupt Input Mode"
  105. */
  106. spin_lock_irqsave(&p->lock, flags);
  107. /* Configure postive or negative logic in POSNEG */
  108. gpio_rcar_modify_bit(p, POSNEG, hwirq, !active_high_rising_edge);
  109. /* Configure edge or level trigger in EDGLEVEL */
  110. gpio_rcar_modify_bit(p, EDGLEVEL, hwirq, !level_trigger);
  111. /* Select one edge or both edges in BOTHEDGE */
  112. if (p->has_both_edge_trigger)
  113. gpio_rcar_modify_bit(p, BOTHEDGE, hwirq, both);
  114. /* Select "Interrupt Input Mode" in IOINTSEL */
  115. gpio_rcar_modify_bit(p, IOINTSEL, hwirq, true);
  116. /* Write INTCLR in case of edge trigger */
  117. if (!level_trigger)
  118. gpio_rcar_write(p, INTCLR, BIT(hwirq));
  119. spin_unlock_irqrestore(&p->lock, flags);
  120. }
  121. static int gpio_rcar_irq_set_type(struct irq_data *d, unsigned int type)
  122. {
  123. struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
  124. struct gpio_rcar_priv *p = gpiochip_get_data(gc);
  125. unsigned int hwirq = irqd_to_hwirq(d);
  126. dev_dbg(&p->pdev->dev, "sense irq = %d, type = %d\n", hwirq, type);
  127. switch (type & IRQ_TYPE_SENSE_MASK) {
  128. case IRQ_TYPE_LEVEL_HIGH:
  129. gpio_rcar_config_interrupt_input_mode(p, hwirq, true, true,
  130. false);
  131. break;
  132. case IRQ_TYPE_LEVEL_LOW:
  133. gpio_rcar_config_interrupt_input_mode(p, hwirq, false, true,
  134. false);
  135. break;
  136. case IRQ_TYPE_EDGE_RISING:
  137. gpio_rcar_config_interrupt_input_mode(p, hwirq, true, false,
  138. false);
  139. break;
  140. case IRQ_TYPE_EDGE_FALLING:
  141. gpio_rcar_config_interrupt_input_mode(p, hwirq, false, false,
  142. false);
  143. break;
  144. case IRQ_TYPE_EDGE_BOTH:
  145. if (!p->has_both_edge_trigger)
  146. return -EINVAL;
  147. gpio_rcar_config_interrupt_input_mode(p, hwirq, true, false,
  148. true);
  149. break;
  150. default:
  151. return -EINVAL;
  152. }
  153. return 0;
  154. }
  155. static int gpio_rcar_irq_set_wake(struct irq_data *d, unsigned int on)
  156. {
  157. struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
  158. struct gpio_rcar_priv *p = gpiochip_get_data(gc);
  159. int error;
  160. if (p->irq_parent) {
  161. error = irq_set_irq_wake(p->irq_parent, on);
  162. if (error) {
  163. dev_dbg(&p->pdev->dev,
  164. "irq %u doesn't support irq_set_wake\n",
  165. p->irq_parent);
  166. p->irq_parent = 0;
  167. }
  168. }
  169. if (on)
  170. atomic_inc(&p->wakeup_path);
  171. else
  172. atomic_dec(&p->wakeup_path);
  173. return 0;
  174. }
  175. static irqreturn_t gpio_rcar_irq_handler(int irq, void *dev_id)
  176. {
  177. struct gpio_rcar_priv *p = dev_id;
  178. u32 pending;
  179. unsigned int offset, irqs_handled = 0;
  180. while ((pending = gpio_rcar_read(p, INTDT) &
  181. gpio_rcar_read(p, INTMSK))) {
  182. offset = __ffs(pending);
  183. gpio_rcar_write(p, INTCLR, BIT(offset));
  184. generic_handle_irq(irq_find_mapping(p->gpio_chip.irq.domain,
  185. offset));
  186. irqs_handled++;
  187. }
  188. return irqs_handled ? IRQ_HANDLED : IRQ_NONE;
  189. }
  190. static void gpio_rcar_config_general_input_output_mode(struct gpio_chip *chip,
  191. unsigned int gpio,
  192. bool output)
  193. {
  194. struct gpio_rcar_priv *p = gpiochip_get_data(chip);
  195. unsigned long flags;
  196. /* follow steps in the GPIO documentation for
  197. * "Setting General Output Mode" and
  198. * "Setting General Input Mode"
  199. */
  200. spin_lock_irqsave(&p->lock, flags);
  201. /* Configure postive logic in POSNEG */
  202. gpio_rcar_modify_bit(p, POSNEG, gpio, false);
  203. /* Select "General Input/Output Mode" in IOINTSEL */
  204. gpio_rcar_modify_bit(p, IOINTSEL, gpio, false);
  205. /* Select Input Mode or Output Mode in INOUTSEL */
  206. gpio_rcar_modify_bit(p, INOUTSEL, gpio, output);
  207. spin_unlock_irqrestore(&p->lock, flags);
  208. }
  209. static int gpio_rcar_request(struct gpio_chip *chip, unsigned offset)
  210. {
  211. struct gpio_rcar_priv *p = gpiochip_get_data(chip);
  212. int error;
  213. error = pm_runtime_get_sync(&p->pdev->dev);
  214. if (error < 0)
  215. return error;
  216. error = pinctrl_gpio_request(chip->base + offset);
  217. if (error)
  218. pm_runtime_put(&p->pdev->dev);
  219. return error;
  220. }
  221. static void gpio_rcar_free(struct gpio_chip *chip, unsigned offset)
  222. {
  223. struct gpio_rcar_priv *p = gpiochip_get_data(chip);
  224. pinctrl_gpio_free(chip->base + offset);
  225. /*
  226. * Set the GPIO as an input to ensure that the next GPIO request won't
  227. * drive the GPIO pin as an output.
  228. */
  229. gpio_rcar_config_general_input_output_mode(chip, offset, false);
  230. pm_runtime_put(&p->pdev->dev);
  231. }
  232. static int gpio_rcar_get_direction(struct gpio_chip *chip, unsigned int offset)
  233. {
  234. struct gpio_rcar_priv *p = gpiochip_get_data(chip);
  235. return !(gpio_rcar_read(p, INOUTSEL) & BIT(offset));
  236. }
  237. static int gpio_rcar_direction_input(struct gpio_chip *chip, unsigned offset)
  238. {
  239. gpio_rcar_config_general_input_output_mode(chip, offset, false);
  240. return 0;
  241. }
  242. static int gpio_rcar_get(struct gpio_chip *chip, unsigned offset)
  243. {
  244. u32 bit = BIT(offset);
  245. /* testing on r8a7790 shows that INDT does not show correct pin state
  246. * when configured as output, so use OUTDT in case of output pins */
  247. if (gpio_rcar_read(gpiochip_get_data(chip), INOUTSEL) & bit)
  248. return !!(gpio_rcar_read(gpiochip_get_data(chip), OUTDT) & bit);
  249. else
  250. return !!(gpio_rcar_read(gpiochip_get_data(chip), INDT) & bit);
  251. }
  252. static void gpio_rcar_set(struct gpio_chip *chip, unsigned offset, int value)
  253. {
  254. struct gpio_rcar_priv *p = gpiochip_get_data(chip);
  255. unsigned long flags;
  256. spin_lock_irqsave(&p->lock, flags);
  257. gpio_rcar_modify_bit(p, OUTDT, offset, value);
  258. spin_unlock_irqrestore(&p->lock, flags);
  259. }
  260. static void gpio_rcar_set_multiple(struct gpio_chip *chip, unsigned long *mask,
  261. unsigned long *bits)
  262. {
  263. struct gpio_rcar_priv *p = gpiochip_get_data(chip);
  264. unsigned long flags;
  265. u32 val, bankmask;
  266. bankmask = mask[0] & GENMASK(chip->ngpio - 1, 0);
  267. if (chip->valid_mask)
  268. bankmask &= chip->valid_mask[0];
  269. if (!bankmask)
  270. return;
  271. spin_lock_irqsave(&p->lock, flags);
  272. val = gpio_rcar_read(p, OUTDT);
  273. val &= ~bankmask;
  274. val |= (bankmask & bits[0]);
  275. gpio_rcar_write(p, OUTDT, val);
  276. spin_unlock_irqrestore(&p->lock, flags);
  277. }
  278. static int gpio_rcar_direction_output(struct gpio_chip *chip, unsigned offset,
  279. int value)
  280. {
  281. /* write GPIO value to output before selecting output mode of pin */
  282. gpio_rcar_set(chip, offset, value);
  283. gpio_rcar_config_general_input_output_mode(chip, offset, true);
  284. return 0;
  285. }
  286. struct gpio_rcar_info {
  287. bool has_both_edge_trigger;
  288. };
  289. static const struct gpio_rcar_info gpio_rcar_info_gen1 = {
  290. .has_both_edge_trigger = false,
  291. };
  292. static const struct gpio_rcar_info gpio_rcar_info_gen2 = {
  293. .has_both_edge_trigger = true,
  294. };
  295. static const struct of_device_id gpio_rcar_of_table[] = {
  296. {
  297. .compatible = "renesas,gpio-r8a7743",
  298. /* RZ/G1 GPIO is identical to R-Car Gen2. */
  299. .data = &gpio_rcar_info_gen2,
  300. }, {
  301. .compatible = "renesas,gpio-r8a7790",
  302. .data = &gpio_rcar_info_gen2,
  303. }, {
  304. .compatible = "renesas,gpio-r8a7791",
  305. .data = &gpio_rcar_info_gen2,
  306. }, {
  307. .compatible = "renesas,gpio-r8a7792",
  308. .data = &gpio_rcar_info_gen2,
  309. }, {
  310. .compatible = "renesas,gpio-r8a7793",
  311. .data = &gpio_rcar_info_gen2,
  312. }, {
  313. .compatible = "renesas,gpio-r8a7794",
  314. .data = &gpio_rcar_info_gen2,
  315. }, {
  316. .compatible = "renesas,gpio-r8a7795",
  317. /* Gen3 GPIO is identical to Gen2. */
  318. .data = &gpio_rcar_info_gen2,
  319. }, {
  320. .compatible = "renesas,gpio-r8a7796",
  321. /* Gen3 GPIO is identical to Gen2. */
  322. .data = &gpio_rcar_info_gen2,
  323. }, {
  324. .compatible = "renesas,rcar-gen1-gpio",
  325. .data = &gpio_rcar_info_gen1,
  326. }, {
  327. .compatible = "renesas,rcar-gen2-gpio",
  328. .data = &gpio_rcar_info_gen2,
  329. }, {
  330. .compatible = "renesas,rcar-gen3-gpio",
  331. /* Gen3 GPIO is identical to Gen2. */
  332. .data = &gpio_rcar_info_gen2,
  333. }, {
  334. .compatible = "renesas,gpio-rcar",
  335. .data = &gpio_rcar_info_gen1,
  336. }, {
  337. /* Terminator */
  338. },
  339. };
  340. MODULE_DEVICE_TABLE(of, gpio_rcar_of_table);
  341. static int gpio_rcar_parse_dt(struct gpio_rcar_priv *p, unsigned int *npins)
  342. {
  343. struct device_node *np = p->pdev->dev.of_node;
  344. const struct gpio_rcar_info *info;
  345. struct of_phandle_args args;
  346. int ret;
  347. info = of_device_get_match_data(&p->pdev->dev);
  348. ret = of_parse_phandle_with_fixed_args(np, "gpio-ranges", 3, 0, &args);
  349. *npins = ret == 0 ? args.args[2] : RCAR_MAX_GPIO_PER_BANK;
  350. p->has_both_edge_trigger = info->has_both_edge_trigger;
  351. if (*npins == 0 || *npins > RCAR_MAX_GPIO_PER_BANK) {
  352. dev_warn(&p->pdev->dev,
  353. "Invalid number of gpio lines %u, using %u\n", *npins,
  354. RCAR_MAX_GPIO_PER_BANK);
  355. *npins = RCAR_MAX_GPIO_PER_BANK;
  356. }
  357. return 0;
  358. }
  359. static int gpio_rcar_probe(struct platform_device *pdev)
  360. {
  361. struct gpio_rcar_priv *p;
  362. struct resource *io, *irq;
  363. struct gpio_chip *gpio_chip;
  364. struct irq_chip *irq_chip;
  365. struct device *dev = &pdev->dev;
  366. const char *name = dev_name(dev);
  367. unsigned int npins;
  368. int ret;
  369. p = devm_kzalloc(dev, sizeof(*p), GFP_KERNEL);
  370. if (!p)
  371. return -ENOMEM;
  372. p->pdev = pdev;
  373. spin_lock_init(&p->lock);
  374. /* Get device configuration from DT node */
  375. ret = gpio_rcar_parse_dt(p, &npins);
  376. if (ret < 0)
  377. return ret;
  378. platform_set_drvdata(pdev, p);
  379. pm_runtime_enable(dev);
  380. irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
  381. if (!irq) {
  382. dev_err(dev, "missing IRQ\n");
  383. ret = -EINVAL;
  384. goto err0;
  385. }
  386. io = platform_get_resource(pdev, IORESOURCE_MEM, 0);
  387. p->base = devm_ioremap_resource(dev, io);
  388. if (IS_ERR(p->base)) {
  389. ret = PTR_ERR(p->base);
  390. goto err0;
  391. }
  392. gpio_chip = &p->gpio_chip;
  393. gpio_chip->request = gpio_rcar_request;
  394. gpio_chip->free = gpio_rcar_free;
  395. gpio_chip->get_direction = gpio_rcar_get_direction;
  396. gpio_chip->direction_input = gpio_rcar_direction_input;
  397. gpio_chip->get = gpio_rcar_get;
  398. gpio_chip->direction_output = gpio_rcar_direction_output;
  399. gpio_chip->set = gpio_rcar_set;
  400. gpio_chip->set_multiple = gpio_rcar_set_multiple;
  401. gpio_chip->label = name;
  402. gpio_chip->parent = dev;
  403. gpio_chip->owner = THIS_MODULE;
  404. gpio_chip->base = -1;
  405. gpio_chip->ngpio = npins;
  406. irq_chip = &p->irq_chip;
  407. irq_chip->name = name;
  408. irq_chip->parent_device = dev;
  409. irq_chip->irq_mask = gpio_rcar_irq_disable;
  410. irq_chip->irq_unmask = gpio_rcar_irq_enable;
  411. irq_chip->irq_set_type = gpio_rcar_irq_set_type;
  412. irq_chip->irq_set_wake = gpio_rcar_irq_set_wake;
  413. irq_chip->flags = IRQCHIP_SET_TYPE_MASKED | IRQCHIP_MASK_ON_SUSPEND;
  414. ret = gpiochip_add_data(gpio_chip, p);
  415. if (ret) {
  416. dev_err(dev, "failed to add GPIO controller\n");
  417. goto err0;
  418. }
  419. ret = gpiochip_irqchip_add(gpio_chip, irq_chip, 0, handle_level_irq,
  420. IRQ_TYPE_NONE);
  421. if (ret) {
  422. dev_err(dev, "cannot add irqchip\n");
  423. goto err1;
  424. }
  425. p->irq_parent = irq->start;
  426. if (devm_request_irq(dev, irq->start, gpio_rcar_irq_handler,
  427. IRQF_SHARED, name, p)) {
  428. dev_err(dev, "failed to request IRQ\n");
  429. ret = -ENOENT;
  430. goto err1;
  431. }
  432. dev_info(dev, "driving %d GPIOs\n", npins);
  433. return 0;
  434. err1:
  435. gpiochip_remove(gpio_chip);
  436. err0:
  437. pm_runtime_disable(dev);
  438. return ret;
  439. }
  440. static int gpio_rcar_remove(struct platform_device *pdev)
  441. {
  442. struct gpio_rcar_priv *p = platform_get_drvdata(pdev);
  443. gpiochip_remove(&p->gpio_chip);
  444. pm_runtime_disable(&pdev->dev);
  445. return 0;
  446. }
  447. #ifdef CONFIG_PM_SLEEP
  448. static int gpio_rcar_suspend(struct device *dev)
  449. {
  450. struct gpio_rcar_priv *p = dev_get_drvdata(dev);
  451. p->bank_info.iointsel = gpio_rcar_read(p, IOINTSEL);
  452. p->bank_info.inoutsel = gpio_rcar_read(p, INOUTSEL);
  453. p->bank_info.outdt = gpio_rcar_read(p, OUTDT);
  454. p->bank_info.intmsk = gpio_rcar_read(p, INTMSK);
  455. p->bank_info.posneg = gpio_rcar_read(p, POSNEG);
  456. p->bank_info.edglevel = gpio_rcar_read(p, EDGLEVEL);
  457. if (p->has_both_edge_trigger)
  458. p->bank_info.bothedge = gpio_rcar_read(p, BOTHEDGE);
  459. if (atomic_read(&p->wakeup_path))
  460. device_set_wakeup_path(dev);
  461. return 0;
  462. }
  463. static int gpio_rcar_resume(struct device *dev)
  464. {
  465. struct gpio_rcar_priv *p = dev_get_drvdata(dev);
  466. unsigned int offset;
  467. u32 mask;
  468. for (offset = 0; offset < p->gpio_chip.ngpio; offset++) {
  469. if (!gpiochip_line_is_valid(&p->gpio_chip, offset))
  470. continue;
  471. mask = BIT(offset);
  472. /* I/O pin */
  473. if (!(p->bank_info.iointsel & mask)) {
  474. if (p->bank_info.inoutsel & mask)
  475. gpio_rcar_direction_output(
  476. &p->gpio_chip, offset,
  477. !!(p->bank_info.outdt & mask));
  478. else
  479. gpio_rcar_direction_input(&p->gpio_chip,
  480. offset);
  481. } else {
  482. /* Interrupt pin */
  483. gpio_rcar_config_interrupt_input_mode(
  484. p,
  485. offset,
  486. !(p->bank_info.posneg & mask),
  487. !(p->bank_info.edglevel & mask),
  488. !!(p->bank_info.bothedge & mask));
  489. if (p->bank_info.intmsk & mask)
  490. gpio_rcar_write(p, MSKCLR, mask);
  491. }
  492. }
  493. return 0;
  494. }
  495. #endif /* CONFIG_PM_SLEEP*/
  496. static SIMPLE_DEV_PM_OPS(gpio_rcar_pm_ops, gpio_rcar_suspend, gpio_rcar_resume);
  497. static struct platform_driver gpio_rcar_device_driver = {
  498. .probe = gpio_rcar_probe,
  499. .remove = gpio_rcar_remove,
  500. .driver = {
  501. .name = "gpio_rcar",
  502. .pm = &gpio_rcar_pm_ops,
  503. .of_match_table = of_match_ptr(gpio_rcar_of_table),
  504. }
  505. };
  506. module_platform_driver(gpio_rcar_device_driver);
  507. MODULE_AUTHOR("Magnus Damm");
  508. MODULE_DESCRIPTION("Renesas R-Car GPIO Driver");
  509. MODULE_LICENSE("GPL v2");