Commit 88c49815 authored by Sachin Kamat's avatar Sachin Kamat Committed by Inki Dae

drm/exynos: Remove non-DT support in exynos_hdmi

Since commit 383ffda2 ("ARM: EXYNOS: no more support non-DT
for EXYNOS SoCs"), Exynos platform is DT only. Hence remove
all the conditional macros and make the driver DT only.
Signed-off-by: default avatarSachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: default avatarInki Dae <inki.dae@samsung.com>
parent 61c48fbf
...@@ -1858,7 +1858,6 @@ void hdmi_attach_hdmiphy_client(struct i2c_client *hdmiphy) ...@@ -1858,7 +1858,6 @@ void hdmi_attach_hdmiphy_client(struct i2c_client *hdmiphy)
hdmi_hdmiphy = hdmiphy; hdmi_hdmiphy = hdmiphy;
} }
#ifdef CONFIG_OF
static struct s5p_hdmi_platform_data *drm_hdmi_dt_parse_pdata static struct s5p_hdmi_platform_data *drm_hdmi_dt_parse_pdata
(struct device *dev) (struct device *dev)
{ {
...@@ -1882,33 +1881,7 @@ static struct s5p_hdmi_platform_data *drm_hdmi_dt_parse_pdata ...@@ -1882,33 +1881,7 @@ static struct s5p_hdmi_platform_data *drm_hdmi_dt_parse_pdata
err_data: err_data:
return NULL; return NULL;
} }
#else
static struct s5p_hdmi_platform_data *drm_hdmi_dt_parse_pdata
(struct device *dev)
{
return NULL;
}
#endif
static struct platform_device_id hdmi_driver_types[] = {
{
.name = "s5pv210-hdmi",
.driver_data = HDMI_TYPE13,
}, {
.name = "exynos4-hdmi",
.driver_data = HDMI_TYPE13,
}, {
.name = "exynos4-hdmi14",
.driver_data = HDMI_TYPE14,
}, {
.name = "exynos5-hdmi",
.driver_data = HDMI_TYPE14,
}, {
/* end node */
}
};
#ifdef CONFIG_OF
static struct of_device_id hdmi_match_types[] = { static struct of_device_id hdmi_match_types[] = {
{ {
.compatible = "samsung,exynos5-hdmi", .compatible = "samsung,exynos5-hdmi",
...@@ -1920,7 +1893,6 @@ static struct of_device_id hdmi_match_types[] = { ...@@ -1920,7 +1893,6 @@ static struct of_device_id hdmi_match_types[] = {
/* end node */ /* end node */
} }
}; };
#endif
static int hdmi_probe(struct platform_device *pdev) static int hdmi_probe(struct platform_device *pdev)
{ {
...@@ -1929,30 +1901,21 @@ static int hdmi_probe(struct platform_device *pdev) ...@@ -1929,30 +1901,21 @@ static int hdmi_probe(struct platform_device *pdev)
struct hdmi_context *hdata; struct hdmi_context *hdata;
struct s5p_hdmi_platform_data *pdata; struct s5p_hdmi_platform_data *pdata;
struct resource *res; struct resource *res;
const struct of_device_id *match;
int ret; int ret;
if (dev->of_node) { if (!dev->of_node)
pdata = drm_hdmi_dt_parse_pdata(dev); return -ENODEV;
if (IS_ERR(pdata)) {
DRM_ERROR("failed to parse dt\n");
return PTR_ERR(pdata);
}
} else {
pdata = dev->platform_data;
}
if (!pdata) { pdata = drm_hdmi_dt_parse_pdata(dev);
DRM_ERROR("no platform data specified\n"); if (!pdata)
return -EINVAL; return -EINVAL;
}
drm_hdmi_ctx = devm_kzalloc(dev, sizeof(*drm_hdmi_ctx), drm_hdmi_ctx = devm_kzalloc(dev, sizeof(*drm_hdmi_ctx), GFP_KERNEL);
GFP_KERNEL);
if (!drm_hdmi_ctx) if (!drm_hdmi_ctx)
return -ENOMEM; return -ENOMEM;
hdata = devm_kzalloc(dev, sizeof(struct hdmi_context), hdata = devm_kzalloc(dev, sizeof(struct hdmi_context), GFP_KERNEL);
GFP_KERNEL);
if (!hdata) if (!hdata)
return -ENOMEM; return -ENOMEM;
...@@ -1963,23 +1926,15 @@ static int hdmi_probe(struct platform_device *pdev) ...@@ -1963,23 +1926,15 @@ static int hdmi_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, drm_hdmi_ctx); platform_set_drvdata(pdev, drm_hdmi_ctx);
if (dev->of_node) { match = of_match_node(hdmi_match_types, dev->of_node);
const struct of_device_id *match; if (!match)
match = of_match_node(of_match_ptr(hdmi_match_types),
dev->of_node);
if (match == NULL)
return -ENODEV; return -ENODEV;
hdata->type = (enum hdmi_type)match->data; hdata->type = (enum hdmi_type)match->data;
} else {
hdata->type = (enum hdmi_type)platform_get_device_id
(pdev)->driver_data;
}
hdata->hpd_gpio = pdata->hpd_gpio; hdata->hpd_gpio = pdata->hpd_gpio;
hdata->dev = dev; hdata->dev = dev;
ret = hdmi_resources_init(hdata); ret = hdmi_resources_init(hdata);
if (ret) { if (ret) {
DRM_ERROR("hdmi_resources_init failed\n"); DRM_ERROR("hdmi_resources_init failed\n");
return -EINVAL; return -EINVAL;
...@@ -2134,11 +2089,10 @@ static const struct dev_pm_ops hdmi_pm_ops = { ...@@ -2134,11 +2089,10 @@ static const struct dev_pm_ops hdmi_pm_ops = {
struct platform_driver hdmi_driver = { struct platform_driver hdmi_driver = {
.probe = hdmi_probe, .probe = hdmi_probe,
.remove = hdmi_remove, .remove = hdmi_remove,
.id_table = hdmi_driver_types,
.driver = { .driver = {
.name = "exynos-hdmi", .name = "exynos-hdmi",
.owner = THIS_MODULE, .owner = THIS_MODULE,
.pm = &hdmi_pm_ops, .pm = &hdmi_pm_ops,
.of_match_table = of_match_ptr(hdmi_match_types), .of_match_table = hdmi_match_types,
}, },
}; };
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment