diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2014-04-17 12:54:02 +0300 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2014-05-07 11:31:11 +0300 |
commit | 2f5dc676bf19f2e9601421924f2de67fa7a599b0 (patch) | |
tree | 8909aa4709747a7b51693af1c9860c5501862e8e /drivers/video/fbdev/omap2/dss/hdmi4.c | |
parent | f8be053fc17d776f0505febf035c0a8cd20cc4b2 (diff) |
OMAPDSS: HDMI: lane config support
Add support to configure the pins used for the HDMI lanes. The order and
polarity of the lanes can be defined in the DT data.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video/fbdev/omap2/dss/hdmi4.c')
-rw-r--r-- | drivers/video/fbdev/omap2/dss/hdmi4.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/drivers/video/fbdev/omap2/dss/hdmi4.c b/drivers/video/fbdev/omap2/dss/hdmi4.c index f5f7944a1fd1..e15b89d49c28 100644 --- a/drivers/video/fbdev/omap2/dss/hdmi4.c +++ b/drivers/video/fbdev/omap2/dss/hdmi4.c @@ -600,6 +600,28 @@ static void __exit hdmi_uninit_output(struct platform_device *pdev) omapdss_unregister_output(out); } +static int hdmi_probe_of(struct platform_device *pdev) +{ + struct device_node *node = pdev->dev.of_node; + struct device_node *ep; + int r; + + ep = omapdss_of_get_first_endpoint(node); + if (!ep) + return 0; + + r = hdmi_parse_lanes_of(pdev, ep, &hdmi.phy); + if (r) + goto err; + + of_node_put(ep); + return 0; + +err: + of_node_put(ep); + return r; +} + /* HDMI HW IP initialisation */ static int omapdss_hdmihw_probe(struct platform_device *pdev) { @@ -609,6 +631,12 @@ static int omapdss_hdmihw_probe(struct platform_device *pdev) mutex_init(&hdmi.lock); + if (pdev->dev.of_node) { + r = hdmi_probe_of(pdev); + if (r) + return r; + } + r = hdmi_wp_init(pdev, &hdmi.wp); if (r) return r; |