sun4i_tcon.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561
  1. /*
  2. * Copyright (C) 2015 Free Electrons
  3. * Copyright (C) 2015 NextThing Co
  4. *
  5. * Maxime Ripard <maxime.ripard@free-electrons.com>
  6. *
  7. * This program is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU General Public License as
  9. * published by the Free Software Foundation; either version 2 of
  10. * the License, or (at your option) any later version.
  11. */
  12. #include <drm/drmP.h>
  13. #include <drm/drm_atomic_helper.h>
  14. #include <drm/drm_crtc.h>
  15. #include <drm/drm_crtc_helper.h>
  16. #include <drm/drm_modes.h>
  17. #include <drm/drm_panel.h>
  18. #include <linux/component.h>
  19. #include <linux/ioport.h>
  20. #include <linux/of_address.h>
  21. #include <linux/of_graph.h>
  22. #include <linux/of_irq.h>
  23. #include <linux/regmap.h>
  24. #include <linux/reset.h>
  25. #include "sun4i_crtc.h"
  26. #include "sun4i_dotclock.h"
  27. #include "sun4i_drv.h"
  28. #include "sun4i_rgb.h"
  29. #include "sun4i_tcon.h"
  30. void sun4i_tcon_disable(struct sun4i_tcon *tcon)
  31. {
  32. DRM_DEBUG_DRIVER("Disabling TCON\n");
  33. /* Disable the TCON */
  34. regmap_update_bits(tcon->regs, SUN4I_TCON_GCTL_REG,
  35. SUN4I_TCON_GCTL_TCON_ENABLE, 0);
  36. }
  37. EXPORT_SYMBOL(sun4i_tcon_disable);
  38. void sun4i_tcon_enable(struct sun4i_tcon *tcon)
  39. {
  40. DRM_DEBUG_DRIVER("Enabling TCON\n");
  41. /* Enable the TCON */
  42. regmap_update_bits(tcon->regs, SUN4I_TCON_GCTL_REG,
  43. SUN4I_TCON_GCTL_TCON_ENABLE,
  44. SUN4I_TCON_GCTL_TCON_ENABLE);
  45. }
  46. EXPORT_SYMBOL(sun4i_tcon_enable);
  47. void sun4i_tcon_channel_disable(struct sun4i_tcon *tcon, int channel)
  48. {
  49. /* Disable the TCON's channel */
  50. if (channel == 0) {
  51. regmap_update_bits(tcon->regs, SUN4I_TCON0_CTL_REG,
  52. SUN4I_TCON0_CTL_TCON_ENABLE, 0);
  53. clk_disable_unprepare(tcon->dclk);
  54. } else if (channel == 1) {
  55. regmap_update_bits(tcon->regs, SUN4I_TCON1_CTL_REG,
  56. SUN4I_TCON1_CTL_TCON_ENABLE, 0);
  57. clk_disable_unprepare(tcon->sclk1);
  58. }
  59. }
  60. EXPORT_SYMBOL(sun4i_tcon_channel_disable);
  61. void sun4i_tcon_channel_enable(struct sun4i_tcon *tcon, int channel)
  62. {
  63. /* Enable the TCON's channel */
  64. if (channel == 0) {
  65. regmap_update_bits(tcon->regs, SUN4I_TCON0_CTL_REG,
  66. SUN4I_TCON0_CTL_TCON_ENABLE,
  67. SUN4I_TCON0_CTL_TCON_ENABLE);
  68. clk_prepare_enable(tcon->dclk);
  69. } else if (channel == 1) {
  70. regmap_update_bits(tcon->regs, SUN4I_TCON1_CTL_REG,
  71. SUN4I_TCON1_CTL_TCON_ENABLE,
  72. SUN4I_TCON1_CTL_TCON_ENABLE);
  73. clk_prepare_enable(tcon->sclk1);
  74. }
  75. }
  76. EXPORT_SYMBOL(sun4i_tcon_channel_enable);
  77. void sun4i_tcon_enable_vblank(struct sun4i_tcon *tcon, bool enable)
  78. {
  79. u32 mask, val = 0;
  80. DRM_DEBUG_DRIVER("%sabling VBLANK interrupt\n", enable ? "En" : "Dis");
  81. mask = SUN4I_TCON_GINT0_VBLANK_ENABLE(0) |
  82. SUN4I_TCON_GINT0_VBLANK_ENABLE(1);
  83. if (enable)
  84. val = mask;
  85. regmap_update_bits(tcon->regs, SUN4I_TCON_GINT0_REG, mask, val);
  86. }
  87. EXPORT_SYMBOL(sun4i_tcon_enable_vblank);
  88. static int sun4i_tcon_get_clk_delay(struct drm_display_mode *mode,
  89. int channel)
  90. {
  91. int delay = mode->vtotal - mode->vdisplay;
  92. if (mode->flags & DRM_MODE_FLAG_INTERLACE)
  93. delay /= 2;
  94. if (channel == 1)
  95. delay -= 2;
  96. delay = min(delay, 30);
  97. DRM_DEBUG_DRIVER("TCON %d clock delay %u\n", channel, delay);
  98. return delay;
  99. }
  100. void sun4i_tcon0_mode_set(struct sun4i_tcon *tcon,
  101. struct drm_display_mode *mode)
  102. {
  103. unsigned int bp, hsync, vsync;
  104. u8 clk_delay;
  105. u32 val = 0;
  106. /* Adjust clock delay */
  107. clk_delay = sun4i_tcon_get_clk_delay(mode, 0);
  108. regmap_update_bits(tcon->regs, SUN4I_TCON0_CTL_REG,
  109. SUN4I_TCON0_CTL_CLK_DELAY_MASK,
  110. SUN4I_TCON0_CTL_CLK_DELAY(clk_delay));
  111. /* Set the resolution */
  112. regmap_write(tcon->regs, SUN4I_TCON0_BASIC0_REG,
  113. SUN4I_TCON0_BASIC0_X(mode->crtc_hdisplay) |
  114. SUN4I_TCON0_BASIC0_Y(mode->crtc_vdisplay));
  115. /*
  116. * This is called a backporch in the register documentation,
  117. * but it really is the front porch + hsync
  118. */
  119. bp = mode->crtc_htotal - mode->crtc_hsync_start;
  120. DRM_DEBUG_DRIVER("Setting horizontal total %d, backporch %d\n",
  121. mode->crtc_htotal, bp);
  122. /* Set horizontal display timings */
  123. regmap_write(tcon->regs, SUN4I_TCON0_BASIC1_REG,
  124. SUN4I_TCON0_BASIC1_H_TOTAL(mode->crtc_htotal) |
  125. SUN4I_TCON0_BASIC1_H_BACKPORCH(bp));
  126. /*
  127. * This is called a backporch in the register documentation,
  128. * but it really is the front porch + hsync
  129. */
  130. bp = mode->crtc_vtotal - mode->crtc_vsync_start;
  131. DRM_DEBUG_DRIVER("Setting vertical total %d, backporch %d\n",
  132. mode->crtc_vtotal, bp);
  133. /* Set vertical display timings */
  134. regmap_write(tcon->regs, SUN4I_TCON0_BASIC2_REG,
  135. SUN4I_TCON0_BASIC2_V_TOTAL(mode->crtc_vtotal) |
  136. SUN4I_TCON0_BASIC2_V_BACKPORCH(bp));
  137. /* Set Hsync and Vsync length */
  138. hsync = mode->crtc_hsync_end - mode->crtc_hsync_start;
  139. vsync = mode->crtc_vsync_end - mode->crtc_vsync_start;
  140. DRM_DEBUG_DRIVER("Setting HSYNC %d, VSYNC %d\n", hsync, vsync);
  141. regmap_write(tcon->regs, SUN4I_TCON0_BASIC3_REG,
  142. SUN4I_TCON0_BASIC3_V_SYNC(vsync) |
  143. SUN4I_TCON0_BASIC3_H_SYNC(hsync));
  144. /* Setup the polarity of the various signals */
  145. if (!(mode->flags & DRM_MODE_FLAG_PHSYNC))
  146. val |= SUN4I_TCON0_IO_POL_HSYNC_POSITIVE;
  147. if (!(mode->flags & DRM_MODE_FLAG_PVSYNC))
  148. val |= SUN4I_TCON0_IO_POL_VSYNC_POSITIVE;
  149. regmap_update_bits(tcon->regs, SUN4I_TCON0_IO_POL_REG,
  150. SUN4I_TCON0_IO_POL_HSYNC_POSITIVE | SUN4I_TCON0_IO_POL_VSYNC_POSITIVE,
  151. val);
  152. /* Map output pins to channel 0 */
  153. regmap_update_bits(tcon->regs, SUN4I_TCON_GCTL_REG,
  154. SUN4I_TCON_GCTL_IOMAP_MASK,
  155. SUN4I_TCON_GCTL_IOMAP_TCON0);
  156. /* Enable the output on the pins */
  157. regmap_write(tcon->regs, SUN4I_TCON0_IO_TRI_REG, 0);
  158. }
  159. EXPORT_SYMBOL(sun4i_tcon0_mode_set);
  160. void sun4i_tcon1_mode_set(struct sun4i_tcon *tcon,
  161. struct drm_display_mode *mode)
  162. {
  163. unsigned int bp, hsync, vsync;
  164. u8 clk_delay;
  165. u32 val;
  166. /* Adjust clock delay */
  167. clk_delay = sun4i_tcon_get_clk_delay(mode, 1);
  168. regmap_update_bits(tcon->regs, SUN4I_TCON1_CTL_REG,
  169. SUN4I_TCON1_CTL_CLK_DELAY_MASK,
  170. SUN4I_TCON1_CTL_CLK_DELAY(clk_delay));
  171. /* Set interlaced mode */
  172. if (mode->flags & DRM_MODE_FLAG_INTERLACE)
  173. val = SUN4I_TCON1_CTL_INTERLACE_ENABLE;
  174. else
  175. val = 0;
  176. regmap_update_bits(tcon->regs, SUN4I_TCON1_CTL_REG,
  177. SUN4I_TCON1_CTL_INTERLACE_ENABLE,
  178. val);
  179. /* Set the input resolution */
  180. regmap_write(tcon->regs, SUN4I_TCON1_BASIC0_REG,
  181. SUN4I_TCON1_BASIC0_X(mode->crtc_hdisplay) |
  182. SUN4I_TCON1_BASIC0_Y(mode->crtc_vdisplay));
  183. /* Set the upscaling resolution */
  184. regmap_write(tcon->regs, SUN4I_TCON1_BASIC1_REG,
  185. SUN4I_TCON1_BASIC1_X(mode->crtc_hdisplay) |
  186. SUN4I_TCON1_BASIC1_Y(mode->crtc_vdisplay));
  187. /* Set the output resolution */
  188. regmap_write(tcon->regs, SUN4I_TCON1_BASIC2_REG,
  189. SUN4I_TCON1_BASIC2_X(mode->crtc_hdisplay) |
  190. SUN4I_TCON1_BASIC2_Y(mode->crtc_vdisplay));
  191. /* Set horizontal display timings */
  192. bp = mode->crtc_htotal - mode->crtc_hsync_end;
  193. DRM_DEBUG_DRIVER("Setting horizontal total %d, backporch %d\n",
  194. mode->htotal, bp);
  195. regmap_write(tcon->regs, SUN4I_TCON1_BASIC3_REG,
  196. SUN4I_TCON1_BASIC3_H_TOTAL(mode->crtc_htotal) |
  197. SUN4I_TCON1_BASIC3_H_BACKPORCH(bp));
  198. /* Set vertical display timings */
  199. bp = mode->crtc_vtotal - mode->crtc_vsync_end;
  200. DRM_DEBUG_DRIVER("Setting vertical total %d, backporch %d\n",
  201. mode->vtotal, bp);
  202. regmap_write(tcon->regs, SUN4I_TCON1_BASIC4_REG,
  203. SUN4I_TCON1_BASIC4_V_TOTAL(mode->vtotal) |
  204. SUN4I_TCON1_BASIC4_V_BACKPORCH(bp));
  205. /* Set Hsync and Vsync length */
  206. hsync = mode->crtc_hsync_end - mode->crtc_hsync_start;
  207. vsync = mode->crtc_vsync_end - mode->crtc_vsync_start;
  208. DRM_DEBUG_DRIVER("Setting HSYNC %d, VSYNC %d\n", hsync, vsync);
  209. regmap_write(tcon->regs, SUN4I_TCON1_BASIC5_REG,
  210. SUN4I_TCON1_BASIC5_V_SYNC(vsync) |
  211. SUN4I_TCON1_BASIC5_H_SYNC(hsync));
  212. /* Map output pins to channel 1 */
  213. regmap_update_bits(tcon->regs, SUN4I_TCON_GCTL_REG,
  214. SUN4I_TCON_GCTL_IOMAP_MASK,
  215. SUN4I_TCON_GCTL_IOMAP_TCON1);
  216. /*
  217. * FIXME: Undocumented bits
  218. */
  219. if (tcon->has_mux)
  220. regmap_write(tcon->regs, SUN4I_TCON_MUX_CTRL_REG, 1);
  221. }
  222. EXPORT_SYMBOL(sun4i_tcon1_mode_set);
  223. static void sun4i_tcon_finish_page_flip(struct drm_device *dev,
  224. struct sun4i_crtc *scrtc)
  225. {
  226. unsigned long flags;
  227. spin_lock_irqsave(&dev->event_lock, flags);
  228. if (scrtc->event) {
  229. drm_crtc_send_vblank_event(&scrtc->crtc, scrtc->event);
  230. drm_crtc_vblank_put(&scrtc->crtc);
  231. scrtc->event = NULL;
  232. }
  233. spin_unlock_irqrestore(&dev->event_lock, flags);
  234. }
  235. static irqreturn_t sun4i_tcon_handler(int irq, void *private)
  236. {
  237. struct sun4i_tcon *tcon = private;
  238. struct drm_device *drm = tcon->drm;
  239. struct sun4i_drv *drv = drm->dev_private;
  240. struct sun4i_crtc *scrtc = drv->crtc;
  241. unsigned int status;
  242. regmap_read(tcon->regs, SUN4I_TCON_GINT0_REG, &status);
  243. if (!(status & (SUN4I_TCON_GINT0_VBLANK_INT(0) |
  244. SUN4I_TCON_GINT0_VBLANK_INT(1))))
  245. return IRQ_NONE;
  246. drm_crtc_handle_vblank(&scrtc->crtc);
  247. sun4i_tcon_finish_page_flip(drm, scrtc);
  248. /* Acknowledge the interrupt */
  249. regmap_update_bits(tcon->regs, SUN4I_TCON_GINT0_REG,
  250. SUN4I_TCON_GINT0_VBLANK_INT(0) |
  251. SUN4I_TCON_GINT0_VBLANK_INT(1),
  252. 0);
  253. return IRQ_HANDLED;
  254. }
  255. static int sun4i_tcon_init_clocks(struct device *dev,
  256. struct sun4i_tcon *tcon)
  257. {
  258. tcon->clk = devm_clk_get(dev, "ahb");
  259. if (IS_ERR(tcon->clk)) {
  260. dev_err(dev, "Couldn't get the TCON bus clock\n");
  261. return PTR_ERR(tcon->clk);
  262. }
  263. clk_prepare_enable(tcon->clk);
  264. tcon->sclk0 = devm_clk_get(dev, "tcon-ch0");
  265. if (IS_ERR(tcon->sclk0)) {
  266. dev_err(dev, "Couldn't get the TCON channel 0 clock\n");
  267. return PTR_ERR(tcon->sclk0);
  268. }
  269. tcon->sclk1 = devm_clk_get(dev, "tcon-ch1");
  270. if (IS_ERR(tcon->sclk1)) {
  271. dev_err(dev, "Couldn't get the TCON channel 1 clock\n");
  272. return PTR_ERR(tcon->sclk1);
  273. }
  274. return sun4i_dclk_create(dev, tcon);
  275. }
  276. static void sun4i_tcon_free_clocks(struct sun4i_tcon *tcon)
  277. {
  278. sun4i_dclk_free(tcon);
  279. clk_disable_unprepare(tcon->clk);
  280. }
  281. static int sun4i_tcon_init_irq(struct device *dev,
  282. struct sun4i_tcon *tcon)
  283. {
  284. struct platform_device *pdev = to_platform_device(dev);
  285. int irq, ret;
  286. irq = platform_get_irq(pdev, 0);
  287. if (irq < 0) {
  288. dev_err(dev, "Couldn't retrieve the TCON interrupt\n");
  289. return irq;
  290. }
  291. ret = devm_request_irq(dev, irq, sun4i_tcon_handler, 0,
  292. dev_name(dev), tcon);
  293. if (ret) {
  294. dev_err(dev, "Couldn't request the IRQ\n");
  295. return ret;
  296. }
  297. return 0;
  298. }
  299. static struct regmap_config sun4i_tcon_regmap_config = {
  300. .reg_bits = 32,
  301. .val_bits = 32,
  302. .reg_stride = 4,
  303. .max_register = 0x800,
  304. };
  305. static int sun4i_tcon_init_regmap(struct device *dev,
  306. struct sun4i_tcon *tcon)
  307. {
  308. struct platform_device *pdev = to_platform_device(dev);
  309. struct resource *res;
  310. void __iomem *regs;
  311. res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
  312. regs = devm_ioremap_resource(dev, res);
  313. if (IS_ERR(regs)) {
  314. dev_err(dev, "Couldn't map the TCON registers\n");
  315. return PTR_ERR(regs);
  316. }
  317. tcon->regs = devm_regmap_init_mmio(dev, regs,
  318. &sun4i_tcon_regmap_config);
  319. if (IS_ERR(tcon->regs)) {
  320. dev_err(dev, "Couldn't create the TCON regmap\n");
  321. return PTR_ERR(tcon->regs);
  322. }
  323. /* Make sure the TCON is disabled and all IRQs are off */
  324. regmap_write(tcon->regs, SUN4I_TCON_GCTL_REG, 0);
  325. regmap_write(tcon->regs, SUN4I_TCON_GINT0_REG, 0);
  326. regmap_write(tcon->regs, SUN4I_TCON_GINT1_REG, 0);
  327. /* Disable IO lines and set them to tristate */
  328. regmap_write(tcon->regs, SUN4I_TCON0_IO_TRI_REG, ~0);
  329. regmap_write(tcon->regs, SUN4I_TCON1_IO_TRI_REG, ~0);
  330. return 0;
  331. }
  332. static struct drm_panel *sun4i_tcon_find_panel(struct device_node *node)
  333. {
  334. struct device_node *port, *remote, *child;
  335. struct device_node *end_node = NULL;
  336. /* Inputs are listed first, then outputs */
  337. port = of_graph_get_port_by_id(node, 1);
  338. /*
  339. * Our first output is the RGB interface where the panel will
  340. * be connected.
  341. */
  342. for_each_child_of_node(port, child) {
  343. u32 reg;
  344. of_property_read_u32(child, "reg", &reg);
  345. if (reg == 0)
  346. end_node = child;
  347. }
  348. if (!end_node) {
  349. DRM_DEBUG_DRIVER("Missing panel endpoint\n");
  350. return ERR_PTR(-ENODEV);
  351. }
  352. remote = of_graph_get_remote_port_parent(end_node);
  353. if (!remote) {
  354. DRM_DEBUG_DRIVER("Enable to parse remote node\n");
  355. return ERR_PTR(-EINVAL);
  356. }
  357. return of_drm_find_panel(remote);
  358. }
  359. static int sun4i_tcon_bind(struct device *dev, struct device *master,
  360. void *data)
  361. {
  362. struct drm_device *drm = data;
  363. struct sun4i_drv *drv = drm->dev_private;
  364. struct sun4i_tcon *tcon;
  365. int ret;
  366. tcon = devm_kzalloc(dev, sizeof(*tcon), GFP_KERNEL);
  367. if (!tcon)
  368. return -ENOMEM;
  369. dev_set_drvdata(dev, tcon);
  370. drv->tcon = tcon;
  371. tcon->drm = drm;
  372. if (of_device_is_compatible(dev->of_node, "allwinner,sun5i-a13-tcon"))
  373. tcon->has_mux = true;
  374. tcon->lcd_rst = devm_reset_control_get(dev, "lcd");
  375. if (IS_ERR(tcon->lcd_rst)) {
  376. dev_err(dev, "Couldn't get our reset line\n");
  377. return PTR_ERR(tcon->lcd_rst);
  378. }
  379. /* Make sure our TCON is reset */
  380. if (!reset_control_status(tcon->lcd_rst))
  381. reset_control_assert(tcon->lcd_rst);
  382. ret = reset_control_deassert(tcon->lcd_rst);
  383. if (ret) {
  384. dev_err(dev, "Couldn't deassert our reset line\n");
  385. return ret;
  386. }
  387. ret = sun4i_tcon_init_regmap(dev, tcon);
  388. if (ret) {
  389. dev_err(dev, "Couldn't init our TCON regmap\n");
  390. goto err_assert_reset;
  391. }
  392. ret = sun4i_tcon_init_clocks(dev, tcon);
  393. if (ret) {
  394. dev_err(dev, "Couldn't init our TCON clocks\n");
  395. goto err_assert_reset;
  396. }
  397. ret = sun4i_tcon_init_irq(dev, tcon);
  398. if (ret) {
  399. dev_err(dev, "Couldn't init our TCON interrupts\n");
  400. goto err_free_clocks;
  401. }
  402. tcon->panel = sun4i_tcon_find_panel(dev->of_node);
  403. if (IS_ERR(tcon->panel)) {
  404. dev_info(dev, "No panel found... RGB output disabled\n");
  405. return 0;
  406. }
  407. return sun4i_rgb_init(drm);
  408. err_free_clocks:
  409. sun4i_tcon_free_clocks(tcon);
  410. err_assert_reset:
  411. reset_control_assert(tcon->lcd_rst);
  412. return ret;
  413. }
  414. static void sun4i_tcon_unbind(struct device *dev, struct device *master,
  415. void *data)
  416. {
  417. struct sun4i_tcon *tcon = dev_get_drvdata(dev);
  418. sun4i_tcon_free_clocks(tcon);
  419. }
  420. static struct component_ops sun4i_tcon_ops = {
  421. .bind = sun4i_tcon_bind,
  422. .unbind = sun4i_tcon_unbind,
  423. };
  424. static int sun4i_tcon_probe(struct platform_device *pdev)
  425. {
  426. struct device_node *node = pdev->dev.of_node;
  427. struct drm_panel *panel;
  428. /*
  429. * The panel is not ready.
  430. * Defer the probe.
  431. */
  432. panel = sun4i_tcon_find_panel(node);
  433. if (IS_ERR(panel)) {
  434. /*
  435. * If we don't have a panel endpoint, just go on
  436. */
  437. if (PTR_ERR(panel) != -ENODEV)
  438. return -EPROBE_DEFER;
  439. }
  440. return component_add(&pdev->dev, &sun4i_tcon_ops);
  441. }
  442. static int sun4i_tcon_remove(struct platform_device *pdev)
  443. {
  444. component_del(&pdev->dev, &sun4i_tcon_ops);
  445. return 0;
  446. }
  447. static const struct of_device_id sun4i_tcon_of_table[] = {
  448. { .compatible = "allwinner,sun5i-a13-tcon" },
  449. { }
  450. };
  451. MODULE_DEVICE_TABLE(of, sun4i_tcon_of_table);
  452. static struct platform_driver sun4i_tcon_platform_driver = {
  453. .probe = sun4i_tcon_probe,
  454. .remove = sun4i_tcon_remove,
  455. .driver = {
  456. .name = "sun4i-tcon",
  457. .of_match_table = sun4i_tcon_of_table,
  458. },
  459. };
  460. module_platform_driver(sun4i_tcon_platform_driver);
  461. MODULE_AUTHOR("Maxime Ripard <maxime.ripard@free-electrons.com>");
  462. MODULE_DESCRIPTION("Allwinner A10 Timing Controller Driver");
  463. MODULE_LICENSE("GPL");