summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorInki Dae <inki.dae@samsung.com>2014-04-25 16:14:15 +0900
committerChanho Park <chanho61.park@samsung.com>2014-11-18 11:47:36 +0900
commita45a7ba48e68fd0e650a3da7ab2d5017e0746e5b (patch)
tree7b751930ae8b579df1cbdb6a5401b1a0b34934ba
parent1387aa4dd18f6a658d8d6d62b8aa2dad4c3c3ea5 (diff)
downloadlinux-3.10-a45a7ba48e68fd0e650a3da7ab2d5017e0746e5b.tar.gz
linux-3.10-a45a7ba48e68fd0e650a3da7ab2d5017e0746e5b.tar.bz2
linux-3.10-a45a7ba48e68fd0e650a3da7ab2d5017e0746e5b.zip
drm/exynos: hdmi: consider APB PHY
This patch returns error in case of using APB PHY. Exynos5420 SoC and maybe later would use APB PHY instead of I2C PHY so such case should be considered. Signed-off-by: Inki Dae <inki.dae@samsung.com>
-rw-r--r--drivers/gpu/drm/exynos/exynos_hdmi.c32
1 files changed, 28 insertions, 4 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c
index 9f310e139d7..0a89dbcebfe 100644
--- a/drivers/gpu/drm/exynos/exynos_hdmi.c
+++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
@@ -75,6 +75,11 @@ enum hdmi_type {
HDMI_TYPE14,
};
+struct hdmi_driver_data {
+ unsigned int type;
+ unsigned int is_apb_phy:1;
+};
+
struct hdmi_resources {
struct clk *hdmi;
struct clk *sclk_hdmi;
@@ -210,6 +215,18 @@ struct hdmiphy_config {
u8 conf[32];
};
+struct hdmi_driver_data exynos4210_hdmi_driver_data = {
+ .type = HDMI_TYPE13,
+};
+
+struct hdmi_driver_data exynos4212_hdmi_driver_data = {
+ .type = HDMI_TYPE14,
+};
+
+struct hdmi_driver_data exynos5_hdmi_driver_data = {
+ .type = HDMI_TYPE14,
+};
+
/* list of phy config settings */
static const struct hdmiphy_config hdmiphy_v13_configs[] = {
{
@@ -2017,13 +2034,13 @@ static struct s5p_hdmi_platform_data *drm_hdmi_dt_parse_pdata
static struct of_device_id hdmi_match_types[] = {
{
.compatible = "samsung,exynos4210-hdmi",
- .data = (void *)HDMI_TYPE13,
+ .data = &exynos4210_hdmi_driver_data,
}, {
.compatible = "samsung,exynos4212-hdmi",
- .data = (void *)HDMI_TYPE14,
+ .data = &exynos4212_hdmi_driver_data,
}, {
.compatible = "samsung,exynos5-hdmi",
- .data = (void *)HDMI_TYPE14,
+ .data = &exynos5_hdmi_driver_data,
}, {
/* end node */
}
@@ -2037,6 +2054,7 @@ static int hdmi_probe(struct platform_device *pdev)
struct resource *res;
const struct of_device_id *match;
struct device_node *ddc_node, *phy_node;
+ struct hdmi_driver_data *drv_data;
int ret;
if (!dev->of_node)
@@ -2062,7 +2080,9 @@ static int hdmi_probe(struct platform_device *pdev)
match = of_match_node(hdmi_match_types, dev->of_node);
if (!match)
return -ENODEV;
- hdata->type = (enum hdmi_type)match->data;
+
+ drv_data = (struct hdmi_driver_data *)match->data;
+ hdata->type = drv_data->type;
hdata->hpd_gpio = pdata->hpd_gpio;
hdata->max_pixel_clock = pdata->max_pixel_clock;
@@ -2099,6 +2119,10 @@ static int hdmi_probe(struct platform_device *pdev)
return -ENODEV;
}
+ /* Not support APB PHY yet. */
+ if (drv_data->is_apb_phy)
+ return -EPERM;
+
/* hdmiphy i2c driver */
phy_node = of_parse_phandle(dev->of_node, "phy", 0);
if (!phy_node) {