2011-03-12 13:34:27 +07:00
|
|
|
/*
|
2013-09-12 19:15:57 +07:00
|
|
|
* HDMI interface DSS driver for TI's OMAP4 family of SoCs.
|
2011-03-12 13:34:27 +07:00
|
|
|
* Copyright (C) 2010-2011 Texas Instruments Incorporated - http://www.ti.com/
|
|
|
|
* Authors: Yong Zhi
|
|
|
|
* Mythri pk <mythripk@ti.com>
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify it
|
|
|
|
* under the terms of the GNU General Public License version 2 as published by
|
|
|
|
* the Free Software Foundation.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
|
|
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
|
|
|
* more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along with
|
|
|
|
* this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#define DSS_SUBSYS_NAME "HDMI"
|
|
|
|
|
|
|
|
#include <linux/kernel.h>
|
|
|
|
#include <linux/module.h>
|
|
|
|
#include <linux/err.h>
|
|
|
|
#include <linux/io.h>
|
|
|
|
#include <linux/interrupt.h>
|
|
|
|
#include <linux/mutex.h>
|
|
|
|
#include <linux/delay.h>
|
|
|
|
#include <linux/string.h>
|
2011-05-23 15:51:18 +07:00
|
|
|
#include <linux/platform_device.h>
|
2011-05-27 14:52:19 +07:00
|
|
|
#include <linux/pm_runtime.h>
|
|
|
|
#include <linux/clk.h>
|
2012-04-26 18:48:32 +07:00
|
|
|
#include <linux/gpio.h>
|
2012-08-15 19:55:04 +07:00
|
|
|
#include <linux/regulator/consumer.h>
|
2011-05-11 18:05:07 +07:00
|
|
|
#include <video/omapdss.h>
|
2011-03-12 13:34:27 +07:00
|
|
|
|
2013-09-12 19:15:57 +07:00
|
|
|
#include "hdmi4_core.h"
|
2011-03-12 13:34:27 +07:00
|
|
|
#include "dss.h"
|
2011-05-19 10:31:56 +07:00
|
|
|
#include "dss_features.h"
|
2011-03-12 13:34:27 +07:00
|
|
|
|
|
|
|
static struct {
|
|
|
|
struct mutex lock;
|
|
|
|
struct platform_device *pdev;
|
2012-11-06 13:19:14 +07:00
|
|
|
|
2013-10-08 15:52:03 +07:00
|
|
|
struct hdmi_wp_data wp;
|
|
|
|
struct hdmi_pll_data pll;
|
|
|
|
struct hdmi_phy_data phy;
|
|
|
|
struct hdmi_core_data core;
|
|
|
|
|
|
|
|
struct hdmi_config cfg;
|
2011-05-27 14:52:19 +07:00
|
|
|
|
|
|
|
struct clk *sys_clk;
|
2012-08-15 19:55:04 +07:00
|
|
|
struct regulator *vdda_hdmi_dac_reg;
|
2012-04-26 18:48:32 +07:00
|
|
|
|
2013-05-24 17:20:17 +07:00
|
|
|
bool core_enabled;
|
|
|
|
|
OMAPDSS: combine omap_dss_output into omap_dss_device
We currently have omap_dss_device, which represents an external display
device, sometimes an external encoder, sometimes a panel. Then we have
omap_dss_output, which represents DSS's output encoder.
In the future with new display device model, we construct a video
pipeline from the display blocks. To accomplish this, all the blocks
need to be presented by the same entity.
Thus, this patch combines omap_dss_output into omap_dss_device. Some of
the fields in omap_dss_output are already found in omap_dss_device, but
some are not. This means we'll have DSS output specific fields in
omap_dss_device, which is not very nice. However, it is easier to just
keep those output specific fields there for now, and after transition to
new display device model is made, they can be cleaned up easier than
could be done now.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-04-19 19:09:34 +07:00
|
|
|
struct omap_dss_device output;
|
2011-03-12 13:34:27 +07:00
|
|
|
} hdmi;
|
|
|
|
|
2011-05-27 14:52:19 +07:00
|
|
|
static int hdmi_runtime_get(void)
|
|
|
|
{
|
|
|
|
int r;
|
|
|
|
|
|
|
|
DSSDBG("hdmi_runtime_get\n");
|
|
|
|
|
|
|
|
r = pm_runtime_get_sync(&hdmi.pdev->dev);
|
|
|
|
WARN_ON(r < 0);
|
2012-02-10 13:15:52 +07:00
|
|
|
if (r < 0)
|
2012-02-17 22:58:04 +07:00
|
|
|
return r;
|
2012-02-10 13:15:52 +07:00
|
|
|
|
|
|
|
return 0;
|
2011-05-27 14:52:19 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
static void hdmi_runtime_put(void)
|
|
|
|
{
|
|
|
|
int r;
|
|
|
|
|
|
|
|
DSSDBG("hdmi_runtime_put\n");
|
|
|
|
|
2012-01-23 18:23:08 +07:00
|
|
|
r = pm_runtime_put_sync(&hdmi.pdev->dev);
|
2012-06-27 20:37:18 +07:00
|
|
|
WARN_ON(r < 0 && r != -ENOSYS);
|
2011-05-27 14:52:19 +07:00
|
|
|
}
|
|
|
|
|
2013-05-10 19:20:52 +07:00
|
|
|
static int hdmi_init_regulator(void)
|
|
|
|
{
|
|
|
|
struct regulator *reg;
|
|
|
|
|
|
|
|
if (hdmi.vdda_hdmi_dac_reg != NULL)
|
|
|
|
return 0;
|
|
|
|
|
2013-06-10 18:05:10 +07:00
|
|
|
reg = devm_regulator_get(&hdmi.pdev->dev, "vdda");
|
2013-05-10 19:20:52 +07:00
|
|
|
|
|
|
|
if (IS_ERR(reg)) {
|
2013-12-19 21:15:34 +07:00
|
|
|
if (PTR_ERR(reg) != -EPROBE_DEFER)
|
2013-06-10 18:05:10 +07:00
|
|
|
DSSERR("can't get VDDA regulator\n");
|
2013-05-10 19:20:52 +07:00
|
|
|
return PTR_ERR(reg);
|
|
|
|
}
|
|
|
|
|
|
|
|
hdmi.vdda_hdmi_dac_reg = reg;
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2012-10-19 21:42:10 +07:00
|
|
|
static int hdmi_power_on_core(struct omap_dss_device *dssdev)
|
2011-03-12 13:34:27 +07:00
|
|
|
{
|
2012-01-06 19:22:09 +07:00
|
|
|
int r;
|
2011-03-12 13:34:27 +07:00
|
|
|
|
2012-08-15 19:55:04 +07:00
|
|
|
r = regulator_enable(hdmi.vdda_hdmi_dac_reg);
|
|
|
|
if (r)
|
2013-05-15 14:48:45 +07:00
|
|
|
return r;
|
2012-08-15 19:55:04 +07:00
|
|
|
|
2011-05-27 14:52:19 +07:00
|
|
|
r = hdmi_runtime_get();
|
|
|
|
if (r)
|
2012-04-26 18:48:32 +07:00
|
|
|
goto err_runtime_get;
|
2011-03-12 13:34:27 +07:00
|
|
|
|
2012-10-19 21:42:10 +07:00
|
|
|
/* Make selection of HDMI in DSS */
|
|
|
|
dss_select_hdmi_venc_clk_source(DSS_HDMI_M_PCLK);
|
|
|
|
|
2013-05-24 17:20:17 +07:00
|
|
|
hdmi.core_enabled = true;
|
|
|
|
|
2012-10-19 21:42:10 +07:00
|
|
|
return 0;
|
|
|
|
|
|
|
|
err_runtime_get:
|
|
|
|
regulator_disable(hdmi.vdda_hdmi_dac_reg);
|
2013-05-15 14:48:45 +07:00
|
|
|
|
2012-10-19 21:42:10 +07:00
|
|
|
return r;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void hdmi_power_off_core(struct omap_dss_device *dssdev)
|
|
|
|
{
|
2013-05-24 17:20:17 +07:00
|
|
|
hdmi.core_enabled = false;
|
|
|
|
|
2012-10-19 21:42:10 +07:00
|
|
|
hdmi_runtime_put();
|
|
|
|
regulator_disable(hdmi.vdda_hdmi_dac_reg);
|
|
|
|
}
|
|
|
|
|
|
|
|
static int hdmi_power_on_full(struct omap_dss_device *dssdev)
|
|
|
|
{
|
|
|
|
int r;
|
|
|
|
struct omap_video_timings *p;
|
2013-05-10 19:27:07 +07:00
|
|
|
struct omap_overlay_manager *mgr = hdmi.output.manager;
|
2012-10-19 21:42:10 +07:00
|
|
|
unsigned long phy;
|
|
|
|
|
|
|
|
r = hdmi_power_on_core(dssdev);
|
|
|
|
if (r)
|
|
|
|
return r;
|
|
|
|
|
2013-10-08 15:52:03 +07:00
|
|
|
p = &hdmi.cfg.timings;
|
2011-03-12 13:34:27 +07:00
|
|
|
|
2012-08-08 18:20:42 +07:00
|
|
|
DSSDBG("hdmi_power_on x_res= %d y_res = %d\n", p->x_res, p->y_res);
|
2011-03-12 13:34:27 +07:00
|
|
|
|
2013-04-10 18:12:14 +07:00
|
|
|
/* the functions below use kHz pixel clock. TODO: change to Hz */
|
|
|
|
phy = p->pixelclock / 1000;
|
2011-03-12 13:34:27 +07:00
|
|
|
|
2013-10-08 15:52:03 +07:00
|
|
|
hdmi_pll_compute(&hdmi.pll, clk_get_rate(hdmi.sys_clk), phy);
|
2011-03-12 13:34:27 +07:00
|
|
|
|
2011-09-08 20:36:18 +07:00
|
|
|
/* config the PLL and PHY hdmi_set_pll_pwrfirst */
|
2013-10-08 15:52:03 +07:00
|
|
|
r = hdmi_pll_enable(&hdmi.pll, &hdmi.wp);
|
2011-03-12 13:34:27 +07:00
|
|
|
if (r) {
|
|
|
|
DSSDBG("Failed to lock PLL\n");
|
2012-04-26 18:48:32 +07:00
|
|
|
goto err_pll_enable;
|
2011-03-12 13:34:27 +07:00
|
|
|
}
|
|
|
|
|
2013-10-08 15:52:03 +07:00
|
|
|
r = hdmi_phy_enable(&hdmi.phy, &hdmi.wp, &hdmi.cfg);
|
2011-03-12 13:34:27 +07:00
|
|
|
if (r) {
|
|
|
|
DSSDBG("Failed to start PHY\n");
|
2012-07-31 07:12:02 +07:00
|
|
|
goto err_phy_enable;
|
2011-03-12 13:34:27 +07:00
|
|
|
}
|
|
|
|
|
2013-10-08 15:52:03 +07:00
|
|
|
hdmi4_configure(&hdmi.core, &hdmi.wp, &hdmi.cfg);
|
2011-03-12 13:34:27 +07:00
|
|
|
|
|
|
|
/* bypass TV gamma table */
|
|
|
|
dispc_enable_gamma_table(0);
|
|
|
|
|
|
|
|
/* tv size */
|
2012-09-07 19:26:20 +07:00
|
|
|
dss_mgr_set_timings(mgr, p);
|
2011-03-12 13:34:27 +07:00
|
|
|
|
2013-10-08 15:52:03 +07:00
|
|
|
r = hdmi_wp_video_start(&hdmi.wp);
|
2012-04-28 01:48:45 +07:00
|
|
|
if (r)
|
|
|
|
goto err_vid_enable;
|
2011-03-12 13:34:27 +07:00
|
|
|
|
2012-09-07 19:26:20 +07:00
|
|
|
r = dss_mgr_enable(mgr);
|
2011-11-21 18:42:58 +07:00
|
|
|
if (r)
|
|
|
|
goto err_mgr_enable;
|
2011-08-31 18:47:11 +07:00
|
|
|
|
2011-03-12 13:34:27 +07:00
|
|
|
return 0;
|
2011-11-21 18:42:58 +07:00
|
|
|
|
|
|
|
err_mgr_enable:
|
2013-10-08 15:52:03 +07:00
|
|
|
hdmi_wp_video_stop(&hdmi.wp);
|
2012-04-28 01:48:45 +07:00
|
|
|
err_vid_enable:
|
2013-10-08 15:52:03 +07:00
|
|
|
hdmi_phy_disable(&hdmi.phy, &hdmi.wp);
|
2012-07-31 07:12:02 +07:00
|
|
|
err_phy_enable:
|
2013-10-08 15:52:03 +07:00
|
|
|
hdmi_pll_disable(&hdmi.pll, &hdmi.wp);
|
2012-04-26 18:48:32 +07:00
|
|
|
err_pll_enable:
|
2012-10-19 21:42:10 +07:00
|
|
|
hdmi_power_off_core(dssdev);
|
2011-03-12 13:34:27 +07:00
|
|
|
return -EIO;
|
|
|
|
}
|
|
|
|
|
2012-10-19 21:42:10 +07:00
|
|
|
static void hdmi_power_off_full(struct omap_dss_device *dssdev)
|
2011-03-12 13:34:27 +07:00
|
|
|
{
|
2013-05-10 19:27:07 +07:00
|
|
|
struct omap_overlay_manager *mgr = hdmi.output.manager;
|
2012-09-07 19:26:20 +07:00
|
|
|
|
|
|
|
dss_mgr_disable(mgr);
|
2011-03-12 13:34:27 +07:00
|
|
|
|
2013-10-08 15:52:03 +07:00
|
|
|
hdmi_wp_video_stop(&hdmi.wp);
|
|
|
|
hdmi_phy_disable(&hdmi.phy, &hdmi.wp);
|
|
|
|
hdmi_pll_disable(&hdmi.pll, &hdmi.wp);
|
2012-08-15 19:55:04 +07:00
|
|
|
|
2012-10-19 21:42:10 +07:00
|
|
|
hdmi_power_off_core(dssdev);
|
2011-03-12 13:34:27 +07:00
|
|
|
}
|
|
|
|
|
2013-05-15 14:48:45 +07:00
|
|
|
static int hdmi_display_check_timing(struct omap_dss_device *dssdev,
|
2011-03-12 13:34:27 +07:00
|
|
|
struct omap_video_timings *timings)
|
|
|
|
{
|
2013-12-09 21:09:08 +07:00
|
|
|
struct omap_dss_device *out = &hdmi.output;
|
2011-03-12 13:34:27 +07:00
|
|
|
|
2013-12-09 21:09:08 +07:00
|
|
|
if (!dispc_mgr_timings_ok(out->dispc_channel, timings))
|
2011-03-12 13:34:27 +07:00
|
|
|
return -EINVAL;
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2013-05-15 14:48:45 +07:00
|
|
|
static void hdmi_display_set_timing(struct omap_dss_device *dssdev,
|
2012-08-08 18:20:42 +07:00
|
|
|
struct omap_video_timings *timings)
|
2011-03-12 13:34:27 +07:00
|
|
|
{
|
|
|
|
struct hdmi_cm cm;
|
2012-08-08 18:20:42 +07:00
|
|
|
const struct hdmi_config *t;
|
2011-03-12 13:34:27 +07:00
|
|
|
|
2012-08-15 02:10:31 +07:00
|
|
|
mutex_lock(&hdmi.lock);
|
|
|
|
|
2012-08-08 18:20:42 +07:00
|
|
|
cm = hdmi_get_code(timings);
|
2013-10-08 15:52:03 +07:00
|
|
|
hdmi.cfg.cm = cm;
|
2012-08-08 18:20:42 +07:00
|
|
|
|
2013-09-17 13:13:15 +07:00
|
|
|
t = hdmi_get_timings(cm.mode, cm.code);
|
2013-08-27 18:11:48 +07:00
|
|
|
if (t != NULL) {
|
2013-10-08 15:52:03 +07:00
|
|
|
hdmi.cfg = *t;
|
2011-08-22 18:57:33 +07:00
|
|
|
|
2013-04-10 18:12:14 +07:00
|
|
|
dispc_set_tv_pclk(t->timings.pixelclock);
|
2013-12-09 21:09:08 +07:00
|
|
|
} else {
|
|
|
|
hdmi.cfg.timings = *timings;
|
|
|
|
hdmi.cfg.cm.code = 0;
|
|
|
|
hdmi.cfg.cm.mode = HDMI_DVI;
|
|
|
|
|
2013-04-10 18:12:14 +07:00
|
|
|
dispc_set_tv_pclk(timings->pixelclock);
|
2013-08-27 18:11:48 +07:00
|
|
|
}
|
2013-05-16 14:44:13 +07:00
|
|
|
|
2013-12-09 21:09:08 +07:00
|
|
|
DSSDBG("using mode: %s, code %d\n", hdmi.cfg.cm.mode == HDMI_DVI ?
|
|
|
|
"DVI" : "HDMI", hdmi.cfg.cm.code);
|
|
|
|
|
2012-08-15 02:10:31 +07:00
|
|
|
mutex_unlock(&hdmi.lock);
|
2011-03-12 13:34:27 +07:00
|
|
|
}
|
|
|
|
|
2013-05-15 14:48:45 +07:00
|
|
|
static void hdmi_display_get_timings(struct omap_dss_device *dssdev,
|
2013-05-24 17:20:17 +07:00
|
|
|
struct omap_video_timings *timings)
|
|
|
|
{
|
|
|
|
const struct hdmi_config *cfg;
|
2013-09-17 13:13:15 +07:00
|
|
|
struct hdmi_cm cm = hdmi.cfg.cm;
|
2013-05-24 17:20:17 +07:00
|
|
|
|
2013-09-17 13:13:15 +07:00
|
|
|
cfg = hdmi_get_timings(cm.mode, cm.code);
|
2013-05-24 17:20:17 +07:00
|
|
|
if (cfg == NULL)
|
2013-09-17 13:13:15 +07:00
|
|
|
cfg = hdmi_default_timing();
|
2013-05-24 17:20:17 +07:00
|
|
|
|
|
|
|
memcpy(timings, &cfg->timings, sizeof(cfg->timings));
|
|
|
|
}
|
|
|
|
|
2012-03-02 23:01:07 +07:00
|
|
|
static void hdmi_dump_regs(struct seq_file *s)
|
2011-09-22 15:07:45 +07:00
|
|
|
{
|
|
|
|
mutex_lock(&hdmi.lock);
|
|
|
|
|
2012-10-21 19:54:26 +07:00
|
|
|
if (hdmi_runtime_get()) {
|
|
|
|
mutex_unlock(&hdmi.lock);
|
2011-09-22 15:07:45 +07:00
|
|
|
return;
|
2012-10-21 19:54:26 +07:00
|
|
|
}
|
2011-09-22 15:07:45 +07:00
|
|
|
|
2013-10-08 15:52:03 +07:00
|
|
|
hdmi_wp_dump(&hdmi.wp, s);
|
|
|
|
hdmi_pll_dump(&hdmi.pll, s);
|
|
|
|
hdmi_phy_dump(&hdmi.phy, s);
|
|
|
|
hdmi4_core_dump(&hdmi.core, s);
|
2011-09-22 15:07:45 +07:00
|
|
|
|
|
|
|
hdmi_runtime_put();
|
|
|
|
mutex_unlock(&hdmi.lock);
|
|
|
|
}
|
|
|
|
|
2013-05-15 14:48:45 +07:00
|
|
|
static int read_edid(u8 *buf, int len)
|
2011-08-25 21:12:56 +07:00
|
|
|
{
|
|
|
|
int r;
|
|
|
|
|
|
|
|
mutex_lock(&hdmi.lock);
|
|
|
|
|
|
|
|
r = hdmi_runtime_get();
|
|
|
|
BUG_ON(r);
|
|
|
|
|
2013-10-08 15:52:03 +07:00
|
|
|
r = hdmi4_read_edid(&hdmi.core, buf, len);
|
2011-08-25 21:12:56 +07:00
|
|
|
|
|
|
|
hdmi_runtime_put();
|
|
|
|
mutex_unlock(&hdmi.lock);
|
|
|
|
|
|
|
|
return r;
|
|
|
|
}
|
|
|
|
|
2013-05-15 14:48:45 +07:00
|
|
|
static int hdmi_display_enable(struct omap_dss_device *dssdev)
|
2011-03-12 13:34:27 +07:00
|
|
|
{
|
OMAPDSS: combine omap_dss_output into omap_dss_device
We currently have omap_dss_device, which represents an external display
device, sometimes an external encoder, sometimes a panel. Then we have
omap_dss_output, which represents DSS's output encoder.
In the future with new display device model, we construct a video
pipeline from the display blocks. To accomplish this, all the blocks
need to be presented by the same entity.
Thus, this patch combines omap_dss_output into omap_dss_device. Some of
the fields in omap_dss_output are already found in omap_dss_device, but
some are not. This means we'll have DSS output specific fields in
omap_dss_device, which is not very nice. However, it is easier to just
keep those output specific fields there for now, and after transition to
new display device model is made, they can be cleaned up easier than
could be done now.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-04-19 19:09:34 +07:00
|
|
|
struct omap_dss_device *out = &hdmi.output;
|
2011-03-12 13:34:27 +07:00
|
|
|
int r = 0;
|
|
|
|
|
|
|
|
DSSDBG("ENTER hdmi_display_enable\n");
|
|
|
|
|
|
|
|
mutex_lock(&hdmi.lock);
|
|
|
|
|
2012-09-07 19:26:20 +07:00
|
|
|
if (out == NULL || out->manager == NULL) {
|
|
|
|
DSSERR("failed to enable display: no output/manager\n");
|
2011-06-23 20:38:21 +07:00
|
|
|
r = -ENODEV;
|
|
|
|
goto err0;
|
|
|
|
}
|
|
|
|
|
2012-10-19 21:42:10 +07:00
|
|
|
r = hdmi_power_on_full(dssdev);
|
2011-03-12 13:34:27 +07:00
|
|
|
if (r) {
|
|
|
|
DSSERR("failed to power on device\n");
|
2013-04-25 17:12:07 +07:00
|
|
|
goto err0;
|
2011-03-12 13:34:27 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
mutex_unlock(&hdmi.lock);
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
err0:
|
|
|
|
mutex_unlock(&hdmi.lock);
|
|
|
|
return r;
|
|
|
|
}
|
|
|
|
|
2013-05-15 14:48:45 +07:00
|
|
|
static void hdmi_display_disable(struct omap_dss_device *dssdev)
|
2011-03-12 13:34:27 +07:00
|
|
|
{
|
|
|
|
DSSDBG("Enter hdmi_display_disable\n");
|
|
|
|
|
|
|
|
mutex_lock(&hdmi.lock);
|
|
|
|
|
2012-10-19 21:42:10 +07:00
|
|
|
hdmi_power_off_full(dssdev);
|
2011-03-12 13:34:27 +07:00
|
|
|
|
|
|
|
mutex_unlock(&hdmi.lock);
|
|
|
|
}
|
|
|
|
|
2013-05-15 14:48:45 +07:00
|
|
|
static int hdmi_core_enable(struct omap_dss_device *dssdev)
|
2012-10-19 21:42:27 +07:00
|
|
|
{
|
|
|
|
int r = 0;
|
|
|
|
|
|
|
|
DSSDBG("ENTER omapdss_hdmi_core_enable\n");
|
|
|
|
|
|
|
|
mutex_lock(&hdmi.lock);
|
|
|
|
|
|
|
|
r = hdmi_power_on_core(dssdev);
|
|
|
|
if (r) {
|
|
|
|
DSSERR("failed to power on device\n");
|
|
|
|
goto err0;
|
|
|
|
}
|
|
|
|
|
|
|
|
mutex_unlock(&hdmi.lock);
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
err0:
|
|
|
|
mutex_unlock(&hdmi.lock);
|
|
|
|
return r;
|
|
|
|
}
|
|
|
|
|
2013-05-15 14:48:45 +07:00
|
|
|
static void hdmi_core_disable(struct omap_dss_device *dssdev)
|
2012-10-19 21:42:27 +07:00
|
|
|
{
|
|
|
|
DSSDBG("Enter omapdss_hdmi_core_disable\n");
|
|
|
|
|
|
|
|
mutex_lock(&hdmi.lock);
|
|
|
|
|
|
|
|
hdmi_power_off_core(dssdev);
|
|
|
|
|
|
|
|
mutex_unlock(&hdmi.lock);
|
|
|
|
}
|
|
|
|
|
2011-05-27 14:52:19 +07:00
|
|
|
static int hdmi_get_clocks(struct platform_device *pdev)
|
|
|
|
{
|
|
|
|
struct clk *clk;
|
|
|
|
|
2013-04-08 15:55:00 +07:00
|
|
|
clk = devm_clk_get(&pdev->dev, "sys_clk");
|
2011-05-27 14:52:19 +07:00
|
|
|
if (IS_ERR(clk)) {
|
|
|
|
DSSERR("can't get sys_clk\n");
|
|
|
|
return PTR_ERR(clk);
|
|
|
|
}
|
|
|
|
|
|
|
|
hdmi.sys_clk = clk;
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2013-05-24 17:20:17 +07:00
|
|
|
static int hdmi_connect(struct omap_dss_device *dssdev,
|
|
|
|
struct omap_dss_device *dst)
|
|
|
|
{
|
|
|
|
struct omap_overlay_manager *mgr;
|
|
|
|
int r;
|
|
|
|
|
|
|
|
r = hdmi_init_regulator();
|
|
|
|
if (r)
|
|
|
|
return r;
|
|
|
|
|
|
|
|
mgr = omap_dss_get_overlay_manager(dssdev->dispc_channel);
|
|
|
|
if (!mgr)
|
|
|
|
return -ENODEV;
|
|
|
|
|
|
|
|
r = dss_mgr_connect(mgr, dssdev);
|
|
|
|
if (r)
|
|
|
|
return r;
|
|
|
|
|
|
|
|
r = omapdss_output_set_device(dssdev, dst);
|
|
|
|
if (r) {
|
|
|
|
DSSERR("failed to connect output to new device: %s\n",
|
|
|
|
dst->name);
|
|
|
|
dss_mgr_disconnect(mgr, dssdev);
|
|
|
|
return r;
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void hdmi_disconnect(struct omap_dss_device *dssdev,
|
|
|
|
struct omap_dss_device *dst)
|
|
|
|
{
|
2013-07-24 17:06:54 +07:00
|
|
|
WARN_ON(dst != dssdev->dst);
|
2013-05-24 17:20:17 +07:00
|
|
|
|
2013-07-24 17:06:54 +07:00
|
|
|
if (dst != dssdev->dst)
|
2013-05-24 17:20:17 +07:00
|
|
|
return;
|
|
|
|
|
|
|
|
omapdss_output_unset_device(dssdev);
|
|
|
|
|
|
|
|
if (dssdev->manager)
|
|
|
|
dss_mgr_disconnect(dssdev->manager, dssdev);
|
|
|
|
}
|
|
|
|
|
|
|
|
static int hdmi_read_edid(struct omap_dss_device *dssdev,
|
|
|
|
u8 *edid, int len)
|
|
|
|
{
|
|
|
|
bool need_enable;
|
|
|
|
int r;
|
|
|
|
|
|
|
|
need_enable = hdmi.core_enabled == false;
|
|
|
|
|
|
|
|
if (need_enable) {
|
2013-05-15 14:48:45 +07:00
|
|
|
r = hdmi_core_enable(dssdev);
|
2013-05-24 17:20:17 +07:00
|
|
|
if (r)
|
|
|
|
return r;
|
|
|
|
}
|
|
|
|
|
2013-05-15 14:48:45 +07:00
|
|
|
r = read_edid(edid, len);
|
2013-05-24 17:20:17 +07:00
|
|
|
|
|
|
|
if (need_enable)
|
2013-05-15 14:48:45 +07:00
|
|
|
hdmi_core_disable(dssdev);
|
2013-05-24 17:20:17 +07:00
|
|
|
|
|
|
|
return r;
|
|
|
|
}
|
|
|
|
|
|
|
|
#if defined(CONFIG_OMAP4_DSS_HDMI_AUDIO)
|
2013-05-15 14:48:45 +07:00
|
|
|
static int hdmi_audio_enable(struct omap_dss_device *dssdev)
|
2013-05-24 17:20:17 +07:00
|
|
|
{
|
|
|
|
int r;
|
|
|
|
|
|
|
|
mutex_lock(&hdmi.lock);
|
|
|
|
|
2013-09-17 13:13:15 +07:00
|
|
|
if (!hdmi_mode_has_audio(hdmi.cfg.cm.mode)) {
|
2013-05-24 17:20:17 +07:00
|
|
|
r = -EPERM;
|
|
|
|
goto err;
|
|
|
|
}
|
|
|
|
|
2013-10-08 15:52:03 +07:00
|
|
|
r = hdmi_wp_audio_enable(&hdmi.wp, true);
|
2013-05-24 17:20:17 +07:00
|
|
|
if (r)
|
|
|
|
goto err;
|
|
|
|
|
|
|
|
mutex_unlock(&hdmi.lock);
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
err:
|
|
|
|
mutex_unlock(&hdmi.lock);
|
|
|
|
return r;
|
|
|
|
}
|
|
|
|
|
2013-05-15 14:48:45 +07:00
|
|
|
static void hdmi_audio_disable(struct omap_dss_device *dssdev)
|
2013-05-24 17:20:17 +07:00
|
|
|
{
|
2013-10-08 15:52:03 +07:00
|
|
|
hdmi_wp_audio_enable(&hdmi.wp, false);
|
2013-05-24 17:20:17 +07:00
|
|
|
}
|
|
|
|
|
2013-05-15 14:48:45 +07:00
|
|
|
static int hdmi_audio_start(struct omap_dss_device *dssdev)
|
2013-05-24 17:20:17 +07:00
|
|
|
{
|
2013-10-08 15:52:03 +07:00
|
|
|
return hdmi4_audio_start(&hdmi.core, &hdmi.wp);
|
2013-05-24 17:20:17 +07:00
|
|
|
}
|
|
|
|
|
2013-05-15 14:48:45 +07:00
|
|
|
static void hdmi_audio_stop(struct omap_dss_device *dssdev)
|
2013-05-24 17:20:17 +07:00
|
|
|
{
|
2013-10-08 15:52:03 +07:00
|
|
|
hdmi4_audio_stop(&hdmi.core, &hdmi.wp);
|
2013-05-24 17:20:17 +07:00
|
|
|
}
|
|
|
|
|
2013-05-15 14:48:45 +07:00
|
|
|
static bool hdmi_audio_supported(struct omap_dss_device *dssdev)
|
2013-05-24 17:20:17 +07:00
|
|
|
{
|
|
|
|
bool r;
|
|
|
|
|
|
|
|
mutex_lock(&hdmi.lock);
|
|
|
|
|
2013-09-17 13:13:15 +07:00
|
|
|
r = hdmi_mode_has_audio(hdmi.cfg.cm.mode);
|
2013-05-24 17:20:17 +07:00
|
|
|
|
|
|
|
mutex_unlock(&hdmi.lock);
|
|
|
|
return r;
|
|
|
|
}
|
|
|
|
|
2013-05-15 14:48:45 +07:00
|
|
|
static int hdmi_audio_config(struct omap_dss_device *dssdev,
|
2013-05-24 17:20:17 +07:00
|
|
|
struct omap_dss_audio *audio)
|
|
|
|
{
|
|
|
|
int r;
|
2013-04-10 18:12:14 +07:00
|
|
|
u32 pclk = hdmi.cfg.timings.pixelclock;
|
2013-05-24 17:20:17 +07:00
|
|
|
|
|
|
|
mutex_lock(&hdmi.lock);
|
|
|
|
|
2013-09-17 13:13:15 +07:00
|
|
|
if (!hdmi_mode_has_audio(hdmi.cfg.cm.mode)) {
|
2013-05-24 17:20:17 +07:00
|
|
|
r = -EPERM;
|
|
|
|
goto err;
|
|
|
|
}
|
|
|
|
|
2013-09-17 13:13:15 +07:00
|
|
|
r = hdmi4_audio_config(&hdmi.core, &hdmi.wp, audio, pclk);
|
2013-05-24 17:20:17 +07:00
|
|
|
if (r)
|
|
|
|
goto err;
|
|
|
|
|
|
|
|
mutex_unlock(&hdmi.lock);
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
err:
|
|
|
|
mutex_unlock(&hdmi.lock);
|
|
|
|
return r;
|
|
|
|
}
|
|
|
|
#else
|
2013-05-15 14:48:45 +07:00
|
|
|
static int hdmi_audio_enable(struct omap_dss_device *dssdev)
|
2013-05-24 17:20:17 +07:00
|
|
|
{
|
|
|
|
return -EPERM;
|
|
|
|
}
|
|
|
|
|
2013-05-15 14:48:45 +07:00
|
|
|
static void hdmi_audio_disable(struct omap_dss_device *dssdev)
|
2013-05-24 17:20:17 +07:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2013-05-15 14:48:45 +07:00
|
|
|
static int hdmi_audio_start(struct omap_dss_device *dssdev)
|
2013-05-24 17:20:17 +07:00
|
|
|
{
|
|
|
|
return -EPERM;
|
|
|
|
}
|
|
|
|
|
2013-05-15 14:48:45 +07:00
|
|
|
static void hdmi_audio_stop(struct omap_dss_device *dssdev)
|
2013-05-24 17:20:17 +07:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2013-05-15 14:48:45 +07:00
|
|
|
static bool hdmi_audio_supported(struct omap_dss_device *dssdev)
|
2013-05-24 17:20:17 +07:00
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2013-05-15 14:48:45 +07:00
|
|
|
static int hdmi_audio_config(struct omap_dss_device *dssdev,
|
2013-05-24 17:20:17 +07:00
|
|
|
struct omap_dss_audio *audio)
|
|
|
|
{
|
|
|
|
return -EPERM;
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
static const struct omapdss_hdmi_ops hdmi_ops = {
|
|
|
|
.connect = hdmi_connect,
|
|
|
|
.disconnect = hdmi_disconnect,
|
|
|
|
|
2013-05-15 14:48:45 +07:00
|
|
|
.enable = hdmi_display_enable,
|
|
|
|
.disable = hdmi_display_disable,
|
2013-05-24 17:20:17 +07:00
|
|
|
|
2013-05-15 14:48:45 +07:00
|
|
|
.check_timings = hdmi_display_check_timing,
|
|
|
|
.set_timings = hdmi_display_set_timing,
|
|
|
|
.get_timings = hdmi_display_get_timings,
|
2013-05-24 17:20:17 +07:00
|
|
|
|
|
|
|
.read_edid = hdmi_read_edid,
|
|
|
|
|
2013-05-15 14:48:45 +07:00
|
|
|
.audio_enable = hdmi_audio_enable,
|
|
|
|
.audio_disable = hdmi_audio_disable,
|
|
|
|
.audio_start = hdmi_audio_start,
|
|
|
|
.audio_stop = hdmi_audio_stop,
|
|
|
|
.audio_supported = hdmi_audio_supported,
|
|
|
|
.audio_config = hdmi_audio_config,
|
2013-05-24 17:20:17 +07:00
|
|
|
};
|
|
|
|
|
2013-04-26 18:48:43 +07:00
|
|
|
static void hdmi_init_output(struct platform_device *pdev)
|
2012-09-26 18:00:49 +07:00
|
|
|
{
|
OMAPDSS: combine omap_dss_output into omap_dss_device
We currently have omap_dss_device, which represents an external display
device, sometimes an external encoder, sometimes a panel. Then we have
omap_dss_output, which represents DSS's output encoder.
In the future with new display device model, we construct a video
pipeline from the display blocks. To accomplish this, all the blocks
need to be presented by the same entity.
Thus, this patch combines omap_dss_output into omap_dss_device. Some of
the fields in omap_dss_output are already found in omap_dss_device, but
some are not. This means we'll have DSS output specific fields in
omap_dss_device, which is not very nice. However, it is easier to just
keep those output specific fields there for now, and after transition to
new display device model is made, they can be cleaned up easier than
could be done now.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-04-19 19:09:34 +07:00
|
|
|
struct omap_dss_device *out = &hdmi.output;
|
2012-09-26 18:00:49 +07:00
|
|
|
|
OMAPDSS: combine omap_dss_output into omap_dss_device
We currently have omap_dss_device, which represents an external display
device, sometimes an external encoder, sometimes a panel. Then we have
omap_dss_output, which represents DSS's output encoder.
In the future with new display device model, we construct a video
pipeline from the display blocks. To accomplish this, all the blocks
need to be presented by the same entity.
Thus, this patch combines omap_dss_output into omap_dss_device. Some of
the fields in omap_dss_output are already found in omap_dss_device, but
some are not. This means we'll have DSS output specific fields in
omap_dss_device, which is not very nice. However, it is easier to just
keep those output specific fields there for now, and after transition to
new display device model is made, they can be cleaned up easier than
could be done now.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-04-19 19:09:34 +07:00
|
|
|
out->dev = &pdev->dev;
|
2012-09-26 18:00:49 +07:00
|
|
|
out->id = OMAP_DSS_OUTPUT_HDMI;
|
OMAPDSS: combine omap_dss_output into omap_dss_device
We currently have omap_dss_device, which represents an external display
device, sometimes an external encoder, sometimes a panel. Then we have
omap_dss_output, which represents DSS's output encoder.
In the future with new display device model, we construct a video
pipeline from the display blocks. To accomplish this, all the blocks
need to be presented by the same entity.
Thus, this patch combines omap_dss_output into omap_dss_device. Some of
the fields in omap_dss_output are already found in omap_dss_device, but
some are not. This means we'll have DSS output specific fields in
omap_dss_device, which is not very nice. However, it is easier to just
keep those output specific fields there for now, and after transition to
new display device model is made, they can be cleaned up easier than
could be done now.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-04-19 19:09:34 +07:00
|
|
|
out->output_type = OMAP_DISPLAY_TYPE_HDMI;
|
2013-02-18 18:06:01 +07:00
|
|
|
out->name = "hdmi.0";
|
2013-02-13 16:23:54 +07:00
|
|
|
out->dispc_channel = OMAP_DSS_CHANNEL_DIGIT;
|
2013-05-24 17:20:17 +07:00
|
|
|
out->ops.hdmi = &hdmi_ops;
|
2013-05-03 15:42:18 +07:00
|
|
|
out->owner = THIS_MODULE;
|
2012-09-26 18:00:49 +07:00
|
|
|
|
2013-04-24 17:32:51 +07:00
|
|
|
omapdss_register_output(out);
|
2012-09-26 18:00:49 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
static void __exit hdmi_uninit_output(struct platform_device *pdev)
|
|
|
|
{
|
OMAPDSS: combine omap_dss_output into omap_dss_device
We currently have omap_dss_device, which represents an external display
device, sometimes an external encoder, sometimes a panel. Then we have
omap_dss_output, which represents DSS's output encoder.
In the future with new display device model, we construct a video
pipeline from the display blocks. To accomplish this, all the blocks
need to be presented by the same entity.
Thus, this patch combines omap_dss_output into omap_dss_device. Some of
the fields in omap_dss_output are already found in omap_dss_device, but
some are not. This means we'll have DSS output specific fields in
omap_dss_device, which is not very nice. However, it is easier to just
keep those output specific fields there for now, and after transition to
new display device model is made, they can be cleaned up easier than
could be done now.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-04-19 19:09:34 +07:00
|
|
|
struct omap_dss_device *out = &hdmi.output;
|
2012-09-26 18:00:49 +07:00
|
|
|
|
2013-04-24 17:32:51 +07:00
|
|
|
omapdss_unregister_output(out);
|
2012-09-26 18:00:49 +07:00
|
|
|
}
|
|
|
|
|
2014-04-17 16:54:02 +07:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2011-03-12 13:34:27 +07:00
|
|
|
/* HDMI HW IP initialisation */
|
2013-04-26 18:48:43 +07:00
|
|
|
static int omapdss_hdmihw_probe(struct platform_device *pdev)
|
2011-03-12 13:34:27 +07:00
|
|
|
{
|
2012-05-02 18:55:12 +07:00
|
|
|
int r;
|
2011-03-12 13:34:27 +07:00
|
|
|
|
|
|
|
hdmi.pdev = pdev;
|
|
|
|
|
|
|
|
mutex_init(&hdmi.lock);
|
|
|
|
|
2014-04-17 16:54:02 +07:00
|
|
|
if (pdev->dev.of_node) {
|
|
|
|
r = hdmi_probe_of(pdev);
|
|
|
|
if (r)
|
|
|
|
return r;
|
|
|
|
}
|
|
|
|
|
2013-10-08 15:52:03 +07:00
|
|
|
r = hdmi_wp_init(pdev, &hdmi.wp);
|
2013-08-06 16:26:55 +07:00
|
|
|
if (r)
|
|
|
|
return r;
|
2011-03-12 13:34:27 +07:00
|
|
|
|
2013-10-08 15:52:03 +07:00
|
|
|
r = hdmi_pll_init(pdev, &hdmi.pll);
|
2013-10-08 14:25:26 +07:00
|
|
|
if (r)
|
|
|
|
return r;
|
|
|
|
|
2013-10-08 15:52:03 +07:00
|
|
|
r = hdmi_phy_init(pdev, &hdmi.phy);
|
2013-10-08 14:37:00 +07:00
|
|
|
if (r)
|
|
|
|
return r;
|
OMAPDSS: HDMI: clean up PHY power handling
The TRM tells to set PHY to TXON only after getting LINK_CONNECT, and to
set PHY to OFF or LDOON after getting LINK_DISCONNECT, in order to avoid
damage to the PHY.
We don't currently do it quite like that. Instead of using the HDMI
interrupts, we use HPD signal. This works, but is not actually quite
correct, as HPD comes at a different time than LINK_CONNECT and
LINK_DISCONNECT interrupts. Also, the HPD GPIO is a property of the TPD
level shifter, not HDMI IP, so handling the GPIO in the HDMI driver is
wrong.
This patch implements the PHY power handling correctly, using the
interrupts.
There is a corner case that causes some additional difficulties: we may
get both LINK_CONNECT and LINK_DISCONNECT interrupts at the same time.
This is handled in the code by retrying: turning off the PHY, clearing
the interrupt status, and re-enabling the PHY. This causes a new
LINK_CONNECT interrupt to happen if a cable is connected.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-06-06 17:08:35 +07:00
|
|
|
|
2013-10-08 15:52:03 +07:00
|
|
|
r = hdmi4_core_init(pdev, &hdmi.core);
|
2013-10-08 15:46:05 +07:00
|
|
|
if (r)
|
|
|
|
return r;
|
|
|
|
|
2011-05-27 14:52:19 +07:00
|
|
|
r = hdmi_get_clocks(pdev);
|
|
|
|
if (r) {
|
2012-11-06 13:19:12 +07:00
|
|
|
DSSERR("can't get clocks\n");
|
2011-05-27 14:52:19 +07:00
|
|
|
return r;
|
|
|
|
}
|
|
|
|
|
|
|
|
pm_runtime_enable(&pdev->dev);
|
|
|
|
|
2013-02-13 17:17:43 +07:00
|
|
|
hdmi_init_output(pdev);
|
|
|
|
|
2012-03-02 23:01:07 +07:00
|
|
|
dss_debugfs_create_file("hdmi", hdmi_dump_regs);
|
|
|
|
|
2012-04-26 18:48:32 +07:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2012-02-17 22:41:13 +07:00
|
|
|
static int __exit omapdss_hdmihw_remove(struct platform_device *pdev)
|
2011-03-12 13:34:27 +07:00
|
|
|
{
|
2012-09-26 18:00:49 +07:00
|
|
|
hdmi_uninit_output(pdev);
|
|
|
|
|
2011-05-27 14:52:19 +07:00
|
|
|
pm_runtime_disable(&pdev->dev);
|
|
|
|
|
2011-03-12 13:34:27 +07:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2011-05-27 14:52:19 +07:00
|
|
|
static int hdmi_runtime_suspend(struct device *dev)
|
|
|
|
{
|
2012-06-27 15:51:26 +07:00
|
|
|
clk_disable_unprepare(hdmi.sys_clk);
|
2011-05-27 14:52:19 +07:00
|
|
|
|
|
|
|
dispc_runtime_put();
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static int hdmi_runtime_resume(struct device *dev)
|
|
|
|
{
|
|
|
|
int r;
|
|
|
|
|
|
|
|
r = dispc_runtime_get();
|
|
|
|
if (r < 0)
|
2012-02-17 22:58:04 +07:00
|
|
|
return r;
|
2011-05-27 14:52:19 +07:00
|
|
|
|
2012-06-27 15:51:26 +07:00
|
|
|
clk_prepare_enable(hdmi.sys_clk);
|
2011-05-27 14:52:19 +07:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static const struct dev_pm_ops hdmi_pm_ops = {
|
|
|
|
.runtime_suspend = hdmi_runtime_suspend,
|
|
|
|
.runtime_resume = hdmi_runtime_resume,
|
|
|
|
};
|
|
|
|
|
2013-12-16 20:14:04 +07:00
|
|
|
static const struct of_device_id hdmi_of_match[] = {
|
|
|
|
{ .compatible = "ti,omap4-hdmi", },
|
|
|
|
{},
|
|
|
|
};
|
|
|
|
|
2011-03-12 13:34:27 +07:00
|
|
|
static struct platform_driver omapdss_hdmihw_driver = {
|
2013-04-26 18:48:43 +07:00
|
|
|
.probe = omapdss_hdmihw_probe,
|
2012-02-17 22:41:13 +07:00
|
|
|
.remove = __exit_p(omapdss_hdmihw_remove),
|
2011-03-12 13:34:27 +07:00
|
|
|
.driver = {
|
|
|
|
.name = "omapdss_hdmi",
|
|
|
|
.owner = THIS_MODULE,
|
2011-05-27 14:52:19 +07:00
|
|
|
.pm = &hdmi_pm_ops,
|
2013-12-16 20:14:04 +07:00
|
|
|
.of_match_table = hdmi_of_match,
|
2011-03-12 13:34:27 +07:00
|
|
|
},
|
|
|
|
};
|
|
|
|
|
2013-09-12 19:15:57 +07:00
|
|
|
int __init hdmi4_init_platform_driver(void)
|
2011-03-12 13:34:27 +07:00
|
|
|
{
|
2013-04-26 18:48:43 +07:00
|
|
|
return platform_driver_register(&omapdss_hdmihw_driver);
|
2011-03-12 13:34:27 +07:00
|
|
|
}
|
|
|
|
|
2013-09-12 19:15:57 +07:00
|
|
|
void __exit hdmi4_uninit_platform_driver(void)
|
2011-03-12 13:34:27 +07:00
|
|
|
{
|
2012-02-23 20:32:37 +07:00
|
|
|
platform_driver_unregister(&omapdss_hdmihw_driver);
|
2011-03-12 13:34:27 +07:00
|
|
|
}
|