aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/fbdev/omap2
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@ti.com>2016-05-26 09:36:25 -0400
committerPeter Ujfalusi <peter.ujfalusi@ti.com>2016-06-03 09:06:25 -0400
commit5996a5ae4855a8b1f149820b4f62fde88283913d (patch)
tree8c9d1a062092cdf59546f7a93fc9a24e44fbdab8 /drivers/video/fbdev/omap2
parentb0417013d8155cca7b63a71d94c57ae3034cb597 (diff)
omapfb: connector-dvi: Remove legacy boot support
The panel is not used by any legacy board files so the legacy (pdata) boot support can be dropped. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Diffstat (limited to 'drivers/video/fbdev/omap2')
-rw-r--r--drivers/video/fbdev/omap2/omapfb/displays/connector-dvi.c58
1 files changed, 6 insertions, 52 deletions
diff --git a/drivers/video/fbdev/omap2/omapfb/displays/connector-dvi.c b/drivers/video/fbdev/omap2/omapfb/displays/connector-dvi.c
index d811e6dcaef7..f2abbec7602a 100644
--- a/drivers/video/fbdev/omap2/omapfb/displays/connector-dvi.c
+++ b/drivers/video/fbdev/omap2/omapfb/displays/connector-dvi.c
@@ -17,7 +17,6 @@
17#include <drm/drm_edid.h> 17#include <drm/drm_edid.h>
18 18
19#include <video/omapdss.h> 19#include <video/omapdss.h>
20#include <video/omap-panel-data.h>
21 20
22static const struct omap_video_timings dvic_default_timings = { 21static const struct omap_video_timings dvic_default_timings = {
23 .x_res = 640, 22 .x_res = 640,
@@ -236,46 +235,6 @@ static struct omap_dss_driver dvic_driver = {
236 .detect = dvic_detect, 235 .detect = dvic_detect,
237}; 236};
238 237
239static int dvic_probe_pdata(struct platform_device *pdev)
240{
241 struct panel_drv_data *ddata = platform_get_drvdata(pdev);
242 struct connector_dvi_platform_data *pdata;
243 struct omap_dss_device *in, *dssdev;
244 int i2c_bus_num;
245
246 pdata = dev_get_platdata(&pdev->dev);
247 i2c_bus_num = pdata->i2c_bus_num;
248
249 if (i2c_bus_num != -1) {
250 struct i2c_adapter *adapter;
251
252 adapter = i2c_get_adapter(i2c_bus_num);
253 if (!adapter) {
254 dev_err(&pdev->dev,
255 "Failed to get I2C adapter, bus %d\n",
256 i2c_bus_num);
257 return -EPROBE_DEFER;
258 }
259
260 ddata->i2c_adapter = adapter;
261 }
262
263 in = omap_dss_find_output(pdata->source);
264 if (in == NULL) {
265 i2c_put_adapter(ddata->i2c_adapter);
266
267 dev_err(&pdev->dev, "Failed to find video source\n");
268 return -EPROBE_DEFER;
269 }
270
271 ddata->in = in;
272
273 dssdev = &ddata->dssdev;
274 dssdev->name = pdata->name;
275
276 return 0;
277}
278
279static int dvic_probe_of(struct platform_device *pdev) 238static int dvic_probe_of(struct platform_device *pdev)
280{ 239{
281 struct panel_drv_data *ddata = platform_get_drvdata(pdev); 240 struct panel_drv_data *ddata = platform_get_drvdata(pdev);
@@ -313,23 +272,18 @@ static int dvic_probe(struct platform_device *pdev)
313 struct omap_dss_device *dssdev; 272 struct omap_dss_device *dssdev;
314 int r; 273 int r;
315 274
275 if (!pdev->dev.of_node)
276 return -ENODEV;
277
316 ddata = devm_kzalloc(&pdev->dev, sizeof(*ddata), GFP_KERNEL); 278 ddata = devm_kzalloc(&pdev->dev, sizeof(*ddata), GFP_KERNEL);
317 if (!ddata) 279 if (!ddata)
318 return -ENOMEM; 280 return -ENOMEM;
319 281
320 platform_set_drvdata(pdev, ddata); 282 platform_set_drvdata(pdev, ddata);
321 283
322 if (dev_get_platdata(&pdev->dev)) { 284 r = dvic_probe_of(pdev);
323 r = dvic_probe_pdata(pdev); 285 if (r)
324 if (r) 286 return r;
325 return r;
326 } else if (pdev->dev.of_node) {
327 r = dvic_probe_of(pdev);
328 if (r)
329 return r;
330 } else {
331 return -ENODEV;
332 }
333 287
334 ddata->timings = dvic_default_timings; 288 ddata->timings = dvic_default_timings;
335 289