sh_mipi_dsi.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593
  1. /*
  2. * Renesas SH-mobile MIPI DSI support
  3. *
  4. * Copyright (C) 2010 Guennadi Liakhovetski <g.liakhovetski@gmx.de>
  5. *
  6. * This is free software; you can redistribute it and/or modify
  7. * it under the terms of version 2 of the GNU General Public License as
  8. * published by the Free Software Foundation.
  9. */
  10. #include <linux/bitmap.h>
  11. #include <linux/clk.h>
  12. #include <linux/delay.h>
  13. #include <linux/init.h>
  14. #include <linux/io.h>
  15. #include <linux/platform_device.h>
  16. #include <linux/pm_runtime.h>
  17. #include <linux/slab.h>
  18. #include <linux/string.h>
  19. #include <linux/types.h>
  20. #include <linux/module.h>
  21. #include <video/mipi_display.h>
  22. #include <video/sh_mipi_dsi.h>
  23. #include <video/sh_mobile_lcdc.h>
  24. #define SYSCTRL 0x0000
  25. #define SYSCONF 0x0004
  26. #define TIMSET 0x0008
  27. #define RESREQSET0 0x0018
  28. #define RESREQSET1 0x001c
  29. #define HSTTOVSET 0x0020
  30. #define LPRTOVSET 0x0024
  31. #define TATOVSET 0x0028
  32. #define PRTOVSET 0x002c
  33. #define DSICTRL 0x0030
  34. #define DSIINTE 0x0060
  35. #define PHYCTRL 0x0070
  36. /* relative to linkbase */
  37. #define DTCTR 0x0000
  38. #define VMCTR1 0x0020
  39. #define VMCTR2 0x0024
  40. #define VMLEN1 0x0028
  41. #define CMTSRTREQ 0x0070
  42. #define CMTSRTCTR 0x00d0
  43. /* E.g., sh7372 has 2 MIPI-DSIs - one for each LCDC */
  44. #define MAX_SH_MIPI_DSI 2
  45. struct sh_mipi {
  46. void __iomem *base;
  47. void __iomem *linkbase;
  48. struct clk *dsit_clk;
  49. struct clk *dsip_clk;
  50. struct device *dev;
  51. void *next_board_data;
  52. void (*next_display_on)(void *board_data, struct fb_info *info);
  53. void (*next_display_off)(void *board_data);
  54. };
  55. static struct sh_mipi *mipi_dsi[MAX_SH_MIPI_DSI];
  56. /* Protect the above array */
  57. static DEFINE_MUTEX(array_lock);
  58. static struct sh_mipi *sh_mipi_by_handle(int handle)
  59. {
  60. if (handle >= ARRAY_SIZE(mipi_dsi) || handle < 0)
  61. return NULL;
  62. return mipi_dsi[handle];
  63. }
  64. static int sh_mipi_send_short(struct sh_mipi *mipi, u8 dsi_cmd,
  65. u8 cmd, u8 param)
  66. {
  67. u32 data = (dsi_cmd << 24) | (cmd << 16) | (param << 8);
  68. int cnt = 100;
  69. /* transmit a short packet to LCD panel */
  70. iowrite32(1 | data, mipi->linkbase + CMTSRTCTR);
  71. iowrite32(1, mipi->linkbase + CMTSRTREQ);
  72. while ((ioread32(mipi->linkbase + CMTSRTREQ) & 1) && --cnt)
  73. udelay(1);
  74. return cnt ? 0 : -ETIMEDOUT;
  75. }
  76. #define LCD_CHAN2MIPI(c) ((c) < LCDC_CHAN_MAINLCD || (c) > LCDC_CHAN_SUBLCD ? \
  77. -EINVAL : (c) - 1)
  78. static int sh_mipi_dcs(int handle, u8 cmd)
  79. {
  80. struct sh_mipi *mipi = sh_mipi_by_handle(LCD_CHAN2MIPI(handle));
  81. if (!mipi)
  82. return -ENODEV;
  83. return sh_mipi_send_short(mipi, MIPI_DSI_DCS_SHORT_WRITE, cmd, 0);
  84. }
  85. static int sh_mipi_dcs_param(int handle, u8 cmd, u8 param)
  86. {
  87. struct sh_mipi *mipi = sh_mipi_by_handle(LCD_CHAN2MIPI(handle));
  88. if (!mipi)
  89. return -ENODEV;
  90. return sh_mipi_send_short(mipi, MIPI_DSI_DCS_SHORT_WRITE_PARAM, cmd,
  91. param);
  92. }
  93. static void sh_mipi_dsi_enable(struct sh_mipi *mipi, bool enable)
  94. {
  95. /*
  96. * enable LCDC data tx, transition to LPS after completion of each HS
  97. * packet
  98. */
  99. iowrite32(0x00000002 | enable, mipi->linkbase + DTCTR);
  100. }
  101. static void sh_mipi_shutdown(struct platform_device *pdev)
  102. {
  103. struct sh_mipi *mipi = platform_get_drvdata(pdev);
  104. sh_mipi_dsi_enable(mipi, false);
  105. }
  106. static void mipi_display_on(void *arg, struct fb_info *info)
  107. {
  108. struct sh_mipi *mipi = arg;
  109. pm_runtime_get_sync(mipi->dev);
  110. sh_mipi_dsi_enable(mipi, true);
  111. if (mipi->next_display_on)
  112. mipi->next_display_on(mipi->next_board_data, info);
  113. }
  114. static void mipi_display_off(void *arg)
  115. {
  116. struct sh_mipi *mipi = arg;
  117. if (mipi->next_display_off)
  118. mipi->next_display_off(mipi->next_board_data);
  119. sh_mipi_dsi_enable(mipi, false);
  120. pm_runtime_put(mipi->dev);
  121. }
  122. static int __init sh_mipi_setup(struct sh_mipi *mipi,
  123. struct sh_mipi_dsi_info *pdata)
  124. {
  125. void __iomem *base = mipi->base;
  126. struct sh_mobile_lcdc_chan_cfg *ch = pdata->lcd_chan;
  127. u32 pctype, datatype, pixfmt, linelength, vmctr2 = 0x00e00000;
  128. bool yuv;
  129. u32 tmp;
  130. /*
  131. * Select data format. MIPI DSI is not hot-pluggable, so, we just use
  132. * the default videomode. If this ever becomes a problem, We'll have to
  133. * move this to mipi_display_on() above and use info->var.xres
  134. */
  135. switch (pdata->data_format) {
  136. case MIPI_RGB888:
  137. pctype = 0;
  138. datatype = MIPI_DSI_PACKED_PIXEL_STREAM_24;
  139. pixfmt = MIPI_DCS_PIXEL_FMT_24BIT;
  140. linelength = ch->lcd_cfg[0].xres * 3;
  141. yuv = false;
  142. break;
  143. case MIPI_RGB565:
  144. pctype = 1;
  145. datatype = MIPI_DSI_PACKED_PIXEL_STREAM_16;
  146. pixfmt = MIPI_DCS_PIXEL_FMT_16BIT;
  147. linelength = ch->lcd_cfg[0].xres * 2;
  148. yuv = false;
  149. break;
  150. case MIPI_RGB666_LP:
  151. pctype = 2;
  152. datatype = MIPI_DSI_PIXEL_STREAM_3BYTE_18;
  153. pixfmt = MIPI_DCS_PIXEL_FMT_24BIT;
  154. linelength = ch->lcd_cfg[0].xres * 3;
  155. yuv = false;
  156. break;
  157. case MIPI_RGB666:
  158. pctype = 3;
  159. datatype = MIPI_DSI_PACKED_PIXEL_STREAM_18;
  160. pixfmt = MIPI_DCS_PIXEL_FMT_18BIT;
  161. linelength = (ch->lcd_cfg[0].xres * 18 + 7) / 8;
  162. yuv = false;
  163. break;
  164. case MIPI_BGR888:
  165. pctype = 8;
  166. datatype = MIPI_DSI_PACKED_PIXEL_STREAM_24;
  167. pixfmt = MIPI_DCS_PIXEL_FMT_24BIT;
  168. linelength = ch->lcd_cfg[0].xres * 3;
  169. yuv = false;
  170. break;
  171. case MIPI_BGR565:
  172. pctype = 9;
  173. datatype = MIPI_DSI_PACKED_PIXEL_STREAM_16;
  174. pixfmt = MIPI_DCS_PIXEL_FMT_16BIT;
  175. linelength = ch->lcd_cfg[0].xres * 2;
  176. yuv = false;
  177. break;
  178. case MIPI_BGR666_LP:
  179. pctype = 0xa;
  180. datatype = MIPI_DSI_PIXEL_STREAM_3BYTE_18;
  181. pixfmt = MIPI_DCS_PIXEL_FMT_24BIT;
  182. linelength = ch->lcd_cfg[0].xres * 3;
  183. yuv = false;
  184. break;
  185. case MIPI_BGR666:
  186. pctype = 0xb;
  187. datatype = MIPI_DSI_PACKED_PIXEL_STREAM_18;
  188. pixfmt = MIPI_DCS_PIXEL_FMT_18BIT;
  189. linelength = (ch->lcd_cfg[0].xres * 18 + 7) / 8;
  190. yuv = false;
  191. break;
  192. case MIPI_YUYV:
  193. pctype = 4;
  194. datatype = MIPI_DSI_PACKED_PIXEL_STREAM_YCBCR16;
  195. pixfmt = MIPI_DCS_PIXEL_FMT_16BIT;
  196. linelength = ch->lcd_cfg[0].xres * 2;
  197. yuv = true;
  198. break;
  199. case MIPI_UYVY:
  200. pctype = 5;
  201. datatype = MIPI_DSI_PACKED_PIXEL_STREAM_YCBCR16;
  202. pixfmt = MIPI_DCS_PIXEL_FMT_16BIT;
  203. linelength = ch->lcd_cfg[0].xres * 2;
  204. yuv = true;
  205. break;
  206. case MIPI_YUV420_L:
  207. pctype = 6;
  208. datatype = MIPI_DSI_PACKED_PIXEL_STREAM_YCBCR12;
  209. pixfmt = MIPI_DCS_PIXEL_FMT_12BIT;
  210. linelength = (ch->lcd_cfg[0].xres * 12 + 7) / 8;
  211. yuv = true;
  212. break;
  213. case MIPI_YUV420:
  214. pctype = 7;
  215. datatype = MIPI_DSI_PACKED_PIXEL_STREAM_YCBCR12;
  216. pixfmt = MIPI_DCS_PIXEL_FMT_12BIT;
  217. /* Length of U/V line */
  218. linelength = (ch->lcd_cfg[0].xres + 1) / 2;
  219. yuv = true;
  220. break;
  221. default:
  222. return -EINVAL;
  223. }
  224. if ((yuv && ch->interface_type != YUV422) ||
  225. (!yuv && ch->interface_type != RGB24))
  226. return -EINVAL;
  227. if (!pdata->lane)
  228. return -EINVAL;
  229. /* reset DSI link */
  230. iowrite32(0x00000001, base + SYSCTRL);
  231. /* Hold reset for 100 cycles of the slowest of bus, HS byte and LP clock */
  232. udelay(50);
  233. iowrite32(0x00000000, base + SYSCTRL);
  234. /* setup DSI link */
  235. /*
  236. * Default = ULPS enable |
  237. * Contention detection enabled |
  238. * EoT packet transmission enable |
  239. * CRC check enable |
  240. * ECC check enable
  241. * additionally enable first two lanes
  242. */
  243. bitmap_fill((unsigned long *)&tmp, pdata->lane);
  244. tmp |= 0x00003700;
  245. iowrite32(tmp, base + SYSCONF);
  246. /*
  247. * T_wakeup = 0x7000
  248. * T_hs-trail = 3
  249. * T_hs-prepare = 3
  250. * T_clk-trail = 3
  251. * T_clk-prepare = 2
  252. */
  253. iowrite32(0x70003332, base + TIMSET);
  254. /* no responses requested */
  255. iowrite32(0x00000000, base + RESREQSET0);
  256. /* request response to packets of type 0x28 */
  257. iowrite32(0x00000100, base + RESREQSET1);
  258. /* High-speed transmission timeout, default 0xffffffff */
  259. iowrite32(0x0fffffff, base + HSTTOVSET);
  260. /* LP reception timeout, default 0xffffffff */
  261. iowrite32(0x0fffffff, base + LPRTOVSET);
  262. /* Turn-around timeout, default 0xffffffff */
  263. iowrite32(0x0fffffff, base + TATOVSET);
  264. /* Peripheral reset timeout, default 0xffffffff */
  265. iowrite32(0x0fffffff, base + PRTOVSET);
  266. /* Enable timeout counters */
  267. iowrite32(0x00000f00, base + DSICTRL);
  268. /* Interrupts not used, disable all */
  269. iowrite32(0, base + DSIINTE);
  270. /* DSI-Tx bias on */
  271. iowrite32(0x00000001, base + PHYCTRL);
  272. udelay(200);
  273. /* Deassert resets, power on, set multiplier */
  274. iowrite32(0x03070b01, base + PHYCTRL);
  275. /* setup l-bridge */
  276. /*
  277. * Enable transmission of all packets,
  278. * transmit LPS after each HS packet completion
  279. */
  280. iowrite32(0x00000006, mipi->linkbase + DTCTR);
  281. /* VSYNC width = 2 (<< 17) */
  282. iowrite32((ch->lcd_cfg[0].vsync_len << pdata->vsynw_offset) |
  283. (pdata->clksrc << 16) | (pctype << 12) | datatype,
  284. mipi->linkbase + VMCTR1);
  285. /*
  286. * Non-burst mode with sync pulses: VSE and HSE are output,
  287. * HSA period allowed, no commands in LP
  288. */
  289. if (pdata->flags & SH_MIPI_DSI_BL2E)
  290. vmctr2 |= 1 << 17;
  291. if (pdata->flags & SH_MIPI_DSI_HSABM)
  292. vmctr2 |= 1 << 5;
  293. if (pdata->flags & SH_MIPI_DSI_HBPBM)
  294. vmctr2 |= 1 << 4;
  295. if (pdata->flags & SH_MIPI_DSI_HFPBM)
  296. vmctr2 |= 1 << 3;
  297. iowrite32(vmctr2, mipi->linkbase + VMCTR2);
  298. /*
  299. * 0x660 = 1632 bytes per line (RGB24, 544 pixels: see
  300. * sh_mobile_lcdc_info.ch[0].lcd_cfg[0].xres), HSALEN = 1 - default
  301. * (unused if VMCTR2[HSABM] = 0)
  302. */
  303. iowrite32(1 | (linelength << 16), mipi->linkbase + VMLEN1);
  304. msleep(5);
  305. /* setup LCD panel */
  306. /* cf. drivers/video/omap/lcd_mipid.c */
  307. sh_mipi_dcs(ch->chan, MIPI_DCS_EXIT_SLEEP_MODE);
  308. msleep(120);
  309. /*
  310. * [7] - Page Address Mode
  311. * [6] - Column Address Mode
  312. * [5] - Page / Column Address Mode
  313. * [4] - Display Device Line Refresh Order
  314. * [3] - RGB/BGR Order
  315. * [2] - Display Data Latch Data Order
  316. * [1] - Flip Horizontal
  317. * [0] - Flip Vertical
  318. */
  319. sh_mipi_dcs_param(ch->chan, MIPI_DCS_SET_ADDRESS_MODE, 0x00);
  320. /* cf. set_data_lines() */
  321. sh_mipi_dcs_param(ch->chan, MIPI_DCS_SET_PIXEL_FORMAT,
  322. pixfmt << 4);
  323. sh_mipi_dcs(ch->chan, MIPI_DCS_SET_DISPLAY_ON);
  324. return 0;
  325. }
  326. static int __init sh_mipi_probe(struct platform_device *pdev)
  327. {
  328. struct sh_mipi *mipi;
  329. struct sh_mipi_dsi_info *pdata = pdev->dev.platform_data;
  330. struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
  331. struct resource *res2 = platform_get_resource(pdev, IORESOURCE_MEM, 1);
  332. unsigned long rate, f_current;
  333. int idx = pdev->id, ret;
  334. if (!res || !res2 || idx >= ARRAY_SIZE(mipi_dsi) || !pdata)
  335. return -ENODEV;
  336. mutex_lock(&array_lock);
  337. if (idx < 0)
  338. for (idx = 0; idx < ARRAY_SIZE(mipi_dsi) && mipi_dsi[idx]; idx++)
  339. ;
  340. if (idx == ARRAY_SIZE(mipi_dsi)) {
  341. ret = -EBUSY;
  342. goto efindslot;
  343. }
  344. mipi = kzalloc(sizeof(*mipi), GFP_KERNEL);
  345. if (!mipi) {
  346. ret = -ENOMEM;
  347. goto ealloc;
  348. }
  349. if (!request_mem_region(res->start, resource_size(res), pdev->name)) {
  350. dev_err(&pdev->dev, "MIPI register region already claimed\n");
  351. ret = -EBUSY;
  352. goto ereqreg;
  353. }
  354. mipi->base = ioremap(res->start, resource_size(res));
  355. if (!mipi->base) {
  356. ret = -ENOMEM;
  357. goto emap;
  358. }
  359. if (!request_mem_region(res2->start, resource_size(res2), pdev->name)) {
  360. dev_err(&pdev->dev, "MIPI register region 2 already claimed\n");
  361. ret = -EBUSY;
  362. goto ereqreg2;
  363. }
  364. mipi->linkbase = ioremap(res2->start, resource_size(res2));
  365. if (!mipi->linkbase) {
  366. ret = -ENOMEM;
  367. goto emap2;
  368. }
  369. mipi->dev = &pdev->dev;
  370. mipi->dsit_clk = clk_get(&pdev->dev, "dsit_clk");
  371. if (IS_ERR(mipi->dsit_clk)) {
  372. ret = PTR_ERR(mipi->dsit_clk);
  373. goto eclktget;
  374. }
  375. f_current = clk_get_rate(mipi->dsit_clk);
  376. /* 80MHz required by the datasheet */
  377. rate = clk_round_rate(mipi->dsit_clk, 80000000);
  378. if (rate > 0 && rate != f_current)
  379. ret = clk_set_rate(mipi->dsit_clk, rate);
  380. else
  381. ret = rate;
  382. if (ret < 0)
  383. goto esettrate;
  384. dev_dbg(&pdev->dev, "DSI-T clk %lu -> %lu\n", f_current, rate);
  385. mipi->dsip_clk = clk_get(&pdev->dev, "dsip_clk");
  386. if (IS_ERR(mipi->dsip_clk)) {
  387. ret = PTR_ERR(mipi->dsip_clk);
  388. goto eclkpget;
  389. }
  390. f_current = clk_get_rate(mipi->dsip_clk);
  391. /* Between 10 and 50MHz */
  392. rate = clk_round_rate(mipi->dsip_clk, 24000000);
  393. if (rate > 0 && rate != f_current)
  394. ret = clk_set_rate(mipi->dsip_clk, rate);
  395. else
  396. ret = rate;
  397. if (ret < 0)
  398. goto esetprate;
  399. dev_dbg(&pdev->dev, "DSI-P clk %lu -> %lu\n", f_current, rate);
  400. msleep(10);
  401. ret = clk_enable(mipi->dsit_clk);
  402. if (ret < 0)
  403. goto eclkton;
  404. ret = clk_enable(mipi->dsip_clk);
  405. if (ret < 0)
  406. goto eclkpon;
  407. mipi_dsi[idx] = mipi;
  408. pm_runtime_enable(&pdev->dev);
  409. pm_runtime_resume(&pdev->dev);
  410. ret = sh_mipi_setup(mipi, pdata);
  411. if (ret < 0)
  412. goto emipisetup;
  413. mutex_unlock(&array_lock);
  414. platform_set_drvdata(pdev, mipi);
  415. /* Save original LCDC callbacks */
  416. mipi->next_board_data = pdata->lcd_chan->board_cfg.board_data;
  417. mipi->next_display_on = pdata->lcd_chan->board_cfg.display_on;
  418. mipi->next_display_off = pdata->lcd_chan->board_cfg.display_off;
  419. /* Set up LCDC callbacks */
  420. pdata->lcd_chan->board_cfg.board_data = mipi;
  421. pdata->lcd_chan->board_cfg.display_on = mipi_display_on;
  422. pdata->lcd_chan->board_cfg.display_off = mipi_display_off;
  423. pdata->lcd_chan->board_cfg.owner = THIS_MODULE;
  424. return 0;
  425. emipisetup:
  426. mipi_dsi[idx] = NULL;
  427. pm_runtime_disable(&pdev->dev);
  428. clk_disable(mipi->dsip_clk);
  429. eclkpon:
  430. clk_disable(mipi->dsit_clk);
  431. eclkton:
  432. esetprate:
  433. clk_put(mipi->dsip_clk);
  434. eclkpget:
  435. esettrate:
  436. clk_put(mipi->dsit_clk);
  437. eclktget:
  438. iounmap(mipi->linkbase);
  439. emap2:
  440. release_mem_region(res2->start, resource_size(res2));
  441. ereqreg2:
  442. iounmap(mipi->base);
  443. emap:
  444. release_mem_region(res->start, resource_size(res));
  445. ereqreg:
  446. kfree(mipi);
  447. ealloc:
  448. efindslot:
  449. mutex_unlock(&array_lock);
  450. return ret;
  451. }
  452. static int __exit sh_mipi_remove(struct platform_device *pdev)
  453. {
  454. struct sh_mipi_dsi_info *pdata = pdev->dev.platform_data;
  455. struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
  456. struct resource *res2 = platform_get_resource(pdev, IORESOURCE_MEM, 1);
  457. struct sh_mipi *mipi = platform_get_drvdata(pdev);
  458. int i, ret;
  459. mutex_lock(&array_lock);
  460. for (i = 0; i < ARRAY_SIZE(mipi_dsi) && mipi_dsi[i] != mipi; i++)
  461. ;
  462. if (i == ARRAY_SIZE(mipi_dsi)) {
  463. ret = -EINVAL;
  464. } else {
  465. ret = 0;
  466. mipi_dsi[i] = NULL;
  467. }
  468. mutex_unlock(&array_lock);
  469. if (ret < 0)
  470. return ret;
  471. pdata->lcd_chan->board_cfg.owner = NULL;
  472. pdata->lcd_chan->board_cfg.display_on = NULL;
  473. pdata->lcd_chan->board_cfg.display_off = NULL;
  474. pdata->lcd_chan->board_cfg.board_data = NULL;
  475. pm_runtime_disable(&pdev->dev);
  476. clk_disable(mipi->dsip_clk);
  477. clk_disable(mipi->dsit_clk);
  478. clk_put(mipi->dsit_clk);
  479. clk_put(mipi->dsip_clk);
  480. iounmap(mipi->linkbase);
  481. if (res2)
  482. release_mem_region(res2->start, resource_size(res2));
  483. iounmap(mipi->base);
  484. if (res)
  485. release_mem_region(res->start, resource_size(res));
  486. platform_set_drvdata(pdev, NULL);
  487. kfree(mipi);
  488. return 0;
  489. }
  490. static struct platform_driver sh_mipi_driver = {
  491. .remove = __exit_p(sh_mipi_remove),
  492. .shutdown = sh_mipi_shutdown,
  493. .driver = {
  494. .name = "sh-mipi-dsi",
  495. },
  496. };
  497. static int __init sh_mipi_init(void)
  498. {
  499. return platform_driver_probe(&sh_mipi_driver, sh_mipi_probe);
  500. }
  501. module_init(sh_mipi_init);
  502. static void __exit sh_mipi_exit(void)
  503. {
  504. platform_driver_unregister(&sh_mipi_driver);
  505. }
  506. module_exit(sh_mipi_exit);
  507. MODULE_AUTHOR("Guennadi Liakhovetski <g.liakhovetski@gmx.de>");
  508. MODULE_DESCRIPTION("SuperH / ARM-shmobile MIPI DSI driver");
  509. MODULE_LICENSE("GPL v2");