aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSachin Kamat <sachin.kamat@linaro.org>2013-08-28 01:17:57 -0400
committerInki Dae <inki.dae@samsung.com>2013-09-05 00:43:46 -0400
commit88c49815429d9a4dbb95e31212ee65a8f7df6d00 (patch)
tree071d24d683c564dac5af83adfec4dbb083781ba2
parent61c48fbf5f998857c84839afe15d44bdfca07b2a (diff)
drm/exynos: Remove non-DT support in exynos_hdmi
Since commit 383ffda2fa ("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: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Inki Dae <inki.dae@samsung.com>
-rw-r--r--drivers/gpu/drm/exynos/exynos_hdmi.c70
1 files changed, 12 insertions, 58 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c
index 8ea07a106df2..a0e10aeb0e67 100644
--- a/drivers/gpu/drm/exynos/exynos_hdmi.c
+++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
@@ -1858,7 +1858,6 @@ void hdmi_attach_hdmiphy_client(struct i2c_client *hdmiphy)
1858 hdmi_hdmiphy = hdmiphy; 1858 hdmi_hdmiphy = hdmiphy;
1859} 1859}
1860 1860
1861#ifdef CONFIG_OF
1862static struct s5p_hdmi_platform_data *drm_hdmi_dt_parse_pdata 1861static struct s5p_hdmi_platform_data *drm_hdmi_dt_parse_pdata
1863 (struct device *dev) 1862 (struct device *dev)
1864{ 1863{
@@ -1882,33 +1881,7 @@ static struct s5p_hdmi_platform_data *drm_hdmi_dt_parse_pdata
1882err_data: 1881err_data:
1883 return NULL; 1882 return NULL;
1884} 1883}
1885#else
1886static struct s5p_hdmi_platform_data *drm_hdmi_dt_parse_pdata
1887 (struct device *dev)
1888{
1889 return NULL;
1890}
1891#endif
1892
1893static struct platform_device_id hdmi_driver_types[] = {
1894 {
1895 .name = "s5pv210-hdmi",
1896 .driver_data = HDMI_TYPE13,
1897 }, {
1898 .name = "exynos4-hdmi",
1899 .driver_data = HDMI_TYPE13,
1900 }, {
1901 .name = "exynos4-hdmi14",
1902 .driver_data = HDMI_TYPE14,
1903 }, {
1904 .name = "exynos5-hdmi",
1905 .driver_data = HDMI_TYPE14,
1906 }, {
1907 /* end node */
1908 }
1909};
1910 1884
1911#ifdef CONFIG_OF
1912static struct of_device_id hdmi_match_types[] = { 1885static struct of_device_id hdmi_match_types[] = {
1913 { 1886 {
1914 .compatible = "samsung,exynos5-hdmi", 1887 .compatible = "samsung,exynos5-hdmi",
@@ -1920,7 +1893,6 @@ static struct of_device_id hdmi_match_types[] = {
1920 /* end node */ 1893 /* end node */
1921 } 1894 }
1922}; 1895};
1923#endif
1924 1896
1925static int hdmi_probe(struct platform_device *pdev) 1897static int hdmi_probe(struct platform_device *pdev)
1926{ 1898{
@@ -1929,30 +1901,21 @@ static int hdmi_probe(struct platform_device *pdev)
1929 struct hdmi_context *hdata; 1901 struct hdmi_context *hdata;
1930 struct s5p_hdmi_platform_data *pdata; 1902 struct s5p_hdmi_platform_data *pdata;
1931 struct resource *res; 1903 struct resource *res;
1904 const struct of_device_id *match;
1932 int ret; 1905 int ret;
1933 1906
1934 if (dev->of_node) { 1907 if (!dev->of_node)
1935 pdata = drm_hdmi_dt_parse_pdata(dev); 1908 return -ENODEV;
1936 if (IS_ERR(pdata)) {
1937 DRM_ERROR("failed to parse dt\n");
1938 return PTR_ERR(pdata);
1939 }
1940 } else {
1941 pdata = dev->platform_data;
1942 }
1943 1909
1944 if (!pdata) { 1910 pdata = drm_hdmi_dt_parse_pdata(dev);
1945 DRM_ERROR("no platform data specified\n"); 1911 if (!pdata)
1946 return -EINVAL; 1912 return -EINVAL;
1947 }
1948 1913
1949 drm_hdmi_ctx = devm_kzalloc(dev, sizeof(*drm_hdmi_ctx), 1914 drm_hdmi_ctx = devm_kzalloc(dev, sizeof(*drm_hdmi_ctx), GFP_KERNEL);
1950 GFP_KERNEL);
1951 if (!drm_hdmi_ctx) 1915 if (!drm_hdmi_ctx)
1952 return -ENOMEM; 1916 return -ENOMEM;
1953 1917
1954 hdata = devm_kzalloc(dev, sizeof(struct hdmi_context), 1918 hdata = devm_kzalloc(dev, sizeof(struct hdmi_context), GFP_KERNEL);
1955 GFP_KERNEL);
1956 if (!hdata) 1919 if (!hdata)
1957 return -ENOMEM; 1920 return -ENOMEM;
1958 1921
@@ -1963,23 +1926,15 @@ static int hdmi_probe(struct platform_device *pdev)
1963 1926
1964 platform_set_drvdata(pdev, drm_hdmi_ctx); 1927 platform_set_drvdata(pdev, drm_hdmi_ctx);
1965 1928
1966 if (dev->of_node) { 1929 match = of_match_node(hdmi_match_types, dev->of_node);
1967 const struct of_device_id *match; 1930 if (!match)
1968 match = of_match_node(of_match_ptr(hdmi_match_types), 1931 return -ENODEV;
1969 dev->of_node); 1932 hdata->type = (enum hdmi_type)match->data;
1970 if (match == NULL)
1971 return -ENODEV;
1972 hdata->type = (enum hdmi_type)match->data;
1973 } else {
1974 hdata->type = (enum hdmi_type)platform_get_device_id
1975 (pdev)->driver_data;
1976 }
1977 1933
1978 hdata->hpd_gpio = pdata->hpd_gpio; 1934 hdata->hpd_gpio = pdata->hpd_gpio;
1979 hdata->dev = dev; 1935 hdata->dev = dev;
1980 1936
1981 ret = hdmi_resources_init(hdata); 1937 ret = hdmi_resources_init(hdata);
1982
1983 if (ret) { 1938 if (ret) {
1984 DRM_ERROR("hdmi_resources_init failed\n"); 1939 DRM_ERROR("hdmi_resources_init failed\n");
1985 return -EINVAL; 1940 return -EINVAL;
@@ -2134,11 +2089,10 @@ static const struct dev_pm_ops hdmi_pm_ops = {
2134struct platform_driver hdmi_driver = { 2089struct platform_driver hdmi_driver = {
2135 .probe = hdmi_probe, 2090 .probe = hdmi_probe,
2136 .remove = hdmi_remove, 2091 .remove = hdmi_remove,
2137 .id_table = hdmi_driver_types,
2138 .driver = { 2092 .driver = {
2139 .name = "exynos-hdmi", 2093 .name = "exynos-hdmi",
2140 .owner = THIS_MODULE, 2094 .owner = THIS_MODULE,
2141 .pm = &hdmi_pm_ops, 2095 .pm = &hdmi_pm_ops,
2142 .of_match_table = of_match_ptr(hdmi_match_types), 2096 .of_match_table = hdmi_match_types,
2143 }, 2097 },
2144}; 2098};