diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-09-05 20:44:03 +0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-09-05 20:44:03 +0400 |
commit | eced5a0a5a8f7a3b07320e3b7d1d432e0f044735 (patch) | |
tree | 043192035e9d9fb77f052ae4dc6fa21ea257efc0 /drivers/video/omap2/dss/dpi.c | |
parent | 7c049d086941a74c1babac6dc6901b88e1ce5b7e (diff) | |
parent | 9560dc1059222d059d494a64e5da4c54d23838da (diff) | |
download | linux-eced5a0a5a8f7a3b07320e3b7d1d432e0f044735.tar.xz |
Merge tag 'fbdev-3.12-omap-legacy-removal' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux
Pull OMAP specific fbdev changes from Tomi Valkeinen:
"I've got this pull request separate from the main fbdev pull request,
as this contains a bunch of OMAP board file changes and thus could
possibly be rejected in case of bad conflicts.
The removal of the old display drivers depend on the board file
changes, so Tony Lindgren suggested taking them together via fbdev
tree. These are in linux-next, and also Tony didn't see any conflicts
with any of the branches he had, so they should go in clean.
- Change the OMAP board files to use the new OMAP display drivers
- Remove all the old drivers, and the related auxiliary code"
* tag 'fbdev-3.12-omap-legacy-removal' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux: (35 commits)
OMAPDSS: rename omap_dss_device's 'device' field to 'dst'
OMAPDSS: rename omap_dss_device's 'output' to 'src'
OMAPDSS: DSS: remove legacy dss bus support
OMAPDSS: RFBI: remove code related to old panel model
OMAPDSS: VENC: remove code related to old panel model
OMAPDSS: SDI: remove code related to old panel model
OMAPDSS: DSI: remove code related to old panel model
OMAPDSS: HDMI: remove code related to old panel model
OMAPDSS: DPI: remove code related to old panel model
OMAPDSS: remove all old panel drivers
OMAPDSS: DPI: change regulator handling
OMAPDSS: SDI: change regulator handling
OMAPDSS: fix DPI and SDI device ids
OMAPDSS: remove omap_dss_device->channel field
OMAPDSS: RFBI: Mark RFBI as broken
ARM: OMAP2+: Remove old display drivers from omap2plus_defconfig
ARM: OMAP: AM3517EVM: use new display drivers
ARM: OMAP: Zoom: use new display drivers
ARM: OMAP: Pandora: use new display drivers
ARM: OMAP: OMAP3EVM: use new display drivers
...
Diffstat (limited to 'drivers/video/omap2/dss/dpi.c')
-rw-r--r-- | drivers/video/omap2/dss/dpi.c | 121 |
1 files changed, 14 insertions, 107 deletions
diff --git a/drivers/video/omap2/dss/dpi.c b/drivers/video/omap2/dss/dpi.c index a6b331ef7763..bd48cde53561 100644 --- a/drivers/video/omap2/dss/dpi.c +++ b/drivers/video/omap2/dss/dpi.c @@ -345,7 +345,7 @@ static void dpi_config_lcd_manager(struct omap_overlay_manager *mgr) dss_mgr_set_lcd_config(mgr, &dpi.mgr_config); } -int omapdss_dpi_display_enable(struct omap_dss_device *dssdev) +static int dpi_display_enable(struct omap_dss_device *dssdev) { struct omap_dss_device *out = &dpi.output; int r; @@ -423,9 +423,8 @@ err_no_reg: mutex_unlock(&dpi.lock); return r; } -EXPORT_SYMBOL(omapdss_dpi_display_enable); -void omapdss_dpi_display_disable(struct omap_dss_device *dssdev) +static void dpi_display_disable(struct omap_dss_device *dssdev) { struct omap_overlay_manager *mgr = dpi.output.manager; @@ -446,9 +445,8 @@ void omapdss_dpi_display_disable(struct omap_dss_device *dssdev) mutex_unlock(&dpi.lock); } -EXPORT_SYMBOL(omapdss_dpi_display_disable); -void omapdss_dpi_set_timings(struct omap_dss_device *dssdev, +static void dpi_set_timings(struct omap_dss_device *dssdev, struct omap_video_timings *timings) { DSSDBG("dpi_set_timings\n"); @@ -459,7 +457,6 @@ void omapdss_dpi_set_timings(struct omap_dss_device *dssdev, mutex_unlock(&dpi.lock); } -EXPORT_SYMBOL(omapdss_dpi_set_timings); static void dpi_get_timings(struct omap_dss_device *dssdev, struct omap_video_timings *timings) @@ -471,7 +468,7 @@ static void dpi_get_timings(struct omap_dss_device *dssdev, mutex_unlock(&dpi.lock); } -int dpi_check_timings(struct omap_dss_device *dssdev, +static int dpi_check_timings(struct omap_dss_device *dssdev, struct omap_video_timings *timings) { struct omap_overlay_manager *mgr = dpi.output.manager; @@ -510,9 +507,8 @@ int dpi_check_timings(struct omap_dss_device *dssdev, return 0; } -EXPORT_SYMBOL(dpi_check_timings); -void omapdss_dpi_set_data_lines(struct omap_dss_device *dssdev, int data_lines) +static void dpi_set_data_lines(struct omap_dss_device *dssdev, int data_lines) { mutex_lock(&dpi.lock); @@ -520,7 +516,6 @@ void omapdss_dpi_set_data_lines(struct omap_dss_device *dssdev, int data_lines) mutex_unlock(&dpi.lock); } -EXPORT_SYMBOL(omapdss_dpi_set_data_lines); static int dpi_verify_dsi_pll(struct platform_device *dsidev) { @@ -554,14 +549,10 @@ static int dpi_init_regulator(void) if (dpi.vdds_dsi_reg) return 0; - vdds_dsi = dss_get_vdds_dsi(); - + vdds_dsi = devm_regulator_get(&dpi.pdev->dev, "vdds_dsi"); if (IS_ERR(vdds_dsi)) { - vdds_dsi = devm_regulator_get(&dpi.pdev->dev, "vdds_dsi"); - if (IS_ERR(vdds_dsi)) { - DSSERR("can't get VDDS_DSI regulator\n"); - return PTR_ERR(vdds_dsi); - } + DSSERR("can't get VDDS_DSI regulator\n"); + return PTR_ERR(vdds_dsi); } dpi.vdds_dsi_reg = vdds_dsi; @@ -618,76 +609,6 @@ static enum omap_channel dpi_get_channel(void) } } -static struct omap_dss_device *dpi_find_dssdev(struct platform_device *pdev) -{ - struct omap_dss_board_info *pdata = pdev->dev.platform_data; - const char *def_disp_name = omapdss_get_default_display_name(); - struct omap_dss_device *def_dssdev; - int i; - - def_dssdev = NULL; - - for (i = 0; i < pdata->num_devices; ++i) { - struct omap_dss_device *dssdev = pdata->devices[i]; - - if (dssdev->type != OMAP_DISPLAY_TYPE_DPI) - continue; - - if (def_dssdev == NULL) - def_dssdev = dssdev; - - if (def_disp_name != NULL && - strcmp(dssdev->name, def_disp_name) == 0) { - def_dssdev = dssdev; - break; - } - } - - return def_dssdev; -} - -static int dpi_probe_pdata(struct platform_device *dpidev) -{ - struct omap_dss_device *plat_dssdev; - struct omap_dss_device *dssdev; - int r; - - plat_dssdev = dpi_find_dssdev(dpidev); - - if (!plat_dssdev) - return 0; - - r = dpi_init_regulator(); - if (r) - return r; - - dpi_init_pll(); - - dssdev = dss_alloc_and_init_device(&dpidev->dev); - if (!dssdev) - return -ENOMEM; - - dss_copy_device_pdata(dssdev, plat_dssdev); - - r = omapdss_output_set_device(&dpi.output, dssdev); - if (r) { - DSSERR("failed to connect output to new device: %s\n", - dssdev->name); - dss_put_device(dssdev); - return r; - } - - r = dss_add_device(dssdev); - if (r) { - DSSERR("device %s register failed: %d\n", dssdev->name, r); - omapdss_output_unset_device(&dpi.output); - dss_put_device(dssdev); - return r; - } - - return 0; -} - static int dpi_connect(struct omap_dss_device *dssdev, struct omap_dss_device *dst) { @@ -722,9 +643,9 @@ static int dpi_connect(struct omap_dss_device *dssdev, static void dpi_disconnect(struct omap_dss_device *dssdev, struct omap_dss_device *dst) { - WARN_ON(dst != dssdev->device); + WARN_ON(dst != dssdev->dst); - if (dst != dssdev->device) + if (dst != dssdev->dst) return; omapdss_output_unset_device(dssdev); @@ -737,14 +658,14 @@ static const struct omapdss_dpi_ops dpi_ops = { .connect = dpi_connect, .disconnect = dpi_disconnect, - .enable = omapdss_dpi_display_enable, - .disable = omapdss_dpi_display_disable, + .enable = dpi_display_enable, + .disable = dpi_display_disable, .check_timings = dpi_check_timings, - .set_timings = omapdss_dpi_set_timings, + .set_timings = dpi_set_timings, .get_timings = dpi_get_timings, - .set_data_lines = omapdss_dpi_set_data_lines, + .set_data_lines = dpi_set_data_lines, }; static void dpi_init_output(struct platform_device *pdev) @@ -771,31 +692,17 @@ static void __exit dpi_uninit_output(struct platform_device *pdev) static int omap_dpi_probe(struct platform_device *pdev) { - int r; - dpi.pdev = pdev; mutex_init(&dpi.lock); dpi_init_output(pdev); - if (pdev->dev.platform_data) { - r = dpi_probe_pdata(pdev); - if (r) - goto err_probe; - } - return 0; - -err_probe: - dpi_uninit_output(pdev); - return r; } static int __exit omap_dpi_remove(struct platform_device *pdev) { - dss_unregister_child_devices(&pdev->dev); - dpi_uninit_output(pdev); return 0; |