From 998c336d4c7183301ed6a6ca93952f63e3cf694f Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Wed, 30 May 2012 13:26:00 +0300 Subject: OMAPDSS: remove omap_dss_device's suspend/resume The panel drivers contain enable, disable, suspend and resume calls. The suspend and resume are effectively identical to disable and enable. This patch removes panel suspend and enable code from omapdss and the panel drivers, and replaces their use with enable and disable. Signed-off-by: Tomi Valkeinen --- include/video/omapdss.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'include/video') diff --git a/include/video/omapdss.h b/include/video/omapdss.h index 88c829466fc1..cdfb22e7fe80 100644 --- a/include/video/omapdss.h +++ b/include/video/omapdss.h @@ -158,7 +158,6 @@ enum omap_display_caps { enum omap_dss_display_state { OMAP_DSS_DISPLAY_DISABLED = 0, OMAP_DSS_DISPLAY_ACTIVE, - OMAP_DSS_DISPLAY_SUSPENDED, }; enum omap_dss_audio_state { @@ -686,8 +685,6 @@ struct omap_dss_driver { int (*enable)(struct omap_dss_device *display); void (*disable)(struct omap_dss_device *display); - int (*suspend)(struct omap_dss_device *display); - int (*resume)(struct omap_dss_device *display); int (*run_test)(struct omap_dss_device *display, int test); int (*update)(struct omap_dss_device *dssdev, -- cgit v1.2.3 From b2c7d54f72c1c588e8851c882f0465705f5e9e55 Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Thu, 18 Oct 2012 13:46:29 +0300 Subject: OMAPDSS: get the dss version from core pdev The output drivers get the omapdss hw version from the platform data for their respective output device. This doesn't work with DT, as there's no platform data for them. Add a new function, omapdss_get_version(), which returns the dss version from the core device, which will have platform data on DT also. The function is exported so that users of omapdss can also use it. Signed-off-by: Tomi Valkeinen --- drivers/video/omap2/dss/core.c | 9 ++++++++- drivers/video/omap2/dss/dispc.c | 3 +-- drivers/video/omap2/dss/dss.c | 3 +-- drivers/video/omap2/dss/hdmi.c | 3 +-- include/video/omapdss.h | 2 ++ 5 files changed, 13 insertions(+), 7 deletions(-) (limited to 'include/video') diff --git a/drivers/video/omap2/dss/core.c b/drivers/video/omap2/dss/core.c index 00aa026e307c..685d9a957b19 100644 --- a/drivers/video/omap2/dss/core.c +++ b/drivers/video/omap2/dss/core.c @@ -58,6 +58,13 @@ const char *dss_get_default_display_name(void) return core.default_display_name; } +enum omapdss_version omapdss_get_version(void) +{ + struct omap_dss_board_info *pdata = core.pdev->dev.platform_data; + return pdata->version; +} +EXPORT_SYMBOL(omapdss_get_version); + /* REGULATORS */ struct regulator *dss_get_vdds_dsi(void) @@ -232,7 +239,7 @@ static int __init omap_dss_probe(struct platform_device *pdev) core.pdev = pdev; - dss_features_init(pdata->version); + dss_features_init(omapdss_get_version()); dss_apply_init(); diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c index 6dd9eb4a2c5b..817d671e2baa 100644 --- a/drivers/video/omap2/dss/dispc.c +++ b/drivers/video/omap2/dss/dispc.c @@ -4098,7 +4098,6 @@ static const struct dispc_features omap44xx_dispc_feats __initconst = { static int __init dispc_init_features(struct platform_device *pdev) { - struct omap_dss_board_info *pdata = pdev->dev.platform_data; const struct dispc_features *src; struct dispc_features *dst; @@ -4108,7 +4107,7 @@ static int __init dispc_init_features(struct platform_device *pdev) return -ENOMEM; } - switch (pdata->version) { + switch (omapdss_get_version()) { case OMAPDSS_VER_OMAP24xx: src = &omap24xx_dispc_feats; break; diff --git a/drivers/video/omap2/dss/dss.c b/drivers/video/omap2/dss/dss.c index 37ee465c1a0e..d90de37288c4 100644 --- a/drivers/video/omap2/dss/dss.c +++ b/drivers/video/omap2/dss/dss.c @@ -793,7 +793,6 @@ static const struct dss_features omap54xx_dss_feats __initconst = { static int __init dss_init_features(struct platform_device *pdev) { - struct omap_dss_board_info *pdata = pdev->dev.platform_data; const struct dss_features *src; struct dss_features *dst; @@ -803,7 +802,7 @@ static int __init dss_init_features(struct platform_device *pdev) return -ENOMEM; } - switch (pdata->version) { + switch (omapdss_get_version()) { case OMAPDSS_VER_OMAP24xx: src = &omap24xx_dss_feats; break; diff --git a/drivers/video/omap2/dss/hdmi.c b/drivers/video/omap2/dss/hdmi.c index adcc906d12f8..c1c54883fbe7 100644 --- a/drivers/video/omap2/dss/hdmi.c +++ b/drivers/video/omap2/dss/hdmi.c @@ -323,7 +323,6 @@ static void hdmi_runtime_put(void) static int __init hdmi_init_display(struct omap_dss_device *dssdev) { - struct omap_dss_board_info *pdata = hdmi.pdev->dev.platform_data; int r; struct gpio gpios[] = { @@ -334,7 +333,7 @@ static int __init hdmi_init_display(struct omap_dss_device *dssdev) DSSDBG("init_display\n"); - dss_init_hdmi_ip_ops(&hdmi.ip_data, pdata->version); + dss_init_hdmi_ip_ops(&hdmi.ip_data, omapdss_get_version()); if (hdmi.vdda_hdmi_dac_reg == NULL) { struct regulator *reg; diff --git a/include/video/omapdss.h b/include/video/omapdss.h index cdfb22e7fe80..eac5f2562253 100644 --- a/include/video/omapdss.h +++ b/include/video/omapdss.h @@ -742,6 +742,8 @@ struct omap_dss_driver { }; +enum omapdss_version omapdss_get_version(void); + int omap_dss_register_driver(struct omap_dss_driver *); void omap_dss_unregister_driver(struct omap_dss_driver *); -- cgit v1.2.3 From 2bbcce5e0b47e0de83a1b799b9e164f8c5b9b634 Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Mon, 29 Oct 2012 12:40:46 +0200 Subject: OMAPDSS: export dss_get_def_display_name() Export dss_get_def_display_name() with the name of omapdss_get_def_display_name() so that omapfb can use it after the next patch which moves default display handling to omapfb. Signed-off-by: Tomi Valkeinen --- drivers/video/omap2/dss/core.c | 3 ++- drivers/video/omap2/dss/display.c | 2 +- drivers/video/omap2/dss/dpi.c | 2 +- drivers/video/omap2/dss/dsi.c | 2 +- drivers/video/omap2/dss/dss.h | 1 - drivers/video/omap2/dss/hdmi.c | 2 +- drivers/video/omap2/dss/rfbi.c | 2 +- drivers/video/omap2/dss/sdi.c | 2 +- drivers/video/omap2/dss/venc.c | 2 +- include/video/omapdss.h | 1 + 10 files changed, 10 insertions(+), 9 deletions(-) (limited to 'include/video') diff --git a/drivers/video/omap2/dss/core.c b/drivers/video/omap2/dss/core.c index 685d9a957b19..a2ea684169e9 100644 --- a/drivers/video/omap2/dss/core.c +++ b/drivers/video/omap2/dss/core.c @@ -53,10 +53,11 @@ static char *def_disp_name; module_param_named(def_disp, def_disp_name, charp, 0); MODULE_PARM_DESC(def_disp, "default display name"); -const char *dss_get_default_display_name(void) +const char *omapdss_get_default_display_name(void) { return core.default_display_name; } +EXPORT_SYMBOL(omapdss_get_default_display_name); enum omapdss_version omapdss_get_version(void) { diff --git a/drivers/video/omap2/dss/display.c b/drivers/video/omap2/dss/display.c index 1e587306215f..90edd718e9e7 100644 --- a/drivers/video/omap2/dss/display.c +++ b/drivers/video/omap2/dss/display.c @@ -394,7 +394,7 @@ int dss_init_device(struct platform_device *pdev, { struct device_attribute *attr; int i, r; - const char *def_disp_name = dss_get_default_display_name(); + const char *def_disp_name = omapdss_get_default_display_name(); bool force; force = def_disp_name && strcmp(def_disp_name, dssdev->name) == 0; diff --git a/drivers/video/omap2/dss/dpi.c b/drivers/video/omap2/dss/dpi.c index 56748cf8760e..11d64b09cffe 100644 --- a/drivers/video/omap2/dss/dpi.c +++ b/drivers/video/omap2/dss/dpi.c @@ -389,7 +389,7 @@ static int __init dpi_init_display(struct omap_dss_device *dssdev) static struct omap_dss_device * __init dpi_find_dssdev(struct platform_device *pdev) { struct omap_dss_board_info *pdata = pdev->dev.platform_data; - const char *def_disp_name = dss_get_default_display_name(); + const char *def_disp_name = omapdss_get_default_display_name(); struct omap_dss_device *def_dssdev; int i; diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c index 7d0db2bf2fc6..2ba505b33153 100644 --- a/drivers/video/omap2/dss/dsi.c +++ b/drivers/video/omap2/dss/dsi.c @@ -5100,7 +5100,7 @@ static struct omap_dss_device * __init dsi_find_dssdev(struct platform_device *p { struct omap_dss_board_info *pdata = pdev->dev.platform_data; struct dsi_data *dsi = dsi_get_dsidrv_data(pdev); - const char *def_disp_name = dss_get_default_display_name(); + const char *def_disp_name = omapdss_get_default_display_name(); struct omap_dss_device *def_dssdev; int i; diff --git a/drivers/video/omap2/dss/dss.h b/drivers/video/omap2/dss/dss.h index 00e0a36723b9..d468743a209e 100644 --- a/drivers/video/omap2/dss/dss.h +++ b/drivers/video/omap2/dss/dss.h @@ -160,7 +160,6 @@ struct seq_file; struct platform_device; /* core */ -const char *dss_get_default_display_name(void); struct bus_type *dss_get_bus(void); struct regulator *dss_get_vdds_dsi(void); struct regulator *dss_get_vdds_sdi(void); diff --git a/drivers/video/omap2/dss/hdmi.c b/drivers/video/omap2/dss/hdmi.c index c1c54883fbe7..54931f14c099 100644 --- a/drivers/video/omap2/dss/hdmi.c +++ b/drivers/video/omap2/dss/hdmi.c @@ -910,7 +910,7 @@ int hdmi_audio_config(struct omap_dss_audio *audio) static struct omap_dss_device * __init hdmi_find_dssdev(struct platform_device *pdev) { struct omap_dss_board_info *pdata = pdev->dev.platform_data; - const char *def_disp_name = dss_get_default_display_name(); + const char *def_disp_name = omapdss_get_default_display_name(); struct omap_dss_device *def_dssdev; int i; diff --git a/drivers/video/omap2/dss/rfbi.c b/drivers/video/omap2/dss/rfbi.c index 7282e5af3e1a..7bfeb13cf3d0 100644 --- a/drivers/video/omap2/dss/rfbi.c +++ b/drivers/video/omap2/dss/rfbi.c @@ -950,7 +950,7 @@ static int __init rfbi_init_display(struct omap_dss_device *dssdev) static struct omap_dss_device * __init rfbi_find_dssdev(struct platform_device *pdev) { struct omap_dss_board_info *pdata = pdev->dev.platform_data; - const char *def_disp_name = dss_get_default_display_name(); + const char *def_disp_name = omapdss_get_default_display_name(); struct omap_dss_device *def_dssdev; int i; diff --git a/drivers/video/omap2/dss/sdi.c b/drivers/video/omap2/dss/sdi.c index 7760851f6e5d..882ce89765e7 100644 --- a/drivers/video/omap2/dss/sdi.c +++ b/drivers/video/omap2/dss/sdi.c @@ -205,7 +205,7 @@ static int __init sdi_init_display(struct omap_dss_device *dssdev) static struct omap_dss_device * __init sdi_find_dssdev(struct platform_device *pdev) { struct omap_dss_board_info *pdata = pdev->dev.platform_data; - const char *def_disp_name = dss_get_default_display_name(); + const char *def_disp_name = omapdss_get_default_display_name(); struct omap_dss_device *def_dssdev; int i; diff --git a/drivers/video/omap2/dss/venc.c b/drivers/video/omap2/dss/venc.c index 56efa3bb465d..e8fddc9012cb 100644 --- a/drivers/video/omap2/dss/venc.c +++ b/drivers/video/omap2/dss/venc.c @@ -744,7 +744,7 @@ static void venc_put_clocks(void) static struct omap_dss_device * __init venc_find_dssdev(struct platform_device *pdev) { struct omap_dss_board_info *pdata = pdev->dev.platform_data; - const char *def_disp_name = dss_get_default_display_name(); + const char *def_disp_name = omapdss_get_default_display_name(); struct omap_dss_device *def_dssdev; int i; diff --git a/include/video/omapdss.h b/include/video/omapdss.h index eac5f2562253..bf2c68ad1995 100644 --- a/include/video/omapdss.h +++ b/include/video/omapdss.h @@ -753,6 +753,7 @@ void omap_dss_put_device(struct omap_dss_device *dssdev); struct omap_dss_device *omap_dss_get_next_device(struct omap_dss_device *from); struct omap_dss_device *omap_dss_find_device(void *data, int (*match)(struct omap_dss_device *dssdev, void *data)); +const char *omapdss_get_default_display_name(void); int omap_dss_start_device(struct omap_dss_device *dssdev); void omap_dss_stop_device(struct omap_dss_device *dssdev); -- cgit v1.2.3