drm/rockchip: Don't change hdmi reference clock rate
[drm/drm-misc.git] / drivers / video / fbdev / omap2 / omapfb / dss / hdmi5.c
blobaa052805050e467cb11a381cd943f10d02499be4
1 // SPDX-License-Identifier: GPL-2.0-only
2 /*
3 * HDMI driver for OMAP5
5 * Copyright (C) 2014 Texas Instruments Incorporated
7 * Authors:
8 * Yong Zhi
9 * Mythri pk
10 * Archit Taneja <archit@ti.com>
11 * Tomi Valkeinen <tomi.valkeinen@ti.com>
14 #define DSS_SUBSYS_NAME "HDMI"
16 #include <linux/kernel.h>
17 #include <linux/module.h>
18 #include <linux/err.h>
19 #include <linux/io.h>
20 #include <linux/interrupt.h>
21 #include <linux/mutex.h>
22 #include <linux/delay.h>
23 #include <linux/string.h>
24 #include <linux/platform_device.h>
25 #include <linux/pm_runtime.h>
26 #include <linux/clk.h>
27 #include <linux/of.h>
28 #include <linux/of_graph.h>
29 #include <linux/regulator/consumer.h>
30 #include <linux/component.h>
31 #include <video/omapfb_dss.h>
32 #include <sound/omap-hdmi-audio.h>
34 #include "hdmi5_core.h"
35 #include "dss.h"
36 #include "dss_features.h"
38 static struct omap_hdmi hdmi;
40 static int hdmi_runtime_get(void)
42 int r;
44 DSSDBG("hdmi_runtime_get\n");
46 r = pm_runtime_resume_and_get(&hdmi.pdev->dev);
47 if (WARN_ON(r < 0))
48 return r;
50 return 0;
53 static void hdmi_runtime_put(void)
55 int r;
57 DSSDBG("hdmi_runtime_put\n");
59 r = pm_runtime_put_sync(&hdmi.pdev->dev);
60 WARN_ON(r < 0 && r != -ENOSYS);
63 static irqreturn_t hdmi_irq_handler(int irq, void *data)
65 struct hdmi_wp_data *wp = data;
66 u32 irqstatus;
68 irqstatus = hdmi_wp_get_irqstatus(wp);
69 hdmi_wp_set_irqstatus(wp, irqstatus);
71 if ((irqstatus & HDMI_IRQ_LINK_CONNECT) &&
72 irqstatus & HDMI_IRQ_LINK_DISCONNECT) {
73 u32 v;
75 * If we get both connect and disconnect interrupts at the same
76 * time, turn off the PHY, clear interrupts, and restart, which
77 * raises connect interrupt if a cable is connected, or nothing
78 * if cable is not connected.
81 hdmi_wp_set_phy_pwr(wp, HDMI_PHYPWRCMD_OFF);
84 * We always get bogus CONNECT & DISCONNECT interrupts when
85 * setting the PHY to LDOON. To ignore those, we force the RXDET
86 * line to 0 until the PHY power state has been changed.
88 v = hdmi_read_reg(hdmi.phy.base, HDMI_TXPHY_PAD_CFG_CTRL);
89 v = FLD_MOD(v, 1, 15, 15); /* FORCE_RXDET_HIGH */
90 v = FLD_MOD(v, 0, 14, 7); /* RXDET_LINE */
91 hdmi_write_reg(hdmi.phy.base, HDMI_TXPHY_PAD_CFG_CTRL, v);
93 hdmi_wp_set_irqstatus(wp, HDMI_IRQ_LINK_CONNECT |
94 HDMI_IRQ_LINK_DISCONNECT);
96 hdmi_wp_set_phy_pwr(wp, HDMI_PHYPWRCMD_LDOON);
98 REG_FLD_MOD(hdmi.phy.base, HDMI_TXPHY_PAD_CFG_CTRL, 0, 15, 15);
100 } else if (irqstatus & HDMI_IRQ_LINK_CONNECT) {
101 hdmi_wp_set_phy_pwr(wp, HDMI_PHYPWRCMD_TXON);
102 } else if (irqstatus & HDMI_IRQ_LINK_DISCONNECT) {
103 hdmi_wp_set_phy_pwr(wp, HDMI_PHYPWRCMD_LDOON);
106 return IRQ_HANDLED;
109 static int hdmi_init_regulator(void)
111 struct regulator *reg;
113 if (hdmi.vdda_reg != NULL)
114 return 0;
116 reg = devm_regulator_get(&hdmi.pdev->dev, "vdda");
117 if (IS_ERR(reg)) {
118 DSSERR("can't get VDDA regulator\n");
119 return PTR_ERR(reg);
122 hdmi.vdda_reg = reg;
124 return 0;
127 static int hdmi_power_on_core(struct omap_dss_device *dssdev)
129 int r;
131 r = regulator_enable(hdmi.vdda_reg);
132 if (r)
133 return r;
135 r = hdmi_runtime_get();
136 if (r)
137 goto err_runtime_get;
139 /* Make selection of HDMI in DSS */
140 dss_select_hdmi_venc_clk_source(DSS_HDMI_M_PCLK);
142 hdmi.core_enabled = true;
144 return 0;
146 err_runtime_get:
147 regulator_disable(hdmi.vdda_reg);
149 return r;
152 static void hdmi_power_off_core(struct omap_dss_device *dssdev)
154 hdmi.core_enabled = false;
156 hdmi_runtime_put();
157 regulator_disable(hdmi.vdda_reg);
160 static int hdmi_power_on_full(struct omap_dss_device *dssdev)
162 int r;
163 struct omap_video_timings *p;
164 struct omap_overlay_manager *mgr = hdmi.output.manager;
165 struct dss_pll_clock_info hdmi_cinfo = { 0 };
167 r = hdmi_power_on_core(dssdev);
168 if (r)
169 return r;
171 p = &hdmi.cfg.timings;
173 DSSDBG("hdmi_power_on x_res= %d y_res = %d\n", p->x_res, p->y_res);
175 hdmi_pll_compute(&hdmi.pll, p->pixelclock, &hdmi_cinfo);
177 /* disable and clear irqs */
178 hdmi_wp_clear_irqenable(&hdmi.wp, 0xffffffff);
179 hdmi_wp_set_irqstatus(&hdmi.wp,
180 hdmi_wp_get_irqstatus(&hdmi.wp));
182 r = dss_pll_enable(&hdmi.pll.pll);
183 if (r) {
184 DSSERR("Failed to enable PLL\n");
185 goto err_pll_enable;
188 r = dss_pll_set_config(&hdmi.pll.pll, &hdmi_cinfo);
189 if (r) {
190 DSSERR("Failed to configure PLL\n");
191 goto err_pll_cfg;
194 r = hdmi_phy_configure(&hdmi.phy, hdmi_cinfo.clkdco,
195 hdmi_cinfo.clkout[0]);
196 if (r) {
197 DSSDBG("Failed to start PHY\n");
198 goto err_phy_cfg;
201 r = hdmi_wp_set_phy_pwr(&hdmi.wp, HDMI_PHYPWRCMD_LDOON);
202 if (r)
203 goto err_phy_pwr;
205 hdmi5_configure(&hdmi.core, &hdmi.wp, &hdmi.cfg);
207 /* bypass TV gamma table */
208 dispc_enable_gamma_table(0);
210 /* tv size */
211 dss_mgr_set_timings(mgr, p);
213 r = hdmi_wp_video_start(&hdmi.wp);
214 if (r)
215 goto err_vid_enable;
217 r = dss_mgr_enable(mgr);
218 if (r)
219 goto err_mgr_enable;
221 hdmi_wp_set_irqenable(&hdmi.wp,
222 HDMI_IRQ_LINK_CONNECT | HDMI_IRQ_LINK_DISCONNECT);
224 return 0;
226 err_mgr_enable:
227 hdmi_wp_video_stop(&hdmi.wp);
228 err_vid_enable:
229 hdmi_wp_set_phy_pwr(&hdmi.wp, HDMI_PHYPWRCMD_OFF);
230 err_phy_pwr:
231 err_phy_cfg:
232 err_pll_cfg:
233 dss_pll_disable(&hdmi.pll.pll);
234 err_pll_enable:
235 hdmi_power_off_core(dssdev);
236 return -EIO;
239 static void hdmi_power_off_full(struct omap_dss_device *dssdev)
241 struct omap_overlay_manager *mgr = hdmi.output.manager;
243 hdmi_wp_clear_irqenable(&hdmi.wp, 0xffffffff);
245 dss_mgr_disable(mgr);
247 hdmi_wp_video_stop(&hdmi.wp);
249 hdmi_wp_set_phy_pwr(&hdmi.wp, HDMI_PHYPWRCMD_OFF);
251 dss_pll_disable(&hdmi.pll.pll);
253 hdmi_power_off_core(dssdev);
256 static int hdmi_display_check_timing(struct omap_dss_device *dssdev,
257 struct omap_video_timings *timings)
259 struct omap_dss_device *out = &hdmi.output;
261 /* TODO: proper interlace support */
262 if (timings->interlace)
263 return -EINVAL;
265 if (!dispc_mgr_timings_ok(out->dispc_channel, timings))
266 return -EINVAL;
268 return 0;
271 static void hdmi_display_set_timing(struct omap_dss_device *dssdev,
272 struct omap_video_timings *timings)
274 mutex_lock(&hdmi.lock);
276 hdmi.cfg.timings = *timings;
278 dispc_set_tv_pclk(timings->pixelclock);
280 mutex_unlock(&hdmi.lock);
283 static void hdmi_display_get_timings(struct omap_dss_device *dssdev,
284 struct omap_video_timings *timings)
286 *timings = hdmi.cfg.timings;
289 static void hdmi_dump_regs(struct seq_file *s)
291 mutex_lock(&hdmi.lock);
293 if (hdmi_runtime_get()) {
294 mutex_unlock(&hdmi.lock);
295 return;
298 hdmi_wp_dump(&hdmi.wp, s);
299 hdmi_pll_dump(&hdmi.pll, s);
300 hdmi_phy_dump(&hdmi.phy, s);
301 hdmi5_core_dump(&hdmi.core, s);
303 hdmi_runtime_put();
304 mutex_unlock(&hdmi.lock);
307 static int read_edid(u8 *buf, int len)
309 int r;
310 int idlemode;
312 mutex_lock(&hdmi.lock);
314 r = hdmi_runtime_get();
315 BUG_ON(r);
317 idlemode = REG_GET(hdmi.wp.base, HDMI_WP_SYSCONFIG, 3, 2);
318 /* No-idle mode */
319 REG_FLD_MOD(hdmi.wp.base, HDMI_WP_SYSCONFIG, 1, 3, 2);
321 r = hdmi5_read_edid(&hdmi.core, buf, len);
323 REG_FLD_MOD(hdmi.wp.base, HDMI_WP_SYSCONFIG, idlemode, 3, 2);
325 hdmi_runtime_put();
326 mutex_unlock(&hdmi.lock);
328 return r;
331 static void hdmi_start_audio_stream(struct omap_hdmi *hd)
333 REG_FLD_MOD(hdmi.wp.base, HDMI_WP_SYSCONFIG, 1, 3, 2);
334 hdmi_wp_audio_enable(&hd->wp, true);
335 hdmi_wp_audio_core_req_enable(&hd->wp, true);
338 static void hdmi_stop_audio_stream(struct omap_hdmi *hd)
340 hdmi_wp_audio_core_req_enable(&hd->wp, false);
341 hdmi_wp_audio_enable(&hd->wp, false);
342 REG_FLD_MOD(hd->wp.base, HDMI_WP_SYSCONFIG, hd->wp_idlemode, 3, 2);
345 static int hdmi_display_enable(struct omap_dss_device *dssdev)
347 struct omap_dss_device *out = &hdmi.output;
348 unsigned long flags;
349 int r = 0;
351 DSSDBG("ENTER hdmi_display_enable\n");
353 mutex_lock(&hdmi.lock);
355 if (out->manager == NULL) {
356 DSSERR("failed to enable display: no output/manager\n");
357 r = -ENODEV;
358 goto err0;
361 r = hdmi_power_on_full(dssdev);
362 if (r) {
363 DSSERR("failed to power on device\n");
364 goto err0;
367 if (hdmi.audio_configured) {
368 r = hdmi5_audio_config(&hdmi.core, &hdmi.wp, &hdmi.audio_config,
369 hdmi.cfg.timings.pixelclock);
370 if (r) {
371 DSSERR("Error restoring audio configuration: %d", r);
372 hdmi.audio_abort_cb(&hdmi.pdev->dev);
373 hdmi.audio_configured = false;
377 spin_lock_irqsave(&hdmi.audio_playing_lock, flags);
378 if (hdmi.audio_configured && hdmi.audio_playing)
379 hdmi_start_audio_stream(&hdmi);
380 hdmi.display_enabled = true;
381 spin_unlock_irqrestore(&hdmi.audio_playing_lock, flags);
383 mutex_unlock(&hdmi.lock);
384 return 0;
386 err0:
387 mutex_unlock(&hdmi.lock);
388 return r;
391 static void hdmi_display_disable(struct omap_dss_device *dssdev)
393 unsigned long flags;
395 DSSDBG("Enter hdmi_display_disable\n");
397 mutex_lock(&hdmi.lock);
399 spin_lock_irqsave(&hdmi.audio_playing_lock, flags);
400 hdmi_stop_audio_stream(&hdmi);
401 hdmi.display_enabled = false;
402 spin_unlock_irqrestore(&hdmi.audio_playing_lock, flags);
404 hdmi_power_off_full(dssdev);
406 mutex_unlock(&hdmi.lock);
409 static int hdmi_core_enable(struct omap_dss_device *dssdev)
411 int r = 0;
413 DSSDBG("ENTER omapdss_hdmi_core_enable\n");
415 mutex_lock(&hdmi.lock);
417 r = hdmi_power_on_core(dssdev);
418 if (r) {
419 DSSERR("failed to power on device\n");
420 goto err0;
423 mutex_unlock(&hdmi.lock);
424 return 0;
426 err0:
427 mutex_unlock(&hdmi.lock);
428 return r;
431 static void hdmi_core_disable(struct omap_dss_device *dssdev)
433 DSSDBG("Enter omapdss_hdmi_core_disable\n");
435 mutex_lock(&hdmi.lock);
437 hdmi_power_off_core(dssdev);
439 mutex_unlock(&hdmi.lock);
442 static int hdmi_connect(struct omap_dss_device *dssdev,
443 struct omap_dss_device *dst)
445 struct omap_overlay_manager *mgr;
446 int r;
448 r = hdmi_init_regulator();
449 if (r)
450 return r;
452 mgr = omap_dss_get_overlay_manager(dssdev->dispc_channel);
453 if (!mgr)
454 return -ENODEV;
456 r = dss_mgr_connect(mgr, dssdev);
457 if (r)
458 return r;
460 r = omapdss_output_set_device(dssdev, dst);
461 if (r) {
462 DSSERR("failed to connect output to new device: %s\n",
463 dst->name);
464 dss_mgr_disconnect(mgr, dssdev);
465 return r;
468 return 0;
471 static void hdmi_disconnect(struct omap_dss_device *dssdev,
472 struct omap_dss_device *dst)
474 WARN_ON(dst != dssdev->dst);
476 if (dst != dssdev->dst)
477 return;
479 omapdss_output_unset_device(dssdev);
481 if (dssdev->manager)
482 dss_mgr_disconnect(dssdev->manager, dssdev);
485 static int hdmi_read_edid(struct omap_dss_device *dssdev,
486 u8 *edid, int len)
488 bool need_enable;
489 int r;
491 need_enable = hdmi.core_enabled == false;
493 if (need_enable) {
494 r = hdmi_core_enable(dssdev);
495 if (r)
496 return r;
499 r = read_edid(edid, len);
501 if (need_enable)
502 hdmi_core_disable(dssdev);
504 return r;
507 static int hdmi_set_infoframe(struct omap_dss_device *dssdev,
508 const struct hdmi_avi_infoframe *avi)
510 hdmi.cfg.infoframe = *avi;
511 return 0;
514 static int hdmi_set_hdmi_mode(struct omap_dss_device *dssdev,
515 bool hdmi_mode)
517 hdmi.cfg.hdmi_dvi_mode = hdmi_mode ? HDMI_HDMI : HDMI_DVI;
518 return 0;
521 static const struct omapdss_hdmi_ops hdmi_ops = {
522 .connect = hdmi_connect,
523 .disconnect = hdmi_disconnect,
525 .enable = hdmi_display_enable,
526 .disable = hdmi_display_disable,
528 .check_timings = hdmi_display_check_timing,
529 .set_timings = hdmi_display_set_timing,
530 .get_timings = hdmi_display_get_timings,
532 .read_edid = hdmi_read_edid,
533 .set_infoframe = hdmi_set_infoframe,
534 .set_hdmi_mode = hdmi_set_hdmi_mode,
537 static void hdmi_init_output(struct platform_device *pdev)
539 struct omap_dss_device *out = &hdmi.output;
541 out->dev = &pdev->dev;
542 out->id = OMAP_DSS_OUTPUT_HDMI;
543 out->output_type = OMAP_DISPLAY_TYPE_HDMI;
544 out->name = "hdmi.0";
545 out->dispc_channel = OMAP_DSS_CHANNEL_DIGIT;
546 out->ops.hdmi = &hdmi_ops;
547 out->owner = THIS_MODULE;
549 omapdss_register_output(out);
552 static void hdmi_uninit_output(struct platform_device *pdev)
554 struct omap_dss_device *out = &hdmi.output;
556 omapdss_unregister_output(out);
559 static int hdmi_probe_of(struct platform_device *pdev)
561 struct device_node *node = pdev->dev.of_node;
562 struct device_node *ep;
563 int r;
565 ep = of_graph_get_endpoint_by_regs(node, 0, -1);
566 if (!ep)
567 return 0;
569 r = hdmi_parse_lanes_of(pdev, ep, &hdmi.phy);
570 if (r)
571 goto err;
573 of_node_put(ep);
574 return 0;
576 err:
577 of_node_put(ep);
578 return r;
581 /* Audio callbacks */
582 static int hdmi_audio_startup(struct device *dev,
583 void (*abort_cb)(struct device *dev))
585 struct omap_hdmi *hd = dev_get_drvdata(dev);
586 int ret = 0;
588 mutex_lock(&hd->lock);
590 if (!hdmi_mode_has_audio(&hd->cfg) || !hd->display_enabled) {
591 ret = -EPERM;
592 goto out;
595 hd->audio_abort_cb = abort_cb;
597 out:
598 mutex_unlock(&hd->lock);
600 return ret;
603 static int hdmi_audio_shutdown(struct device *dev)
605 struct omap_hdmi *hd = dev_get_drvdata(dev);
607 mutex_lock(&hd->lock);
608 hd->audio_abort_cb = NULL;
609 hd->audio_configured = false;
610 hd->audio_playing = false;
611 mutex_unlock(&hd->lock);
613 return 0;
616 static int hdmi_audio_start(struct device *dev)
618 struct omap_hdmi *hd = dev_get_drvdata(dev);
619 unsigned long flags;
621 WARN_ON(!hdmi_mode_has_audio(&hd->cfg));
623 spin_lock_irqsave(&hd->audio_playing_lock, flags);
625 if (hd->display_enabled)
626 hdmi_start_audio_stream(hd);
627 hd->audio_playing = true;
629 spin_unlock_irqrestore(&hd->audio_playing_lock, flags);
630 return 0;
633 static void hdmi_audio_stop(struct device *dev)
635 struct omap_hdmi *hd = dev_get_drvdata(dev);
636 unsigned long flags;
638 WARN_ON(!hdmi_mode_has_audio(&hd->cfg));
640 spin_lock_irqsave(&hd->audio_playing_lock, flags);
642 if (hd->display_enabled)
643 hdmi_stop_audio_stream(hd);
644 hd->audio_playing = false;
646 spin_unlock_irqrestore(&hd->audio_playing_lock, flags);
649 static int hdmi_audio_config(struct device *dev,
650 struct omap_dss_audio *dss_audio)
652 struct omap_hdmi *hd = dev_get_drvdata(dev);
653 int ret;
655 mutex_lock(&hd->lock);
657 if (!hdmi_mode_has_audio(&hd->cfg) || !hd->display_enabled) {
658 ret = -EPERM;
659 goto out;
662 ret = hdmi5_audio_config(&hd->core, &hd->wp, dss_audio,
663 hd->cfg.timings.pixelclock);
665 if (!ret) {
666 hd->audio_configured = true;
667 hd->audio_config = *dss_audio;
669 out:
670 mutex_unlock(&hd->lock);
672 return ret;
675 static const struct omap_hdmi_audio_ops hdmi_audio_ops = {
676 .audio_startup = hdmi_audio_startup,
677 .audio_shutdown = hdmi_audio_shutdown,
678 .audio_start = hdmi_audio_start,
679 .audio_stop = hdmi_audio_stop,
680 .audio_config = hdmi_audio_config,
683 static int hdmi_audio_register(struct device *dev)
685 struct omap_hdmi_audio_pdata pdata = {
686 .dev = dev,
687 .version = 5,
688 .audio_dma_addr = hdmi_wp_get_audio_dma_addr(&hdmi.wp),
689 .ops = &hdmi_audio_ops,
692 hdmi.audio_pdev = platform_device_register_data(
693 dev, "omap-hdmi-audio", PLATFORM_DEVID_AUTO,
694 &pdata, sizeof(pdata));
696 if (IS_ERR(hdmi.audio_pdev))
697 return PTR_ERR(hdmi.audio_pdev);
699 hdmi_runtime_get();
700 hdmi.wp_idlemode =
701 REG_GET(hdmi.wp.base, HDMI_WP_SYSCONFIG, 3, 2);
702 hdmi_runtime_put();
704 return 0;
707 /* HDMI HW IP initialisation */
708 static int hdmi5_bind(struct device *dev, struct device *master, void *data)
710 struct platform_device *pdev = to_platform_device(dev);
711 int r;
712 int irq;
714 hdmi.pdev = pdev;
715 platform_set_drvdata(pdev, &hdmi);
717 mutex_init(&hdmi.lock);
718 spin_lock_init(&hdmi.audio_playing_lock);
720 if (pdev->dev.of_node) {
721 r = hdmi_probe_of(pdev);
722 if (r)
723 return r;
726 r = hdmi_wp_init(pdev, &hdmi.wp);
727 if (r)
728 return r;
730 r = hdmi_pll_init(pdev, &hdmi.pll, &hdmi.wp);
731 if (r)
732 return r;
734 r = hdmi_phy_init(pdev, &hdmi.phy);
735 if (r)
736 goto err;
738 r = hdmi5_core_init(pdev, &hdmi.core);
739 if (r)
740 goto err;
742 irq = platform_get_irq(pdev, 0);
743 if (irq < 0) {
744 DSSERR("platform_get_irq failed\n");
745 r = -ENODEV;
746 goto err;
749 r = devm_request_threaded_irq(&pdev->dev, irq,
750 NULL, hdmi_irq_handler,
751 IRQF_ONESHOT, "OMAP HDMI", &hdmi.wp);
752 if (r) {
753 DSSERR("HDMI IRQ request failed\n");
754 goto err;
757 pm_runtime_enable(&pdev->dev);
759 hdmi_init_output(pdev);
761 r = hdmi_audio_register(&pdev->dev);
762 if (r) {
763 DSSERR("Registering HDMI audio failed %d\n", r);
764 hdmi_uninit_output(pdev);
765 pm_runtime_disable(&pdev->dev);
766 return r;
769 dss_debugfs_create_file("hdmi", hdmi_dump_regs);
771 return 0;
772 err:
773 hdmi_pll_uninit(&hdmi.pll);
774 return r;
777 static void hdmi5_unbind(struct device *dev, struct device *master, void *data)
779 struct platform_device *pdev = to_platform_device(dev);
781 if (hdmi.audio_pdev)
782 platform_device_unregister(hdmi.audio_pdev);
784 hdmi_uninit_output(pdev);
786 hdmi_pll_uninit(&hdmi.pll);
788 pm_runtime_disable(&pdev->dev);
791 static const struct component_ops hdmi5_component_ops = {
792 .bind = hdmi5_bind,
793 .unbind = hdmi5_unbind,
796 static int hdmi5_probe(struct platform_device *pdev)
798 return component_add(&pdev->dev, &hdmi5_component_ops);
801 static void hdmi5_remove(struct platform_device *pdev)
803 component_del(&pdev->dev, &hdmi5_component_ops);
806 static int hdmi_runtime_suspend(struct device *dev)
808 dispc_runtime_put();
810 return 0;
813 static int hdmi_runtime_resume(struct device *dev)
815 int r;
817 r = dispc_runtime_get();
818 if (r < 0)
819 return r;
821 return 0;
824 static const struct dev_pm_ops hdmi_pm_ops = {
825 .runtime_suspend = hdmi_runtime_suspend,
826 .runtime_resume = hdmi_runtime_resume,
829 static const struct of_device_id hdmi_of_match[] = {
830 { .compatible = "ti,omap5-hdmi", },
831 { .compatible = "ti,dra7-hdmi", },
835 static struct platform_driver omapdss_hdmihw_driver = {
836 .probe = hdmi5_probe,
837 .remove = hdmi5_remove,
838 .driver = {
839 .name = "omapdss_hdmi5",
840 .pm = &hdmi_pm_ops,
841 .of_match_table = hdmi_of_match,
842 .suppress_bind_attrs = true,
846 int __init hdmi5_init_platform_driver(void)
848 return platform_driver_register(&omapdss_hdmihw_driver);
851 void hdmi5_uninit_platform_driver(void)
853 platform_driver_unregister(&omapdss_hdmihw_driver);