diff options
| author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2016-06-07 02:00:25 -0400 |
|---|---|---|
| committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2016-06-07 05:42:58 -0400 |
| commit | a1dec226a686077a9822013e601327b189f419df (patch) | |
| tree | 296d6fc66689f34308deb91278d3e061f0a53cbc | |
| parent | ecf140dfc3fe169aaff8f5561d345f6b96d7b476 (diff) | |
| parent | 26038aad2511566c1a0923777e76565a13af0b8d (diff) | |
Merge omapdss header refactoring
Merge omapdss public header refactoring, which separates the public
header into omapdrm and omapfb parts.
98 files changed, 1081 insertions, 751 deletions
diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c index d9c3ffc39329..390795b334c3 100644 --- a/arch/arm/mach-omap2/board-ldp.c +++ b/arch/arm/mach-omap2/board-ldp.c | |||
| @@ -39,7 +39,7 @@ | |||
| 39 | #include "gpmc.h" | 39 | #include "gpmc.h" |
| 40 | #include "gpmc-smsc911x.h" | 40 | #include "gpmc-smsc911x.h" |
| 41 | 41 | ||
| 42 | #include <video/omapdss.h> | 42 | #include <linux/platform_data/omapdss.h> |
| 43 | #include <video/omap-panel-data.h> | 43 | #include <video/omap-panel-data.h> |
| 44 | 44 | ||
| 45 | #include "board-flash.h" | 45 | #include "board-flash.h" |
| @@ -47,6 +47,7 @@ | |||
| 47 | #include "hsmmc.h" | 47 | #include "hsmmc.h" |
| 48 | #include "control.h" | 48 | #include "control.h" |
| 49 | #include "common-board-devices.h" | 49 | #include "common-board-devices.h" |
| 50 | #include "display.h" | ||
| 50 | 51 | ||
| 51 | #define LDP_SMSC911X_CS 1 | 52 | #define LDP_SMSC911X_CS 1 |
| 52 | #define LDP_SMSC911X_GPIO 152 | 53 | #define LDP_SMSC911X_GPIO 152 |
diff --git a/arch/arm/mach-omap2/board-rx51-video.c b/arch/arm/mach-omap2/board-rx51-video.c index 9cfebc5c7455..180c6aa633bd 100644 --- a/arch/arm/mach-omap2/board-rx51-video.c +++ b/arch/arm/mach-omap2/board-rx51-video.c | |||
| @@ -15,13 +15,14 @@ | |||
| 15 | #include <linux/spi/spi.h> | 15 | #include <linux/spi/spi.h> |
| 16 | #include <linux/mm.h> | 16 | #include <linux/mm.h> |
| 17 | #include <asm/mach-types.h> | 17 | #include <asm/mach-types.h> |
| 18 | #include <video/omapdss.h> | 18 | #include <linux/platform_data/omapdss.h> |
| 19 | #include <video/omap-panel-data.h> | 19 | #include <video/omap-panel-data.h> |
| 20 | 20 | ||
| 21 | #include <linux/platform_data/spi-omap2-mcspi.h> | 21 | #include <linux/platform_data/spi-omap2-mcspi.h> |
| 22 | 22 | ||
| 23 | #include "soc.h" | 23 | #include "soc.h" |
| 24 | #include "board-rx51.h" | 24 | #include "board-rx51.h" |
| 25 | #include "display.h" | ||
| 25 | 26 | ||
| 26 | #include "mux.h" | 27 | #include "mux.h" |
| 27 | 28 | ||
| @@ -32,7 +33,6 @@ | |||
| 32 | static struct connector_atv_platform_data rx51_tv_pdata = { | 33 | static struct connector_atv_platform_data rx51_tv_pdata = { |
| 33 | .name = "tv", | 34 | .name = "tv", |
| 34 | .source = "venc.0", | 35 | .source = "venc.0", |
| 35 | .connector_type = OMAP_DSS_VENC_TYPE_COMPOSITE, | ||
| 36 | .invert_polarity = false, | 36 | .invert_polarity = false, |
| 37 | }; | 37 | }; |
| 38 | 38 | ||
diff --git a/arch/arm/mach-omap2/display.c b/arch/arm/mach-omap2/display.c index 6ab13d18c636..70b3eaf085e4 100644 --- a/arch/arm/mach-omap2/display.c +++ b/arch/arm/mach-omap2/display.c | |||
| @@ -29,7 +29,7 @@ | |||
| 29 | #include <linux/mfd/syscon.h> | 29 | #include <linux/mfd/syscon.h> |
| 30 | #include <linux/regmap.h> | 30 | #include <linux/regmap.h> |
| 31 | 31 | ||
| 32 | #include <video/omapdss.h> | 32 | #include <linux/platform_data/omapdss.h> |
| 33 | #include "omap_hwmod.h" | 33 | #include "omap_hwmod.h" |
| 34 | #include "omap_device.h" | 34 | #include "omap_device.h" |
| 35 | #include "omap-pm.h" | 35 | #include "omap-pm.h" |
diff --git a/arch/arm/mach-omap2/display.h b/arch/arm/mach-omap2/display.h index 7375854b16c7..78f253005279 100644 --- a/arch/arm/mach-omap2/display.h +++ b/arch/arm/mach-omap2/display.h | |||
| @@ -33,4 +33,9 @@ int omap_init_vout(void); | |||
| 33 | 33 | ||
| 34 | struct device_node * __init omapdss_find_dss_of_node(void); | 34 | struct device_node * __init omapdss_find_dss_of_node(void); |
| 35 | 35 | ||
| 36 | struct omap_dss_board_info; | ||
| 37 | |||
| 38 | /* Init with the board info */ | ||
| 39 | int omap_display_init(struct omap_dss_board_info *board_data); | ||
| 40 | |||
| 36 | #endif | 41 | #endif |
diff --git a/arch/arm/mach-omap2/dss-common.c b/arch/arm/mach-omap2/dss-common.c index ea2be0f5953b..1d583bc0b1a9 100644 --- a/arch/arm/mach-omap2/dss-common.c +++ b/arch/arm/mach-omap2/dss-common.c | |||
| @@ -27,7 +27,7 @@ | |||
| 27 | #include <linux/gpio.h> | 27 | #include <linux/gpio.h> |
| 28 | #include <linux/platform_device.h> | 28 | #include <linux/platform_device.h> |
| 29 | 29 | ||
| 30 | #include <video/omapdss.h> | 30 | #include <linux/platform_data/omapdss.h> |
| 31 | #include <video/omap-panel-data.h> | 31 | #include <video/omap-panel-data.h> |
| 32 | 32 | ||
| 33 | #include "soc.h" | 33 | #include "soc.h" |
diff --git a/drivers/gpu/drm/omapdrm/displays/connector-analog-tv.c b/drivers/gpu/drm/omapdrm/displays/connector-analog-tv.c index 8511c648a15c..3485d1ecd655 100644 --- a/drivers/gpu/drm/omapdrm/displays/connector-analog-tv.c +++ b/drivers/gpu/drm/omapdrm/displays/connector-analog-tv.c | |||
| @@ -14,9 +14,10 @@ | |||
| 14 | #include <linux/platform_device.h> | 14 | #include <linux/platform_device.h> |
| 15 | #include <linux/of.h> | 15 | #include <linux/of.h> |
| 16 | 16 | ||
| 17 | #include <video/omapdss.h> | ||
| 18 | #include <video/omap-panel-data.h> | 17 | #include <video/omap-panel-data.h> |
| 19 | 18 | ||
| 19 | #include "../dss/omapdss.h" | ||
| 20 | |||
| 20 | struct panel_drv_data { | 21 | struct panel_drv_data { |
| 21 | struct omap_dss_device dssdev; | 22 | struct omap_dss_device dssdev; |
| 22 | struct omap_dss_device *in; | 23 | struct omap_dss_device *in; |
| @@ -25,7 +26,6 @@ struct panel_drv_data { | |||
| 25 | 26 | ||
| 26 | struct omap_video_timings timings; | 27 | struct omap_video_timings timings; |
| 27 | 28 | ||
| 28 | enum omap_dss_venc_type connector_type; | ||
| 29 | bool invert_polarity; | 29 | bool invert_polarity; |
| 30 | }; | 30 | }; |
| 31 | 31 | ||
| @@ -45,10 +45,6 @@ static const struct omap_video_timings tvc_pal_timings = { | |||
| 45 | 45 | ||
| 46 | static const struct of_device_id tvc_of_match[]; | 46 | static const struct of_device_id tvc_of_match[]; |
| 47 | 47 | ||
| 48 | struct tvc_of_data { | ||
| 49 | enum omap_dss_venc_type connector_type; | ||
| 50 | }; | ||
| 51 | |||
| 52 | #define to_panel_data(x) container_of(x, struct panel_drv_data, dssdev) | 48 | #define to_panel_data(x) container_of(x, struct panel_drv_data, dssdev) |
| 53 | 49 | ||
| 54 | static int tvc_connect(struct omap_dss_device *dssdev) | 50 | static int tvc_connect(struct omap_dss_device *dssdev) |
| @@ -99,7 +95,7 @@ static int tvc_enable(struct omap_dss_device *dssdev) | |||
| 99 | in->ops.atv->set_timings(in, &ddata->timings); | 95 | in->ops.atv->set_timings(in, &ddata->timings); |
| 100 | 96 | ||
| 101 | if (!ddata->dev->of_node) { | 97 | if (!ddata->dev->of_node) { |
| 102 | in->ops.atv->set_type(in, ddata->connector_type); | 98 | in->ops.atv->set_type(in, OMAP_DSS_VENC_TYPE_COMPOSITE); |
| 103 | 99 | ||
| 104 | in->ops.atv->invert_vid_out_polarity(in, | 100 | in->ops.atv->invert_vid_out_polarity(in, |
| 105 | ddata->invert_polarity); | 101 | ddata->invert_polarity); |
| @@ -207,7 +203,6 @@ static int tvc_probe_pdata(struct platform_device *pdev) | |||
| 207 | 203 | ||
| 208 | ddata->in = in; | 204 | ddata->in = in; |
| 209 | 205 | ||
| 210 | ddata->connector_type = pdata->connector_type; | ||
| 211 | ddata->invert_polarity = pdata->invert_polarity; | 206 | ddata->invert_polarity = pdata->invert_polarity; |
| 212 | 207 | ||
| 213 | dssdev = &ddata->dssdev; | 208 | dssdev = &ddata->dssdev; |
diff --git a/drivers/gpu/drm/omapdrm/displays/connector-dvi.c b/drivers/gpu/drm/omapdrm/displays/connector-dvi.c index 747f26a55e43..75f7827525cf 100644 --- a/drivers/gpu/drm/omapdrm/displays/connector-dvi.c +++ b/drivers/gpu/drm/omapdrm/displays/connector-dvi.c | |||
| @@ -15,10 +15,10 @@ | |||
| 15 | #include <linux/slab.h> | 15 | #include <linux/slab.h> |
| 16 | 16 | ||
| 17 | #include <drm/drm_edid.h> | 17 | #include <drm/drm_edid.h> |
| 18 | |||
| 19 | #include <video/omapdss.h> | ||
| 20 | #include <video/omap-panel-data.h> | 18 | #include <video/omap-panel-data.h> |
| 21 | 19 | ||
| 20 | #include "../dss/omapdss.h" | ||
| 21 | |||
| 22 | static const struct omap_video_timings dvic_default_timings = { | 22 | static const struct omap_video_timings dvic_default_timings = { |
| 23 | .x_res = 640, | 23 | .x_res = 640, |
| 24 | .y_res = 480, | 24 | .y_res = 480, |
diff --git a/drivers/gpu/drm/omapdrm/displays/connector-hdmi.c b/drivers/gpu/drm/omapdrm/displays/connector-hdmi.c index 667ca4a24ece..7bdf83af9797 100644 --- a/drivers/gpu/drm/omapdrm/displays/connector-hdmi.c +++ b/drivers/gpu/drm/omapdrm/displays/connector-hdmi.c | |||
| @@ -17,10 +17,10 @@ | |||
| 17 | #include <linux/of_gpio.h> | 17 | #include <linux/of_gpio.h> |
| 18 | 18 | ||
| 19 | #include <drm/drm_edid.h> | 19 | #include <drm/drm_edid.h> |
| 20 | |||
| 21 | #include <video/omapdss.h> | ||
| 22 | #include <video/omap-panel-data.h> | 20 | #include <video/omap-panel-data.h> |
| 23 | 21 | ||
| 22 | #include "../dss/omapdss.h" | ||
| 23 | |||
| 24 | static const struct omap_video_timings hdmic_default_timings = { | 24 | static const struct omap_video_timings hdmic_default_timings = { |
| 25 | .x_res = 640, | 25 | .x_res = 640, |
| 26 | .y_res = 480, | 26 | .y_res = 480, |
diff --git a/drivers/gpu/drm/omapdrm/displays/encoder-opa362.c b/drivers/gpu/drm/omapdrm/displays/encoder-opa362.c index e9b62a1bb5c5..fe4e7ec3bab0 100644 --- a/drivers/gpu/drm/omapdrm/displays/encoder-opa362.c +++ b/drivers/gpu/drm/omapdrm/displays/encoder-opa362.c | |||
| @@ -19,7 +19,7 @@ | |||
| 19 | #include <linux/platform_device.h> | 19 | #include <linux/platform_device.h> |
| 20 | #include <linux/slab.h> | 20 | #include <linux/slab.h> |
| 21 | 21 | ||
| 22 | #include <video/omapdss.h> | 22 | #include "../dss/omapdss.h" |
| 23 | 23 | ||
| 24 | struct panel_drv_data { | 24 | struct panel_drv_data { |
| 25 | struct omap_dss_device dssdev; | 25 | struct omap_dss_device dssdev; |
diff --git a/drivers/gpu/drm/omapdrm/displays/encoder-tfp410.c b/drivers/gpu/drm/omapdrm/displays/encoder-tfp410.c index 671806ca7d6a..d768217cefe0 100644 --- a/drivers/gpu/drm/omapdrm/displays/encoder-tfp410.c +++ b/drivers/gpu/drm/omapdrm/displays/encoder-tfp410.c | |||
| @@ -15,8 +15,7 @@ | |||
| 15 | #include <linux/slab.h> | 15 | #include <linux/slab.h> |
| 16 | #include <linux/of_gpio.h> | 16 | #include <linux/of_gpio.h> |
| 17 | 17 | ||
| 18 | #include <video/omapdss.h> | 18 | #include "../dss/omapdss.h" |
| 19 | #include <video/omap-panel-data.h> | ||
| 20 | 19 | ||
| 21 | struct panel_drv_data { | 20 | struct panel_drv_data { |
| 22 | struct omap_dss_device dssdev; | 21 | struct omap_dss_device dssdev; |
diff --git a/drivers/gpu/drm/omapdrm/displays/encoder-tpd12s015.c b/drivers/gpu/drm/omapdrm/displays/encoder-tpd12s015.c index 916a89978387..46855c8f5cbf 100644 --- a/drivers/gpu/drm/omapdrm/displays/encoder-tpd12s015.c +++ b/drivers/gpu/drm/omapdrm/displays/encoder-tpd12s015.c | |||
| @@ -16,8 +16,7 @@ | |||
| 16 | #include <linux/platform_device.h> | 16 | #include <linux/platform_device.h> |
| 17 | #include <linux/gpio/consumer.h> | 17 | #include <linux/gpio/consumer.h> |
| 18 | 18 | ||
| 19 | #include <video/omapdss.h> | 19 | #include "../dss/omapdss.h" |
| 20 | #include <video/omap-panel-data.h> | ||
| 21 | 20 | ||
| 22 | struct panel_drv_data { | 21 | struct panel_drv_data { |
| 23 | struct omap_dss_device dssdev; | 22 | struct omap_dss_device dssdev; |
diff --git a/drivers/gpu/drm/omapdrm/displays/panel-dpi.c b/drivers/gpu/drm/omapdrm/displays/panel-dpi.c index 3e697e893567..7f16f985ab22 100644 --- a/drivers/gpu/drm/omapdrm/displays/panel-dpi.c +++ b/drivers/gpu/drm/omapdrm/displays/panel-dpi.c | |||
| @@ -17,10 +17,11 @@ | |||
| 17 | #include <linux/of_gpio.h> | 17 | #include <linux/of_gpio.h> |
| 18 | #include <linux/regulator/consumer.h> | 18 | #include <linux/regulator/consumer.h> |
| 19 | 19 | ||
| 20 | #include <video/omapdss.h> | ||
| 21 | #include <video/omap-panel-data.h> | 20 | #include <video/omap-panel-data.h> |
| 22 | #include <video/of_display_timing.h> | 21 | #include <video/of_display_timing.h> |
| 23 | 22 | ||
| 23 | #include "../dss/omapdss.h" | ||
| 24 | |||
| 24 | struct panel_drv_data { | 25 | struct panel_drv_data { |
| 25 | struct omap_dss_device dssdev; | 26 | struct omap_dss_device dssdev; |
| 26 | struct omap_dss_device *in; | 27 | struct omap_dss_device *in; |
diff --git a/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c b/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c index 2b118071b5a1..1b0cf2d8224b 100644 --- a/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c +++ b/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c | |||
| @@ -25,10 +25,10 @@ | |||
| 25 | #include <linux/of_device.h> | 25 | #include <linux/of_device.h> |
| 26 | #include <linux/of_gpio.h> | 26 | #include <linux/of_gpio.h> |
| 27 | 27 | ||
| 28 | #include <video/omapdss.h> | ||
| 29 | #include <video/omap-panel-data.h> | ||
| 30 | #include <video/mipi_display.h> | 28 | #include <video/mipi_display.h> |
| 31 | 29 | ||
| 30 | #include "../dss/omapdss.h" | ||
| 31 | |||
| 32 | /* DSI Virtual channel. Hardcoded for now. */ | 32 | /* DSI Virtual channel. Hardcoded for now. */ |
| 33 | #define TCH 0 | 33 | #define TCH 0 |
| 34 | 34 | ||
diff --git a/drivers/gpu/drm/omapdrm/displays/panel-lgphilips-lb035q02.c b/drivers/gpu/drm/omapdrm/displays/panel-lgphilips-lb035q02.c index 945fe5e539c1..6dfb96cea293 100644 --- a/drivers/gpu/drm/omapdrm/displays/panel-lgphilips-lb035q02.c +++ b/drivers/gpu/drm/omapdrm/displays/panel-lgphilips-lb035q02.c | |||
| @@ -17,8 +17,7 @@ | |||
| 17 | #include <linux/gpio.h> | 17 | #include <linux/gpio.h> |
| 18 | #include <linux/gpio/consumer.h> | 18 | #include <linux/gpio/consumer.h> |
| 19 | 19 | ||
| 20 | #include <video/omapdss.h> | 20 | #include "../dss/omapdss.h" |
| 21 | #include <video/omap-panel-data.h> | ||
| 22 | 21 | ||
| 23 | static struct omap_video_timings lb035q02_timings = { | 22 | static struct omap_video_timings lb035q02_timings = { |
| 24 | .x_res = 320, | 23 | .x_res = 320, |
diff --git a/drivers/gpu/drm/omapdrm/displays/panel-nec-nl8048hl11.c b/drivers/gpu/drm/omapdrm/displays/panel-nec-nl8048hl11.c index 38d2920a95e6..fc4c238c9583 100644 --- a/drivers/gpu/drm/omapdrm/displays/panel-nec-nl8048hl11.c +++ b/drivers/gpu/drm/omapdrm/displays/panel-nec-nl8048hl11.c | |||
| @@ -18,7 +18,7 @@ | |||
| 18 | #include <linux/gpio/consumer.h> | 18 | #include <linux/gpio/consumer.h> |
| 19 | #include <linux/of_gpio.h> | 19 | #include <linux/of_gpio.h> |
| 20 | 20 | ||
| 21 | #include <video/omapdss.h> | 21 | #include "../dss/omapdss.h" |
| 22 | 22 | ||
| 23 | struct panel_drv_data { | 23 | struct panel_drv_data { |
| 24 | struct omap_dss_device dssdev; | 24 | struct omap_dss_device dssdev; |
diff --git a/drivers/gpu/drm/omapdrm/displays/panel-sharp-ls037v7dw01.c b/drivers/gpu/drm/omapdrm/displays/panel-sharp-ls037v7dw01.c index bbf529f15971..3d3efc561ea9 100644 --- a/drivers/gpu/drm/omapdrm/displays/panel-sharp-ls037v7dw01.c +++ b/drivers/gpu/drm/omapdrm/displays/panel-sharp-ls037v7dw01.c | |||
| @@ -16,7 +16,8 @@ | |||
| 16 | #include <linux/platform_device.h> | 16 | #include <linux/platform_device.h> |
| 17 | #include <linux/slab.h> | 17 | #include <linux/slab.h> |
| 18 | #include <linux/regulator/consumer.h> | 18 | #include <linux/regulator/consumer.h> |
| 19 | #include <video/omapdss.h> | 19 | |
| 20 | #include "../dss/omapdss.h" | ||
| 20 | 21 | ||
| 21 | struct panel_drv_data { | 22 | struct panel_drv_data { |
| 22 | struct omap_dss_device dssdev; | 23 | struct omap_dss_device dssdev; |
diff --git a/drivers/gpu/drm/omapdrm/displays/panel-sony-acx565akm.c b/drivers/gpu/drm/omapdrm/displays/panel-sony-acx565akm.c index deb416736aad..157c512205d1 100644 --- a/drivers/gpu/drm/omapdrm/displays/panel-sony-acx565akm.c +++ b/drivers/gpu/drm/omapdrm/displays/panel-sony-acx565akm.c | |||
| @@ -33,9 +33,10 @@ | |||
| 33 | #include <linux/of.h> | 33 | #include <linux/of.h> |
| 34 | #include <linux/of_gpio.h> | 34 | #include <linux/of_gpio.h> |
| 35 | 35 | ||
| 36 | #include <video/omapdss.h> | ||
| 37 | #include <video/omap-panel-data.h> | 36 | #include <video/omap-panel-data.h> |
| 38 | 37 | ||
| 38 | #include "../dss/omapdss.h" | ||
| 39 | |||
| 39 | #define MIPID_CMD_READ_DISP_ID 0x04 | 40 | #define MIPID_CMD_READ_DISP_ID 0x04 |
| 40 | #define MIPID_CMD_READ_RED 0x06 | 41 | #define MIPID_CMD_READ_RED 0x06 |
| 41 | #define MIPID_CMD_READ_GREEN 0x07 | 42 | #define MIPID_CMD_READ_GREEN 0x07 |
diff --git a/drivers/gpu/drm/omapdrm/displays/panel-tpo-td028ttec1.c b/drivers/gpu/drm/omapdrm/displays/panel-tpo-td028ttec1.c index bd8d85041926..e859b3f893f7 100644 --- a/drivers/gpu/drm/omapdrm/displays/panel-tpo-td028ttec1.c +++ b/drivers/gpu/drm/omapdrm/displays/panel-tpo-td028ttec1.c | |||
| @@ -28,7 +28,8 @@ | |||
| 28 | #include <linux/delay.h> | 28 | #include <linux/delay.h> |
| 29 | #include <linux/spi/spi.h> | 29 | #include <linux/spi/spi.h> |
| 30 | #include <linux/gpio.h> | 30 | #include <linux/gpio.h> |
| 31 | #include <video/omapdss.h> | 31 | |
| 32 | #include "../dss/omapdss.h" | ||
| 32 | 33 | ||
| 33 | struct panel_drv_data { | 34 | struct panel_drv_data { |
| 34 | struct omap_dss_device dssdev; | 35 | struct omap_dss_device dssdev; |
diff --git a/drivers/gpu/drm/omapdrm/displays/panel-tpo-td043mtea1.c b/drivers/gpu/drm/omapdrm/displays/panel-tpo-td043mtea1.c index d93175b03a12..66c6bbe6472b 100644 --- a/drivers/gpu/drm/omapdrm/displays/panel-tpo-td043mtea1.c +++ b/drivers/gpu/drm/omapdrm/displays/panel-tpo-td043mtea1.c | |||
| @@ -19,7 +19,7 @@ | |||
| 19 | #include <linux/slab.h> | 19 | #include <linux/slab.h> |
| 20 | #include <linux/of_gpio.h> | 20 | #include <linux/of_gpio.h> |
| 21 | 21 | ||
| 22 | #include <video/omapdss.h> | 22 | #include "../dss/omapdss.h" |
| 23 | 23 | ||
| 24 | #define TPO_R02_MODE(x) ((x) & 7) | 24 | #define TPO_R02_MODE(x) ((x) & 7) |
| 25 | #define TPO_R02_MODE_800x480 7 | 25 | #define TPO_R02_MODE_800x480 7 |
diff --git a/drivers/gpu/drm/omapdrm/dss/core.c b/drivers/gpu/drm/omapdrm/dss/core.c index 7e4e5bebabbe..6a3ebfcd7223 100644 --- a/drivers/gpu/drm/omapdrm/dss/core.c +++ b/drivers/gpu/drm/omapdrm/dss/core.c | |||
| @@ -35,8 +35,7 @@ | |||
| 35 | #include <linux/suspend.h> | 35 | #include <linux/suspend.h> |
| 36 | #include <linux/slab.h> | 36 | #include <linux/slab.h> |
| 37 | 37 | ||
| 38 | #include <video/omapdss.h> | 38 | #include "omapdss.h" |
| 39 | |||
| 40 | #include "dss.h" | 39 | #include "dss.h" |
| 41 | #include "dss_features.h" | 40 | #include "dss_features.h" |
| 42 | 41 | ||
| @@ -196,8 +195,6 @@ static int __init omap_dss_probe(struct platform_device *pdev) | |||
| 196 | core.default_display_name = def_disp_name; | 195 | core.default_display_name = def_disp_name; |
| 197 | else if (pdata->default_display_name) | 196 | else if (pdata->default_display_name) |
| 198 | core.default_display_name = pdata->default_display_name; | 197 | core.default_display_name = pdata->default_display_name; |
| 199 | else if (pdata->default_device) | ||
| 200 | core.default_display_name = pdata->default_device->name; | ||
| 201 | 198 | ||
| 202 | return 0; | 199 | return 0; |
| 203 | 200 | ||
diff --git a/drivers/gpu/drm/omapdrm/dss/dispc.c b/drivers/gpu/drm/omapdrm/dss/dispc.c index 7b78da6d51cf..0aecce2c6ba0 100644 --- a/drivers/gpu/drm/omapdrm/dss/dispc.c +++ b/drivers/gpu/drm/omapdrm/dss/dispc.c | |||
| @@ -41,8 +41,7 @@ | |||
| 41 | #include <linux/of.h> | 41 | #include <linux/of.h> |
| 42 | #include <linux/component.h> | 42 | #include <linux/component.h> |
| 43 | 43 | ||
| 44 | #include <video/omapdss.h> | 44 | #include "omapdss.h" |
| 45 | |||
| 46 | #include "dss.h" | 45 | #include "dss.h" |
| 47 | #include "dss_features.h" | 46 | #include "dss_features.h" |
| 48 | #include "dispc.h" | 47 | #include "dispc.h" |
diff --git a/drivers/gpu/drm/omapdrm/dss/dispc_coefs.c b/drivers/gpu/drm/omapdrm/dss/dispc_coefs.c index 038c15b04215..34fad2376f8d 100644 --- a/drivers/gpu/drm/omapdrm/dss/dispc_coefs.c +++ b/drivers/gpu/drm/omapdrm/dss/dispc_coefs.c | |||
| @@ -18,8 +18,8 @@ | |||
| 18 | */ | 18 | */ |
| 19 | 19 | ||
| 20 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
| 21 | #include <video/omapdss.h> | ||
| 22 | 21 | ||
| 22 | #include "omapdss.h" | ||
| 23 | #include "dispc.h" | 23 | #include "dispc.h" |
| 24 | 24 | ||
| 25 | static const struct dispc_coef coef3_M8[8] = { | 25 | static const struct dispc_coef coef3_M8[8] = { |
diff --git a/drivers/gpu/drm/omapdrm/dss/display.c b/drivers/gpu/drm/omapdrm/dss/display.c index 9f3dd09b0a6c..8dcdd7cf9937 100644 --- a/drivers/gpu/drm/omapdrm/dss/display.c +++ b/drivers/gpu/drm/omapdrm/dss/display.c | |||
| @@ -28,7 +28,7 @@ | |||
| 28 | #include <linux/platform_device.h> | 28 | #include <linux/platform_device.h> |
| 29 | #include <linux/of.h> | 29 | #include <linux/of.h> |
| 30 | 30 | ||
| 31 | #include <video/omapdss.h> | 31 | #include "omapdss.h" |
| 32 | #include "dss.h" | 32 | #include "dss.h" |
| 33 | #include "dss_features.h" | 33 | #include "dss_features.h" |
| 34 | 34 | ||
diff --git a/drivers/gpu/drm/omapdrm/dss/dpi.c b/drivers/gpu/drm/omapdrm/dss/dpi.c index db72b507384b..b268295b76cf 100644 --- a/drivers/gpu/drm/omapdrm/dss/dpi.c +++ b/drivers/gpu/drm/omapdrm/dss/dpi.c | |||
| @@ -34,8 +34,7 @@ | |||
| 34 | #include <linux/clk.h> | 34 | #include <linux/clk.h> |
| 35 | #include <linux/component.h> | 35 | #include <linux/component.h> |
| 36 | 36 | ||
| 37 | #include <video/omapdss.h> | 37 | #include "omapdss.h" |
| 38 | |||
| 39 | #include "dss.h" | 38 | #include "dss.h" |
| 40 | #include "dss_features.h" | 39 | #include "dss_features.h" |
| 41 | 40 | ||
diff --git a/drivers/gpu/drm/omapdrm/dss/dsi.c b/drivers/gpu/drm/omapdrm/dss/dsi.c index 0a634438ba3b..6f45e9d00b41 100644 --- a/drivers/gpu/drm/omapdrm/dss/dsi.c +++ b/drivers/gpu/drm/omapdrm/dss/dsi.c | |||
| @@ -42,9 +42,9 @@ | |||
| 42 | #include <linux/of_platform.h> | 42 | #include <linux/of_platform.h> |
| 43 | #include <linux/component.h> | 43 | #include <linux/component.h> |
| 44 | 44 | ||
| 45 | #include <video/omapdss.h> | ||
| 46 | #include <video/mipi_display.h> | 45 | #include <video/mipi_display.h> |
| 47 | 46 | ||
| 47 | #include "omapdss.h" | ||
| 48 | #include "dss.h" | 48 | #include "dss.h" |
| 49 | #include "dss_features.h" | 49 | #include "dss_features.h" |
| 50 | 50 | ||
diff --git a/drivers/gpu/drm/omapdrm/dss/dss-of.c b/drivers/gpu/drm/omapdrm/dss/dss-of.c index bf407b6ba15c..dfd4e9621e3b 100644 --- a/drivers/gpu/drm/omapdrm/dss/dss-of.c +++ b/drivers/gpu/drm/omapdrm/dss/dss-of.c | |||
| @@ -18,8 +18,7 @@ | |||
| 18 | #include <linux/of.h> | 18 | #include <linux/of.h> |
| 19 | #include <linux/seq_file.h> | 19 | #include <linux/seq_file.h> |
| 20 | 20 | ||
| 21 | #include <video/omapdss.h> | 21 | #include "omapdss.h" |
| 22 | |||
| 23 | #include "dss.h" | 22 | #include "dss.h" |
| 24 | 23 | ||
| 25 | struct device_node * | 24 | struct device_node * |
diff --git a/drivers/gpu/drm/omapdrm/dss/dss.c b/drivers/gpu/drm/omapdrm/dss/dss.c index 6ac54c35227e..14887d5b02e5 100644 --- a/drivers/gpu/drm/omapdrm/dss/dss.c +++ b/drivers/gpu/drm/omapdrm/dss/dss.c | |||
| @@ -42,8 +42,7 @@ | |||
| 42 | #include <linux/suspend.h> | 42 | #include <linux/suspend.h> |
| 43 | #include <linux/component.h> | 43 | #include <linux/component.h> |
| 44 | 44 | ||
| 45 | #include <video/omapdss.h> | 45 | #include "omapdss.h" |
| 46 | |||
| 47 | #include "dss.h" | 46 | #include "dss.h" |
| 48 | #include "dss_features.h" | 47 | #include "dss_features.h" |
| 49 | 48 | ||
diff --git a/drivers/gpu/drm/omapdrm/dss/dss_features.c b/drivers/gpu/drm/omapdrm/dss/dss_features.c index c025d44ae164..ee5b93ce2763 100644 --- a/drivers/gpu/drm/omapdrm/dss/dss_features.c +++ b/drivers/gpu/drm/omapdrm/dss/dss_features.c | |||
| @@ -23,8 +23,7 @@ | |||
| 23 | #include <linux/err.h> | 23 | #include <linux/err.h> |
| 24 | #include <linux/slab.h> | 24 | #include <linux/slab.h> |
| 25 | 25 | ||
| 26 | #include <video/omapdss.h> | 26 | #include "omapdss.h" |
| 27 | |||
| 28 | #include "dss.h" | 27 | #include "dss.h" |
| 29 | #include "dss_features.h" | 28 | #include "dss_features.h" |
| 30 | 29 | ||
diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi.h b/drivers/gpu/drm/omapdrm/dss/hdmi.h index 597ee204d699..63e711545865 100644 --- a/drivers/gpu/drm/omapdrm/dss/hdmi.h +++ b/drivers/gpu/drm/omapdrm/dss/hdmi.h | |||
| @@ -23,8 +23,9 @@ | |||
| 23 | #include <linux/io.h> | 23 | #include <linux/io.h> |
| 24 | #include <linux/platform_device.h> | 24 | #include <linux/platform_device.h> |
| 25 | #include <linux/hdmi.h> | 25 | #include <linux/hdmi.h> |
| 26 | #include <video/omapdss.h> | 26 | #include <sound/omap-hdmi-audio.h> |
| 27 | 27 | ||
| 28 | #include "omapdss.h" | ||
| 28 | #include "dss.h" | 29 | #include "dss.h" |
| 29 | 30 | ||
| 30 | /* HDMI Wrapper */ | 31 | /* HDMI Wrapper */ |
diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi4.c b/drivers/gpu/drm/omapdrm/dss/hdmi4.c index ca4abb499242..2cfd70dee1b2 100644 --- a/drivers/gpu/drm/omapdrm/dss/hdmi4.c +++ b/drivers/gpu/drm/omapdrm/dss/hdmi4.c | |||
| @@ -34,9 +34,9 @@ | |||
| 34 | #include <linux/regulator/consumer.h> | 34 | #include <linux/regulator/consumer.h> |
| 35 | #include <linux/component.h> | 35 | #include <linux/component.h> |
| 36 | #include <linux/of.h> | 36 | #include <linux/of.h> |
| 37 | #include <video/omapdss.h> | ||
| 38 | #include <sound/omap-hdmi-audio.h> | 37 | #include <sound/omap-hdmi-audio.h> |
| 39 | 38 | ||
| 39 | #include "omapdss.h" | ||
| 40 | #include "hdmi4_core.h" | 40 | #include "hdmi4_core.h" |
| 41 | #include "dss.h" | 41 | #include "dss.h" |
| 42 | #include "dss_features.h" | 42 | #include "dss_features.h" |
diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi5.c b/drivers/gpu/drm/omapdrm/dss/hdmi5.c index cbcf4bb5248c..d4892d84424e 100644 --- a/drivers/gpu/drm/omapdrm/dss/hdmi5.c +++ b/drivers/gpu/drm/omapdrm/dss/hdmi5.c | |||
| @@ -39,9 +39,9 @@ | |||
| 39 | #include <linux/regulator/consumer.h> | 39 | #include <linux/regulator/consumer.h> |
| 40 | #include <linux/component.h> | 40 | #include <linux/component.h> |
| 41 | #include <linux/of.h> | 41 | #include <linux/of.h> |
| 42 | #include <video/omapdss.h> | ||
| 43 | #include <sound/omap-hdmi-audio.h> | 42 | #include <sound/omap-hdmi-audio.h> |
| 44 | 43 | ||
| 44 | #include "omapdss.h" | ||
| 45 | #include "hdmi5_core.h" | 45 | #include "hdmi5_core.h" |
| 46 | #include "dss.h" | 46 | #include "dss.h" |
| 47 | #include "dss_features.h" | 47 | #include "dss_features.h" |
diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi_common.c b/drivers/gpu/drm/omapdrm/dss/hdmi_common.c index 1b8fcc6c4ba1..4dfb67fe5f6d 100644 --- a/drivers/gpu/drm/omapdrm/dss/hdmi_common.c +++ b/drivers/gpu/drm/omapdrm/dss/hdmi_common.c | |||
| @@ -4,8 +4,8 @@ | |||
| 4 | #include <linux/kernel.h> | 4 | #include <linux/kernel.h> |
| 5 | #include <linux/err.h> | 5 | #include <linux/err.h> |
| 6 | #include <linux/of.h> | 6 | #include <linux/of.h> |
| 7 | #include <video/omapdss.h> | ||
| 8 | 7 | ||
| 8 | #include "omapdss.h" | ||
| 9 | #include "hdmi.h" | 9 | #include "hdmi.h" |
| 10 | 10 | ||
| 11 | int hdmi_parse_lanes_of(struct platform_device *pdev, struct device_node *ep, | 11 | int hdmi_parse_lanes_of(struct platform_device *pdev, struct device_node *ep, |
diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi_phy.c b/drivers/gpu/drm/omapdrm/dss/hdmi_phy.c index f98b750fc499..3ead47cccac5 100644 --- a/drivers/gpu/drm/omapdrm/dss/hdmi_phy.c +++ b/drivers/gpu/drm/omapdrm/dss/hdmi_phy.c | |||
| @@ -14,8 +14,8 @@ | |||
| 14 | #include <linux/platform_device.h> | 14 | #include <linux/platform_device.h> |
| 15 | #include <linux/slab.h> | 15 | #include <linux/slab.h> |
| 16 | #include <linux/seq_file.h> | 16 | #include <linux/seq_file.h> |
| 17 | #include <video/omapdss.h> | ||
| 18 | 17 | ||
| 18 | #include "omapdss.h" | ||
| 19 | #include "dss.h" | 19 | #include "dss.h" |
| 20 | #include "hdmi.h" | 20 | #include "hdmi.h" |
| 21 | 21 | ||
diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi_pll.c b/drivers/gpu/drm/omapdrm/dss/hdmi_pll.c index dc0212a9754e..b8bf6a9e5557 100644 --- a/drivers/gpu/drm/omapdrm/dss/hdmi_pll.c +++ b/drivers/gpu/drm/omapdrm/dss/hdmi_pll.c | |||
| @@ -19,8 +19,7 @@ | |||
| 19 | #include <linux/seq_file.h> | 19 | #include <linux/seq_file.h> |
| 20 | #include <linux/pm_runtime.h> | 20 | #include <linux/pm_runtime.h> |
| 21 | 21 | ||
| 22 | #include <video/omapdss.h> | 22 | #include "omapdss.h" |
| 23 | |||
| 24 | #include "dss.h" | 23 | #include "dss.h" |
| 25 | #include "hdmi.h" | 24 | #include "hdmi.h" |
| 26 | 25 | ||
diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi_wp.c b/drivers/gpu/drm/omapdrm/dss/hdmi_wp.c index 055f62fca5dc..203694a52d18 100644 --- a/drivers/gpu/drm/omapdrm/dss/hdmi_wp.c +++ b/drivers/gpu/drm/omapdrm/dss/hdmi_wp.c | |||
| @@ -15,8 +15,8 @@ | |||
| 15 | #include <linux/io.h> | 15 | #include <linux/io.h> |
| 16 | #include <linux/platform_device.h> | 16 | #include <linux/platform_device.h> |
| 17 | #include <linux/seq_file.h> | 17 | #include <linux/seq_file.h> |
| 18 | #include <video/omapdss.h> | ||
| 19 | 18 | ||
| 19 | #include "omapdss.h" | ||
| 20 | #include "dss.h" | 20 | #include "dss.h" |
| 21 | #include "hdmi.h" | 21 | #include "hdmi.h" |
| 22 | 22 | ||
diff --git a/drivers/gpu/drm/omapdrm/dss/omapdss.h b/drivers/gpu/drm/omapdrm/dss/omapdss.h index d7e7c909bbc2..9263283952b9 100644 --- a/drivers/gpu/drm/omapdrm/dss/omapdss.h +++ b/drivers/gpu/drm/omapdrm/dss/omapdss.h | |||
| @@ -18,7 +18,871 @@ | |||
| 18 | #ifndef __OMAP_DRM_DSS_H | 18 | #ifndef __OMAP_DRM_DSS_H |
| 19 | #define __OMAP_DRM_DSS_H | 19 | #define __OMAP_DRM_DSS_H |
| 20 | 20 | ||
| 21 | #include <video/omapdss.h> | 21 | #include <linux/list.h> |
| 22 | #include <linux/kobject.h> | ||
| 23 | #include <linux/device.h> | ||
| 24 | #include <linux/interrupt.h> | ||
| 25 | #include <video/videomode.h> | ||
| 26 | #include <linux/platform_data/omapdss.h> | ||
| 27 | |||
| 28 | #define DISPC_IRQ_FRAMEDONE (1 << 0) | ||
| 29 | #define DISPC_IRQ_VSYNC (1 << 1) | ||
| 30 | #define DISPC_IRQ_EVSYNC_EVEN (1 << 2) | ||
| 31 | #define DISPC_IRQ_EVSYNC_ODD (1 << 3) | ||
| 32 | #define DISPC_IRQ_ACBIAS_COUNT_STAT (1 << 4) | ||
| 33 | #define DISPC_IRQ_PROG_LINE_NUM (1 << 5) | ||
| 34 | #define DISPC_IRQ_GFX_FIFO_UNDERFLOW (1 << 6) | ||
| 35 | #define DISPC_IRQ_GFX_END_WIN (1 << 7) | ||
| 36 | #define DISPC_IRQ_PAL_GAMMA_MASK (1 << 8) | ||
| 37 | #define DISPC_IRQ_OCP_ERR (1 << 9) | ||
| 38 | #define DISPC_IRQ_VID1_FIFO_UNDERFLOW (1 << 10) | ||
| 39 | #define DISPC_IRQ_VID1_END_WIN (1 << 11) | ||
| 40 | #define DISPC_IRQ_VID2_FIFO_UNDERFLOW (1 << 12) | ||
| 41 | #define DISPC_IRQ_VID2_END_WIN (1 << 13) | ||
| 42 | #define DISPC_IRQ_SYNC_LOST (1 << 14) | ||
| 43 | #define DISPC_IRQ_SYNC_LOST_DIGIT (1 << 15) | ||
| 44 | #define DISPC_IRQ_WAKEUP (1 << 16) | ||
| 45 | #define DISPC_IRQ_SYNC_LOST2 (1 << 17) | ||
| 46 | #define DISPC_IRQ_VSYNC2 (1 << 18) | ||
| 47 | #define DISPC_IRQ_VID3_END_WIN (1 << 19) | ||
| 48 | #define DISPC_IRQ_VID3_FIFO_UNDERFLOW (1 << 20) | ||
| 49 | #define DISPC_IRQ_ACBIAS_COUNT_STAT2 (1 << 21) | ||
| 50 | #define DISPC_IRQ_FRAMEDONE2 (1 << 22) | ||
| 51 | #define DISPC_IRQ_FRAMEDONEWB (1 << 23) | ||
| 52 | #define DISPC_IRQ_FRAMEDONETV (1 << 24) | ||
| 53 | #define DISPC_IRQ_WBBUFFEROVERFLOW (1 << 25) | ||
| 54 | #define DISPC_IRQ_WBUNCOMPLETEERROR (1 << 26) | ||
| 55 | #define DISPC_IRQ_SYNC_LOST3 (1 << 27) | ||
| 56 | #define DISPC_IRQ_VSYNC3 (1 << 28) | ||
| 57 | #define DISPC_IRQ_ACBIAS_COUNT_STAT3 (1 << 29) | ||
| 58 | #define DISPC_IRQ_FRAMEDONE3 (1 << 30) | ||
| 59 | |||
| 60 | struct omap_dss_device; | ||
| 61 | struct omap_overlay_manager; | ||
| 62 | struct dss_lcd_mgr_config; | ||
| 63 | struct snd_aes_iec958; | ||
| 64 | struct snd_cea_861_aud_if; | ||
| 65 | struct hdmi_avi_infoframe; | ||
| 66 | |||
| 67 | enum omap_display_type { | ||
| 68 | OMAP_DISPLAY_TYPE_NONE = 0, | ||
| 69 | OMAP_DISPLAY_TYPE_DPI = 1 << 0, | ||
| 70 | OMAP_DISPLAY_TYPE_DBI = 1 << 1, | ||
| 71 | OMAP_DISPLAY_TYPE_SDI = 1 << 2, | ||
| 72 | OMAP_DISPLAY_TYPE_DSI = 1 << 3, | ||
| 73 | OMAP_DISPLAY_TYPE_VENC = 1 << 4, | ||
| 74 | OMAP_DISPLAY_TYPE_HDMI = 1 << 5, | ||
| 75 | OMAP_DISPLAY_TYPE_DVI = 1 << 6, | ||
| 76 | }; | ||
| 77 | |||
| 78 | enum omap_plane { | ||
| 79 | OMAP_DSS_GFX = 0, | ||
| 80 | OMAP_DSS_VIDEO1 = 1, | ||
| 81 | OMAP_DSS_VIDEO2 = 2, | ||
| 82 | OMAP_DSS_VIDEO3 = 3, | ||
| 83 | OMAP_DSS_WB = 4, | ||
| 84 | }; | ||
| 85 | |||
| 86 | enum omap_channel { | ||
| 87 | OMAP_DSS_CHANNEL_LCD = 0, | ||
| 88 | OMAP_DSS_CHANNEL_DIGIT = 1, | ||
| 89 | OMAP_DSS_CHANNEL_LCD2 = 2, | ||
| 90 | OMAP_DSS_CHANNEL_LCD3 = 3, | ||
| 91 | OMAP_DSS_CHANNEL_WB = 4, | ||
| 92 | }; | ||
| 93 | |||
| 94 | enum omap_color_mode { | ||
| 95 | OMAP_DSS_COLOR_CLUT1 = 1 << 0, /* BITMAP 1 */ | ||
| 96 | OMAP_DSS_COLOR_CLUT2 = 1 << 1, /* BITMAP 2 */ | ||
| 97 | OMAP_DSS_COLOR_CLUT4 = 1 << 2, /* BITMAP 4 */ | ||
| 98 | OMAP_DSS_COLOR_CLUT8 = 1 << 3, /* BITMAP 8 */ | ||
| 99 | OMAP_DSS_COLOR_RGB12U = 1 << 4, /* RGB12, 16-bit container */ | ||
| 100 | OMAP_DSS_COLOR_ARGB16 = 1 << 5, /* ARGB16 */ | ||
| 101 | OMAP_DSS_COLOR_RGB16 = 1 << 6, /* RGB16 */ | ||
| 102 | OMAP_DSS_COLOR_RGB24U = 1 << 7, /* RGB24, 32-bit container */ | ||
| 103 | OMAP_DSS_COLOR_RGB24P = 1 << 8, /* RGB24, 24-bit container */ | ||
| 104 | OMAP_DSS_COLOR_YUV2 = 1 << 9, /* YUV2 4:2:2 co-sited */ | ||
| 105 | OMAP_DSS_COLOR_UYVY = 1 << 10, /* UYVY 4:2:2 co-sited */ | ||
| 106 | OMAP_DSS_COLOR_ARGB32 = 1 << 11, /* ARGB32 */ | ||
| 107 | OMAP_DSS_COLOR_RGBA32 = 1 << 12, /* RGBA32 */ | ||
| 108 | OMAP_DSS_COLOR_RGBX32 = 1 << 13, /* RGBx32 */ | ||
| 109 | OMAP_DSS_COLOR_NV12 = 1 << 14, /* NV12 format: YUV 4:2:0 */ | ||
| 110 | OMAP_DSS_COLOR_RGBA16 = 1 << 15, /* RGBA16 - 4444 */ | ||
| 111 | OMAP_DSS_COLOR_RGBX16 = 1 << 16, /* RGBx16 - 4444 */ | ||
| 112 | OMAP_DSS_COLOR_ARGB16_1555 = 1 << 17, /* ARGB16 - 1555 */ | ||
| 113 | OMAP_DSS_COLOR_XRGB16_1555 = 1 << 18, /* xRGB16 - 1555 */ | ||
| 114 | }; | ||
| 115 | |||
| 116 | enum omap_dss_load_mode { | ||
| 117 | OMAP_DSS_LOAD_CLUT_AND_FRAME = 0, | ||
| 118 | OMAP_DSS_LOAD_CLUT_ONLY = 1, | ||
| 119 | OMAP_DSS_LOAD_FRAME_ONLY = 2, | ||
| 120 | OMAP_DSS_LOAD_CLUT_ONCE_FRAME = 3, | ||
| 121 | }; | ||
| 122 | |||
| 123 | enum omap_dss_trans_key_type { | ||
| 124 | OMAP_DSS_COLOR_KEY_GFX_DST = 0, | ||
| 125 | OMAP_DSS_COLOR_KEY_VID_SRC = 1, | ||
| 126 | }; | ||
| 127 | |||
| 128 | enum omap_rfbi_te_mode { | ||
| 129 | OMAP_DSS_RFBI_TE_MODE_1 = 1, | ||
| 130 | OMAP_DSS_RFBI_TE_MODE_2 = 2, | ||
| 131 | }; | ||
| 132 | |||
| 133 | enum omap_dss_signal_level { | ||
| 134 | OMAPDSS_SIG_ACTIVE_LOW, | ||
| 135 | OMAPDSS_SIG_ACTIVE_HIGH, | ||
| 136 | }; | ||
| 137 | |||
| 138 | enum omap_dss_signal_edge { | ||
| 139 | OMAPDSS_DRIVE_SIG_FALLING_EDGE, | ||
| 140 | OMAPDSS_DRIVE_SIG_RISING_EDGE, | ||
| 141 | }; | ||
| 142 | |||
| 143 | enum omap_dss_venc_type { | ||
| 144 | OMAP_DSS_VENC_TYPE_COMPOSITE, | ||
| 145 | OMAP_DSS_VENC_TYPE_SVIDEO, | ||
| 146 | }; | ||
| 147 | |||
| 148 | enum omap_dss_dsi_pixel_format { | ||
| 149 | OMAP_DSS_DSI_FMT_RGB888, | ||
| 150 | OMAP_DSS_DSI_FMT_RGB666, | ||
| 151 | OMAP_DSS_DSI_FMT_RGB666_PACKED, | ||
| 152 | OMAP_DSS_DSI_FMT_RGB565, | ||
| 153 | }; | ||
| 154 | |||
| 155 | enum omap_dss_dsi_mode { | ||
| 156 | OMAP_DSS_DSI_CMD_MODE = 0, | ||
| 157 | OMAP_DSS_DSI_VIDEO_MODE, | ||
| 158 | }; | ||
| 159 | |||
| 160 | enum omap_display_caps { | ||
| 161 | OMAP_DSS_DISPLAY_CAP_MANUAL_UPDATE = 1 << 0, | ||
| 162 | OMAP_DSS_DISPLAY_CAP_TEAR_ELIM = 1 << 1, | ||
| 163 | }; | ||
| 164 | |||
| 165 | enum omap_dss_display_state { | ||
| 166 | OMAP_DSS_DISPLAY_DISABLED = 0, | ||
| 167 | OMAP_DSS_DISPLAY_ACTIVE, | ||
| 168 | }; | ||
| 169 | |||
| 170 | enum omap_dss_rotation_type { | ||
| 171 | OMAP_DSS_ROT_DMA = 1 << 0, | ||
| 172 | OMAP_DSS_ROT_VRFB = 1 << 1, | ||
| 173 | OMAP_DSS_ROT_TILER = 1 << 2, | ||
| 174 | }; | ||
| 175 | |||
| 176 | /* clockwise rotation angle */ | ||
| 177 | enum omap_dss_rotation_angle { | ||
| 178 | OMAP_DSS_ROT_0 = 0, | ||
| 179 | OMAP_DSS_ROT_90 = 1, | ||
| 180 | OMAP_DSS_ROT_180 = 2, | ||
| 181 | OMAP_DSS_ROT_270 = 3, | ||
| 182 | }; | ||
| 183 | |||
| 184 | enum omap_overlay_caps { | ||
| 185 | OMAP_DSS_OVL_CAP_SCALE = 1 << 0, | ||
| 186 | OMAP_DSS_OVL_CAP_GLOBAL_ALPHA = 1 << 1, | ||
| 187 | OMAP_DSS_OVL_CAP_PRE_MULT_ALPHA = 1 << 2, | ||
| 188 | OMAP_DSS_OVL_CAP_ZORDER = 1 << 3, | ||
| 189 | OMAP_DSS_OVL_CAP_POS = 1 << 4, | ||
| 190 | OMAP_DSS_OVL_CAP_REPLICATION = 1 << 5, | ||
| 191 | }; | ||
| 192 | |||
| 193 | enum omap_overlay_manager_caps { | ||
| 194 | OMAP_DSS_DUMMY_VALUE, /* add a dummy value to prevent compiler error */ | ||
| 195 | }; | ||
| 196 | |||
| 197 | enum omap_dss_clk_source { | ||
| 198 | OMAP_DSS_CLK_SRC_FCK = 0, /* OMAP2/3: DSS1_ALWON_FCLK | ||
| 199 | * OMAP4: DSS_FCLK */ | ||
| 200 | OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DISPC, /* OMAP3: DSI1_PLL_FCLK | ||
| 201 | * OMAP4: PLL1_CLK1 */ | ||
| 202 | OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DSI, /* OMAP3: DSI2_PLL_FCLK | ||
| 203 | * OMAP4: PLL1_CLK2 */ | ||
| 204 | OMAP_DSS_CLK_SRC_DSI2_PLL_HSDIV_DISPC, /* OMAP4: PLL2_CLK1 */ | ||
| 205 | OMAP_DSS_CLK_SRC_DSI2_PLL_HSDIV_DSI, /* OMAP4: PLL2_CLK2 */ | ||
| 206 | }; | ||
| 207 | |||
| 208 | enum omap_hdmi_flags { | ||
| 209 | OMAP_HDMI_SDA_SCL_EXTERNAL_PULLUP = 1 << 0, | ||
| 210 | }; | ||
| 211 | |||
| 212 | enum omap_dss_output_id { | ||
| 213 | OMAP_DSS_OUTPUT_DPI = 1 << 0, | ||
| 214 | OMAP_DSS_OUTPUT_DBI = 1 << 1, | ||
| 215 | OMAP_DSS_OUTPUT_SDI = 1 << 2, | ||
| 216 | OMAP_DSS_OUTPUT_DSI1 = 1 << 3, | ||
| 217 | OMAP_DSS_OUTPUT_DSI2 = 1 << 4, | ||
| 218 | OMAP_DSS_OUTPUT_VENC = 1 << 5, | ||
| 219 | OMAP_DSS_OUTPUT_HDMI = 1 << 6, | ||
| 220 | }; | ||
| 221 | |||
| 222 | /* RFBI */ | ||
| 223 | |||
| 224 | struct rfbi_timings { | ||
| 225 | int cs_on_time; | ||
| 226 | int cs_off_time; | ||
| 227 | int we_on_time; | ||
| 228 | int we_off_time; | ||
| 229 | int re_on_time; | ||
| 230 | int re_off_time; | ||
| 231 | int we_cycle_time; | ||
| 232 | int re_cycle_time; | ||
| 233 | int cs_pulse_width; | ||
| 234 | int access_time; | ||
| 235 | |||
| 236 | int clk_div; | ||
| 237 | |||
| 238 | u32 tim[5]; /* set by rfbi_convert_timings() */ | ||
| 239 | |||
| 240 | int converted; | ||
| 241 | }; | ||
| 242 | |||
| 243 | /* DSI */ | ||
| 244 | |||
| 245 | enum omap_dss_dsi_trans_mode { | ||
| 246 | /* Sync Pulses: both sync start and end packets sent */ | ||
| 247 | OMAP_DSS_DSI_PULSE_MODE, | ||
| 248 | /* Sync Events: only sync start packets sent */ | ||
| 249 | OMAP_DSS_DSI_EVENT_MODE, | ||
| 250 | /* Burst: only sync start packets sent, pixels are time compressed */ | ||
| 251 | OMAP_DSS_DSI_BURST_MODE, | ||
| 252 | }; | ||
| 253 | |||
| 254 | struct omap_dss_dsi_videomode_timings { | ||
| 255 | unsigned long hsclk; | ||
| 256 | |||
| 257 | unsigned ndl; | ||
| 258 | unsigned bitspp; | ||
| 259 | |||
| 260 | /* pixels */ | ||
| 261 | u16 hact; | ||
| 262 | /* lines */ | ||
| 263 | u16 vact; | ||
| 264 | |||
| 265 | /* DSI video mode blanking data */ | ||
| 266 | /* Unit: byte clock cycles */ | ||
| 267 | u16 hss; | ||
| 268 | u16 hsa; | ||
| 269 | u16 hse; | ||
| 270 | u16 hfp; | ||
| 271 | u16 hbp; | ||
| 272 | /* Unit: line clocks */ | ||
| 273 | u16 vsa; | ||
| 274 | u16 vfp; | ||
| 275 | u16 vbp; | ||
| 276 | |||
| 277 | /* DSI blanking modes */ | ||
| 278 | int blanking_mode; | ||
| 279 | int hsa_blanking_mode; | ||
| 280 | int hbp_blanking_mode; | ||
| 281 | int hfp_blanking_mode; | ||
| 282 | |||
| 283 | enum omap_dss_dsi_trans_mode trans_mode; | ||
| 284 | |||
| 285 | bool ddr_clk_always_on; | ||
| 286 | int window_sync; | ||
| 287 | }; | ||
| 288 | |||
| 289 | struct omap_dss_dsi_config { | ||
| 290 | enum omap_dss_dsi_mode mode; | ||
| 291 | enum omap_dss_dsi_pixel_format pixel_format; | ||
| 292 | const struct omap_video_timings *timings; | ||
| 293 | |||
| 294 | unsigned long hs_clk_min, hs_clk_max; | ||
| 295 | unsigned long lp_clk_min, lp_clk_max; | ||
| 296 | |||
| 297 | bool ddr_clk_always_on; | ||
| 298 | enum omap_dss_dsi_trans_mode trans_mode; | ||
| 299 | }; | ||
| 300 | |||
| 301 | struct omap_video_timings { | ||
| 302 | /* Unit: pixels */ | ||
| 303 | u16 x_res; | ||
| 304 | /* Unit: pixels */ | ||
| 305 | u16 y_res; | ||
| 306 | /* Unit: Hz */ | ||
| 307 | u32 pixelclock; | ||
| 308 | /* Unit: pixel clocks */ | ||
| 309 | u16 hsw; /* Horizontal synchronization pulse width */ | ||
| 310 | /* Unit: pixel clocks */ | ||
| 311 | u16 hfp; /* Horizontal front porch */ | ||
| 312 | /* Unit: pixel clocks */ | ||
| 313 | u16 hbp; /* Horizontal back porch */ | ||
| 314 | /* Unit: line clocks */ | ||
| 315 | u16 vsw; /* Vertical synchronization pulse width */ | ||
| 316 | /* Unit: line clocks */ | ||
| 317 | u16 vfp; /* Vertical front porch */ | ||
| 318 | /* Unit: line clocks */ | ||
| 319 | u16 vbp; /* Vertical back porch */ | ||
| 320 | |||
| 321 | /* Vsync logic level */ | ||
| 322 | enum omap_dss_signal_level vsync_level; | ||
| 323 | /* Hsync logic level */ | ||
| 324 | enum omap_dss_signal_level hsync_level; | ||
| 325 | /* Interlaced or Progressive timings */ | ||
| 326 | bool interlace; | ||
| 327 | /* Pixel clock edge to drive LCD data */ | ||
| 328 | enum omap_dss_signal_edge data_pclk_edge; | ||
| 329 | /* Data enable logic level */ | ||
| 330 | enum omap_dss_signal_level de_level; | ||
| 331 | /* Pixel clock edges to drive HSYNC and VSYNC signals */ | ||
| 332 | enum omap_dss_signal_edge sync_pclk_edge; | ||
| 333 | |||
| 334 | bool double_pixel; | ||
| 335 | }; | ||
| 336 | |||
| 337 | /* Hardcoded timings for tv modes. Venc only uses these to | ||
| 338 | * identify the mode, and does not actually use the configs | ||
| 339 | * itself. However, the configs should be something that | ||
| 340 | * a normal monitor can also show */ | ||
| 341 | extern const struct omap_video_timings omap_dss_pal_timings; | ||
| 342 | extern const struct omap_video_timings omap_dss_ntsc_timings; | ||
| 343 | |||
| 344 | struct omap_dss_cpr_coefs { | ||
| 345 | s16 rr, rg, rb; | ||
| 346 | s16 gr, gg, gb; | ||
| 347 | s16 br, bg, bb; | ||
| 348 | }; | ||
| 349 | |||
| 350 | struct omap_overlay_info { | ||
| 351 | dma_addr_t paddr; | ||
| 352 | dma_addr_t p_uv_addr; /* for NV12 format */ | ||
| 353 | u16 screen_width; | ||
| 354 | u16 width; | ||
| 355 | u16 height; | ||
| 356 | enum omap_color_mode color_mode; | ||
| 357 | u8 rotation; | ||
| 358 | enum omap_dss_rotation_type rotation_type; | ||
| 359 | bool mirror; | ||
| 360 | |||
| 361 | u16 pos_x; | ||
| 362 | u16 pos_y; | ||
| 363 | u16 out_width; /* if 0, out_width == width */ | ||
| 364 | u16 out_height; /* if 0, out_height == height */ | ||
| 365 | u8 global_alpha; | ||
| 366 | u8 pre_mult_alpha; | ||
| 367 | u8 zorder; | ||
| 368 | }; | ||
| 369 | |||
| 370 | struct omap_overlay { | ||
| 371 | struct kobject kobj; | ||
| 372 | struct list_head list; | ||
| 373 | |||
| 374 | /* static fields */ | ||
| 375 | const char *name; | ||
| 376 | enum omap_plane id; | ||
| 377 | enum omap_color_mode supported_modes; | ||
| 378 | enum omap_overlay_caps caps; | ||
| 379 | |||
| 380 | /* dynamic fields */ | ||
| 381 | struct omap_overlay_manager *manager; | ||
| 382 | |||
| 383 | /* | ||
| 384 | * The following functions do not block: | ||
| 385 | * | ||
| 386 | * is_enabled | ||
| 387 | * set_overlay_info | ||
| 388 | * get_overlay_info | ||
| 389 | * | ||
| 390 | * The rest of the functions may block and cannot be called from | ||
| 391 | * interrupt context | ||
| 392 | */ | ||
| 393 | |||
| 394 | int (*enable)(struct omap_overlay *ovl); | ||
| 395 | int (*disable)(struct omap_overlay *ovl); | ||
| 396 | bool (*is_enabled)(struct omap_overlay *ovl); | ||
| 397 | |||
| 398 | int (*set_manager)(struct omap_overlay *ovl, | ||
| 399 | struct omap_overlay_manager *mgr); | ||
| 400 | int (*unset_manager)(struct omap_overlay *ovl); | ||
| 401 | |||
| 402 | int (*set_overlay_info)(struct omap_overlay *ovl, | ||
| 403 | struct omap_overlay_info *info); | ||
| 404 | void (*get_overlay_info)(struct omap_overlay *ovl, | ||
| 405 | struct omap_overlay_info *info); | ||
| 406 | |||
| 407 | int (*wait_for_go)(struct omap_overlay *ovl); | ||
| 408 | |||
| 409 | struct omap_dss_device *(*get_device)(struct omap_overlay *ovl); | ||
| 410 | }; | ||
| 411 | |||
| 412 | struct omap_overlay_manager_info { | ||
| 413 | u32 default_color; | ||
| 414 | |||
| 415 | enum omap_dss_trans_key_type trans_key_type; | ||
| 416 | u32 trans_key; | ||
| 417 | bool trans_enabled; | ||
| 418 | |||
| 419 | bool partial_alpha_enabled; | ||
| 420 | |||
| 421 | bool cpr_enable; | ||
| 422 | struct omap_dss_cpr_coefs cpr_coefs; | ||
| 423 | }; | ||
| 424 | |||
| 425 | struct omap_overlay_manager { | ||
| 426 | struct kobject kobj; | ||
| 427 | |||
| 428 | /* static fields */ | ||
| 429 | const char *name; | ||
| 430 | enum omap_channel id; | ||
| 431 | enum omap_overlay_manager_caps caps; | ||
| 432 | struct list_head overlays; | ||
| 433 | enum omap_display_type supported_displays; | ||
| 434 | enum omap_dss_output_id supported_outputs; | ||
| 435 | |||
| 436 | /* dynamic fields */ | ||
| 437 | struct omap_dss_device *output; | ||
| 438 | |||
| 439 | /* | ||
| 440 | * The following functions do not block: | ||
| 441 | * | ||
| 442 | * set_manager_info | ||
| 443 | * get_manager_info | ||
| 444 | * apply | ||
| 445 | * | ||
| 446 | * The rest of the functions may block and cannot be called from | ||
| 447 | * interrupt context | ||
| 448 | */ | ||
| 449 | |||
| 450 | int (*set_output)(struct omap_overlay_manager *mgr, | ||
| 451 | struct omap_dss_device *output); | ||
| 452 | int (*unset_output)(struct omap_overlay_manager *mgr); | ||
| 453 | |||
| 454 | int (*set_manager_info)(struct omap_overlay_manager *mgr, | ||
| 455 | struct omap_overlay_manager_info *info); | ||
| 456 | void (*get_manager_info)(struct omap_overlay_manager *mgr, | ||
| 457 | struct omap_overlay_manager_info *info); | ||
| 458 | |||
| 459 | int (*apply)(struct omap_overlay_manager *mgr); | ||
| 460 | int (*wait_for_go)(struct omap_overlay_manager *mgr); | ||
| 461 | int (*wait_for_vsync)(struct omap_overlay_manager *mgr); | ||
| 462 | |||
| 463 | struct omap_dss_device *(*get_device)(struct omap_overlay_manager *mgr); | ||
| 464 | }; | ||
| 465 | |||
| 466 | /* 22 pins means 1 clk lane and 10 data lanes */ | ||
| 467 | #define OMAP_DSS_MAX_DSI_PINS 22 | ||
| 468 | |||
| 469 | struct omap_dsi_pin_config { | ||
| 470 | int num_pins; | ||
| 471 | /* | ||
| 472 | * pin numbers in the following order: | ||
| 473 | * clk+, clk- | ||
| 474 | * data1+, data1- | ||
| 475 | * data2+, data2- | ||
| 476 | * ... | ||
| 477 | */ | ||
| 478 | int pins[OMAP_DSS_MAX_DSI_PINS]; | ||
| 479 | }; | ||
| 480 | |||
| 481 | struct omap_dss_writeback_info { | ||
| 482 | u32 paddr; | ||
| 483 | u32 p_uv_addr; | ||
| 484 | u16 buf_width; | ||
| 485 | u16 width; | ||
| 486 | u16 height; | ||
| 487 | enum omap_color_mode color_mode; | ||
| 488 | u8 rotation; | ||
| 489 | enum omap_dss_rotation_type rotation_type; | ||
| 490 | bool mirror; | ||
| 491 | u8 pre_mult_alpha; | ||
| 492 | }; | ||
| 493 | |||
| 494 | struct omapdss_dpi_ops { | ||
| 495 | int (*connect)(struct omap_dss_device *dssdev, | ||
| 496 | struct omap_dss_device *dst); | ||
| 497 | void (*disconnect)(struct omap_dss_device *dssdev, | ||
| 498 | struct omap_dss_device *dst); | ||
| 499 | |||
| 500 | int (*enable)(struct omap_dss_device *dssdev); | ||
| 501 | void (*disable)(struct omap_dss_device *dssdev); | ||
| 502 | |||
| 503 | int (*check_timings)(struct omap_dss_device *dssdev, | ||
| 504 | struct omap_video_timings *timings); | ||
| 505 | void (*set_timings)(struct omap_dss_device *dssdev, | ||
| 506 | struct omap_video_timings *timings); | ||
| 507 | void (*get_timings)(struct omap_dss_device *dssdev, | ||
| 508 | struct omap_video_timings *timings); | ||
| 509 | |||
| 510 | void (*set_data_lines)(struct omap_dss_device *dssdev, int data_lines); | ||
| 511 | }; | ||
| 512 | |||
| 513 | struct omapdss_sdi_ops { | ||
| 514 | int (*connect)(struct omap_dss_device *dssdev, | ||
| 515 | struct omap_dss_device *dst); | ||
| 516 | void (*disconnect)(struct omap_dss_device *dssdev, | ||
| 517 | struct omap_dss_device *dst); | ||
| 518 | |||
| 519 | int (*enable)(struct omap_dss_device *dssdev); | ||
| 520 | void (*disable)(struct omap_dss_device *dssdev); | ||
| 521 | |||
| 522 | int (*check_timings)(struct omap_dss_device *dssdev, | ||
| 523 | struct omap_video_timings *timings); | ||
| 524 | void (*set_timings)(struct omap_dss_device *dssdev, | ||
| 525 | struct omap_video_timings *timings); | ||
| 526 | void (*get_timings)(struct omap_dss_device *dssdev, | ||
| 527 | struct omap_video_timings *timings); | ||
| 528 | |||
| 529 | void (*set_datapairs)(struct omap_dss_device *dssdev, int datapairs); | ||
| 530 | }; | ||
| 531 | |||
| 532 | struct omapdss_dvi_ops { | ||
| 533 | int (*connect)(struct omap_dss_device *dssdev, | ||
| 534 | struct omap_dss_device *dst); | ||
| 535 | void (*disconnect)(struct omap_dss_device *dssdev, | ||
| 536 | struct omap_dss_device *dst); | ||
| 537 | |||
| 538 | int (*enable)(struct omap_dss_device *dssdev); | ||
| 539 | void (*disable)(struct omap_dss_device *dssdev); | ||
| 540 | |||
| 541 | int (*check_timings)(struct omap_dss_device *dssdev, | ||
| 542 | struct omap_video_timings *timings); | ||
| 543 | void (*set_timings)(struct omap_dss_device *dssdev, | ||
| 544 | struct omap_video_timings *timings); | ||
| 545 | void (*get_timings)(struct omap_dss_device *dssdev, | ||
| 546 | struct omap_video_timings *timings); | ||
| 547 | }; | ||
| 548 | |||
| 549 | struct omapdss_atv_ops { | ||
| 550 | int (*connect)(struct omap_dss_device *dssdev, | ||
| 551 | struct omap_dss_device *dst); | ||
| 552 | void (*disconnect)(struct omap_dss_device *dssdev, | ||
| 553 | struct omap_dss_device *dst); | ||
| 554 | |||
| 555 | int (*enable)(struct omap_dss_device *dssdev); | ||
| 556 | void (*disable)(struct omap_dss_device *dssdev); | ||
| 557 | |||
| 558 | int (*check_timings)(struct omap_dss_device *dssdev, | ||
| 559 | struct omap_video_timings *timings); | ||
| 560 | void (*set_timings)(struct omap_dss_device *dssdev, | ||
| 561 | struct omap_video_timings *timings); | ||
| 562 | void (*get_timings)(struct omap_dss_device *dssdev, | ||
| 563 | struct omap_video_timings *timings); | ||
| 564 | |||
| 565 | void (*set_type)(struct omap_dss_device *dssdev, | ||
| 566 | enum omap_dss_venc_type type); | ||
| 567 | void (*invert_vid_out_polarity)(struct omap_dss_device *dssdev, | ||
| 568 | bool invert_polarity); | ||
| 569 | |||
| 570 | int (*set_wss)(struct omap_dss_device *dssdev, u32 wss); | ||
| 571 | u32 (*get_wss)(struct omap_dss_device *dssdev); | ||
| 572 | }; | ||
| 573 | |||
| 574 | struct omapdss_hdmi_ops { | ||
| 575 | int (*connect)(struct omap_dss_device *dssdev, | ||
| 576 | struct omap_dss_device *dst); | ||
| 577 | void (*disconnect)(struct omap_dss_device *dssdev, | ||
| 578 | struct omap_dss_device *dst); | ||
| 579 | |||
| 580 | int (*enable)(struct omap_dss_device *dssdev); | ||
| 581 | void (*disable)(struct omap_dss_device *dssdev); | ||
| 582 | |||
| 583 | int (*check_timings)(struct omap_dss_device *dssdev, | ||
| 584 | struct omap_video_timings *timings); | ||
| 585 | void (*set_timings)(struct omap_dss_device *dssdev, | ||
| 586 | struct omap_video_timings *timings); | ||
| 587 | void (*get_timings)(struct omap_dss_device *dssdev, | ||
| 588 | struct omap_video_timings *timings); | ||
| 589 | |||
| 590 | int (*read_edid)(struct omap_dss_device *dssdev, u8 *buf, int len); | ||
| 591 | bool (*detect)(struct omap_dss_device *dssdev); | ||
| 592 | |||
| 593 | int (*set_hdmi_mode)(struct omap_dss_device *dssdev, bool hdmi_mode); | ||
| 594 | int (*set_infoframe)(struct omap_dss_device *dssdev, | ||
| 595 | const struct hdmi_avi_infoframe *avi); | ||
| 596 | }; | ||
| 597 | |||
| 598 | struct omapdss_dsi_ops { | ||
| 599 | int (*connect)(struct omap_dss_device *dssdev, | ||
| 600 | struct omap_dss_device *dst); | ||
| 601 | void (*disconnect)(struct omap_dss_device *dssdev, | ||
| 602 | struct omap_dss_device *dst); | ||
| 603 | |||
| 604 | int (*enable)(struct omap_dss_device *dssdev); | ||
| 605 | void (*disable)(struct omap_dss_device *dssdev, bool disconnect_lanes, | ||
| 606 | bool enter_ulps); | ||
| 607 | |||
| 608 | /* bus configuration */ | ||
| 609 | int (*set_config)(struct omap_dss_device *dssdev, | ||
| 610 | const struct omap_dss_dsi_config *cfg); | ||
| 611 | int (*configure_pins)(struct omap_dss_device *dssdev, | ||
| 612 | const struct omap_dsi_pin_config *pin_cfg); | ||
| 613 | |||
| 614 | void (*enable_hs)(struct omap_dss_device *dssdev, int channel, | ||
| 615 | bool enable); | ||
| 616 | int (*enable_te)(struct omap_dss_device *dssdev, bool enable); | ||
| 617 | |||
| 618 | int (*update)(struct omap_dss_device *dssdev, int channel, | ||
| 619 | void (*callback)(int, void *), void *data); | ||
| 620 | |||
| 621 | void (*bus_lock)(struct omap_dss_device *dssdev); | ||
| 622 | void (*bus_unlock)(struct omap_dss_device *dssdev); | ||
| 623 | |||
| 624 | int (*enable_video_output)(struct omap_dss_device *dssdev, int channel); | ||
| 625 | void (*disable_video_output)(struct omap_dss_device *dssdev, | ||
| 626 | int channel); | ||
| 627 | |||
| 628 | int (*request_vc)(struct omap_dss_device *dssdev, int *channel); | ||
| 629 | int (*set_vc_id)(struct omap_dss_device *dssdev, int channel, | ||
| 630 | int vc_id); | ||
| 631 | void (*release_vc)(struct omap_dss_device *dssdev, int channel); | ||
| 632 | |||
| 633 | /* data transfer */ | ||
| 634 | int (*dcs_write)(struct omap_dss_device *dssdev, int channel, | ||
| 635 | u8 *data, int len); | ||
| 636 | int (*dcs_write_nosync)(struct omap_dss_device *dssdev, int channel, | ||
| 637 | u8 *data, int len); | ||
| 638 | int (*dcs_read)(struct omap_dss_device *dssdev, int channel, u8 dcs_cmd, | ||
| 639 | u8 *data, int len); | ||
| 640 | |||
| 641 | int (*gen_write)(struct omap_dss_device *dssdev, int channel, | ||
| 642 | u8 *data, int len); | ||
| 643 | int (*gen_write_nosync)(struct omap_dss_device *dssdev, int channel, | ||
| 644 | u8 *data, int len); | ||
| 645 | int (*gen_read)(struct omap_dss_device *dssdev, int channel, | ||
| 646 | u8 *reqdata, int reqlen, | ||
| 647 | u8 *data, int len); | ||
| 648 | |||
| 649 | int (*bta_sync)(struct omap_dss_device *dssdev, int channel); | ||
| 650 | |||
| 651 | int (*set_max_rx_packet_size)(struct omap_dss_device *dssdev, | ||
| 652 | int channel, u16 plen); | ||
| 653 | }; | ||
| 654 | |||
| 655 | struct omap_dss_device { | ||
| 656 | struct kobject kobj; | ||
| 657 | struct device *dev; | ||
| 658 | |||
| 659 | struct module *owner; | ||
| 660 | |||
| 661 | struct list_head panel_list; | ||
| 662 | |||
| 663 | /* alias in the form of "display%d" */ | ||
| 664 | char alias[16]; | ||
| 665 | |||
| 666 | enum omap_display_type type; | ||
| 667 | enum omap_display_type output_type; | ||
| 668 | |||
| 669 | union { | ||
| 670 | struct { | ||
| 671 | u8 data_lines; | ||
| 672 | } dpi; | ||
| 673 | |||
| 674 | struct { | ||
| 675 | u8 channel; | ||
| 676 | u8 data_lines; | ||
| 677 | } rfbi; | ||
| 678 | |||
| 679 | struct { | ||
| 680 | u8 datapairs; | ||
| 681 | } sdi; | ||
| 682 | |||
| 683 | struct { | ||
| 684 | int module; | ||
| 685 | } dsi; | ||
| 686 | |||
| 687 | struct { | ||
| 688 | enum omap_dss_venc_type type; | ||
| 689 | bool invert_polarity; | ||
| 690 | } venc; | ||
| 691 | } phy; | ||
| 692 | |||
| 693 | struct { | ||
| 694 | struct omap_video_timings timings; | ||
| 695 | |||
| 696 | enum omap_dss_dsi_pixel_format dsi_pix_fmt; | ||
| 697 | enum omap_dss_dsi_mode dsi_mode; | ||
| 698 | } panel; | ||
| 699 | |||
| 700 | struct { | ||
| 701 | u8 pixel_size; | ||
| 702 | struct rfbi_timings rfbi_timings; | ||
| 703 | } ctrl; | ||
| 704 | |||
| 705 | const char *name; | ||
| 706 | |||
| 707 | /* used to match device to driver */ | ||
| 708 | const char *driver_name; | ||
| 709 | |||
| 710 | void *data; | ||
| 711 | |||
| 712 | struct omap_dss_driver *driver; | ||
| 713 | |||
| 714 | union { | ||
| 715 | const struct omapdss_dpi_ops *dpi; | ||
| 716 | const struct omapdss_sdi_ops *sdi; | ||
| 717 | const struct omapdss_dvi_ops *dvi; | ||
| 718 | const struct omapdss_hdmi_ops *hdmi; | ||
| 719 | const struct omapdss_atv_ops *atv; | ||
| 720 | const struct omapdss_dsi_ops *dsi; | ||
| 721 | } ops; | ||
| 722 | |||
| 723 | /* helper variable for driver suspend/resume */ | ||
| 724 | bool activate_after_resume; | ||
| 725 | |||
| 726 | enum omap_display_caps caps; | ||
| 727 | |||
| 728 | struct omap_dss_device *src; | ||
| 729 | |||
| 730 | enum omap_dss_display_state state; | ||
| 731 | |||
| 732 | /* OMAP DSS output specific fields */ | ||
| 733 | |||
| 734 | struct list_head list; | ||
| 735 | |||
| 736 | /* DISPC channel for this output */ | ||
| 737 | enum omap_channel dispc_channel; | ||
| 738 | bool dispc_channel_connected; | ||
| 739 | |||
| 740 | /* output instance */ | ||
| 741 | enum omap_dss_output_id id; | ||
| 742 | |||
| 743 | /* the port number in the DT node */ | ||
| 744 | int port_num; | ||
| 745 | |||
| 746 | /* dynamic fields */ | ||
| 747 | struct omap_overlay_manager *manager; | ||
| 748 | |||
| 749 | struct omap_dss_device *dst; | ||
| 750 | }; | ||
| 751 | |||
| 752 | struct omap_dss_driver { | ||
| 753 | int (*probe)(struct omap_dss_device *); | ||
| 754 | void (*remove)(struct omap_dss_device *); | ||
| 755 | |||
| 756 | int (*connect)(struct omap_dss_device *dssdev); | ||
| 757 | void (*disconnect)(struct omap_dss_device *dssdev); | ||
| 758 | |||
| 759 | int (*enable)(struct omap_dss_device *display); | ||
| 760 | void (*disable)(struct omap_dss_device *display); | ||
| 761 | int (*run_test)(struct omap_dss_device *display, int test); | ||
| 762 | |||
| 763 | int (*update)(struct omap_dss_device *dssdev, | ||
| 764 | u16 x, u16 y, u16 w, u16 h); | ||
| 765 | int (*sync)(struct omap_dss_device *dssdev); | ||
| 766 | |||
| 767 | int (*enable_te)(struct omap_dss_device *dssdev, bool enable); | ||
| 768 | int (*get_te)(struct omap_dss_device *dssdev); | ||
| 769 | |||
| 770 | u8 (*get_rotate)(struct omap_dss_device *dssdev); | ||
| 771 | int (*set_rotate)(struct omap_dss_device *dssdev, u8 rotate); | ||
| 772 | |||
| 773 | bool (*get_mirror)(struct omap_dss_device *dssdev); | ||
| 774 | int (*set_mirror)(struct omap_dss_device *dssdev, bool enable); | ||
| 775 | |||
| 776 | int (*memory_read)(struct omap_dss_device *dssdev, | ||
| 777 | void *buf, size_t size, | ||
| 778 | u16 x, u16 y, u16 w, u16 h); | ||
| 779 | |||
| 780 | void (*get_resolution)(struct omap_dss_device *dssdev, | ||
| 781 | u16 *xres, u16 *yres); | ||
| 782 | void (*get_dimensions)(struct omap_dss_device *dssdev, | ||
| 783 | u32 *width, u32 *height); | ||
| 784 | int (*get_recommended_bpp)(struct omap_dss_device *dssdev); | ||
| 785 | |||
| 786 | int (*check_timings)(struct omap_dss_device *dssdev, | ||
| 787 | struct omap_video_timings *timings); | ||
| 788 | void (*set_timings)(struct omap_dss_device *dssdev, | ||
| 789 | struct omap_video_timings *timings); | ||
| 790 | void (*get_timings)(struct omap_dss_device *dssdev, | ||
| 791 | struct omap_video_timings *timings); | ||
| 792 | |||
| 793 | int (*set_wss)(struct omap_dss_device *dssdev, u32 wss); | ||
| 794 | u32 (*get_wss)(struct omap_dss_device *dssdev); | ||
| 795 | |||
| 796 | int (*read_edid)(struct omap_dss_device *dssdev, u8 *buf, int len); | ||
| 797 | bool (*detect)(struct omap_dss_device *dssdev); | ||
| 798 | |||
| 799 | int (*set_hdmi_mode)(struct omap_dss_device *dssdev, bool hdmi_mode); | ||
| 800 | int (*set_hdmi_infoframe)(struct omap_dss_device *dssdev, | ||
| 801 | const struct hdmi_avi_infoframe *avi); | ||
| 802 | }; | ||
| 803 | |||
| 804 | enum omapdss_version omapdss_get_version(void); | ||
| 805 | bool omapdss_is_initialized(void); | ||
| 806 | |||
| 807 | int omap_dss_register_driver(struct omap_dss_driver *); | ||
| 808 | void omap_dss_unregister_driver(struct omap_dss_driver *); | ||
| 809 | |||
| 810 | int omapdss_register_display(struct omap_dss_device *dssdev); | ||
| 811 | void omapdss_unregister_display(struct omap_dss_device *dssdev); | ||
| 812 | |||
| 813 | struct omap_dss_device *omap_dss_get_device(struct omap_dss_device *dssdev); | ||
| 814 | void omap_dss_put_device(struct omap_dss_device *dssdev); | ||
| 815 | #define for_each_dss_dev(d) while ((d = omap_dss_get_next_device(d)) != NULL) | ||
| 816 | struct omap_dss_device *omap_dss_get_next_device(struct omap_dss_device *from); | ||
| 817 | struct omap_dss_device *omap_dss_find_device(void *data, | ||
| 818 | int (*match)(struct omap_dss_device *dssdev, void *data)); | ||
| 819 | const char *omapdss_get_default_display_name(void); | ||
| 820 | |||
| 821 | void videomode_to_omap_video_timings(const struct videomode *vm, | ||
| 822 | struct omap_video_timings *ovt); | ||
| 823 | void omap_video_timings_to_videomode(const struct omap_video_timings *ovt, | ||
| 824 | struct videomode *vm); | ||
| 825 | |||
| 826 | int dss_feat_get_num_mgrs(void); | ||
| 827 | int dss_feat_get_num_ovls(void); | ||
| 828 | enum omap_color_mode dss_feat_get_supported_color_modes(enum omap_plane plane); | ||
| 829 | |||
| 830 | |||
| 831 | |||
| 832 | int omap_dss_get_num_overlay_managers(void); | ||
| 833 | struct omap_overlay_manager *omap_dss_get_overlay_manager(int num); | ||
| 834 | |||
| 835 | int omap_dss_get_num_overlays(void); | ||
| 836 | struct omap_overlay *omap_dss_get_overlay(int num); | ||
| 837 | |||
| 838 | int omapdss_register_output(struct omap_dss_device *output); | ||
| 839 | void omapdss_unregister_output(struct omap_dss_device *output); | ||
| 840 | struct omap_dss_device *omap_dss_get_output(enum omap_dss_output_id id); | ||
| 841 | struct omap_dss_device *omap_dss_find_output(const char *name); | ||
| 842 | struct omap_dss_device *omap_dss_find_output_by_port_node(struct device_node *port); | ||
| 843 | int omapdss_output_set_device(struct omap_dss_device *out, | ||
| 844 | struct omap_dss_device *dssdev); | ||
| 845 | int omapdss_output_unset_device(struct omap_dss_device *out); | ||
| 846 | |||
| 847 | struct omap_dss_device *omapdss_find_output_from_display(struct omap_dss_device *dssdev); | ||
| 848 | struct omap_overlay_manager *omapdss_find_mgr_from_display(struct omap_dss_device *dssdev); | ||
| 849 | |||
| 850 | void omapdss_default_get_resolution(struct omap_dss_device *dssdev, | ||
| 851 | u16 *xres, u16 *yres); | ||
| 852 | int omapdss_default_get_recommended_bpp(struct omap_dss_device *dssdev); | ||
| 853 | void omapdss_default_get_timings(struct omap_dss_device *dssdev, | ||
| 854 | struct omap_video_timings *timings); | ||
| 855 | |||
| 856 | typedef void (*omap_dispc_isr_t) (void *arg, u32 mask); | ||
| 857 | int omap_dispc_register_isr(omap_dispc_isr_t isr, void *arg, u32 mask); | ||
| 858 | int omap_dispc_unregister_isr(omap_dispc_isr_t isr, void *arg, u32 mask); | ||
| 859 | |||
| 860 | int omapdss_compat_init(void); | ||
| 861 | void omapdss_compat_uninit(void); | ||
| 862 | |||
| 863 | static inline bool omapdss_device_is_connected(struct omap_dss_device *dssdev) | ||
| 864 | { | ||
| 865 | return dssdev->src; | ||
| 866 | } | ||
| 867 | |||
| 868 | static inline bool omapdss_device_is_enabled(struct omap_dss_device *dssdev) | ||
| 869 | { | ||
| 870 | return dssdev->state == OMAP_DSS_DISPLAY_ACTIVE; | ||
| 871 | } | ||
| 872 | |||
| 873 | struct device_node * | ||
| 874 | omapdss_of_get_next_port(const struct device_node *parent, | ||
| 875 | struct device_node *prev); | ||
| 876 | |||
| 877 | struct device_node * | ||
| 878 | omapdss_of_get_next_endpoint(const struct device_node *parent, | ||
| 879 | struct device_node *prev); | ||
| 880 | |||
| 881 | struct device_node * | ||
| 882 | omapdss_of_get_first_endpoint(const struct device_node *parent); | ||
| 883 | |||
| 884 | struct omap_dss_device * | ||
| 885 | omapdss_of_find_source_for_first_ep(struct device_node *node); | ||
| 22 | 886 | ||
| 23 | u32 dispc_read_irqstatus(void); | 887 | u32 dispc_read_irqstatus(void); |
| 24 | void dispc_clear_irqstatus(u32 mask); | 888 | void dispc_clear_irqstatus(u32 mask); |
diff --git a/drivers/gpu/drm/omapdrm/dss/output.c b/drivers/gpu/drm/omapdrm/dss/output.c index 829232ad8c81..24f859488201 100644 --- a/drivers/gpu/drm/omapdrm/dss/output.c +++ b/drivers/gpu/drm/omapdrm/dss/output.c | |||
| @@ -21,8 +21,7 @@ | |||
| 21 | #include <linux/slab.h> | 21 | #include <linux/slab.h> |
| 22 | #include <linux/of.h> | 22 | #include <linux/of.h> |
| 23 | 23 | ||
| 24 | #include <video/omapdss.h> | 24 | #include "omapdss.h" |
| 25 | |||
| 26 | #include "dss.h" | 25 | #include "dss.h" |
| 27 | 26 | ||
| 28 | static LIST_HEAD(output_list); | 27 | static LIST_HEAD(output_list); |
diff --git a/drivers/gpu/drm/omapdrm/dss/pll.c b/drivers/gpu/drm/omapdrm/dss/pll.c index 4768a85e6c73..0a76c89cdc2e 100644 --- a/drivers/gpu/drm/omapdrm/dss/pll.c +++ b/drivers/gpu/drm/omapdrm/dss/pll.c | |||
| @@ -22,8 +22,7 @@ | |||
| 22 | #include <linux/regulator/consumer.h> | 22 | #include <linux/regulator/consumer.h> |
| 23 | #include <linux/sched.h> | 23 | #include <linux/sched.h> |
| 24 | 24 | ||
| 25 | #include <video/omapdss.h> | 25 | #include "omapdss.h" |
| 26 | |||
| 27 | #include "dss.h" | 26 | #include "dss.h" |
| 28 | 27 | ||
| 29 | #define PLL_CONTROL 0x0000 | 28 | #define PLL_CONTROL 0x0000 |
diff --git a/drivers/gpu/drm/omapdrm/dss/rfbi.c b/drivers/gpu/drm/omapdrm/dss/rfbi.c index 3796576dfadf..cd53566d75eb 100644 --- a/drivers/gpu/drm/omapdrm/dss/rfbi.c +++ b/drivers/gpu/drm/omapdrm/dss/rfbi.c | |||
| @@ -38,7 +38,7 @@ | |||
| 38 | #include <linux/pm_runtime.h> | 38 | #include <linux/pm_runtime.h> |
| 39 | #include <linux/component.h> | 39 | #include <linux/component.h> |
| 40 | 40 | ||
| 41 | #include <video/omapdss.h> | 41 | #include "omapdss.h" |
| 42 | #include "dss.h" | 42 | #include "dss.h" |
| 43 | 43 | ||
| 44 | struct rfbi_reg { u16 idx; }; | 44 | struct rfbi_reg { u16 idx; }; |
diff --git a/drivers/gpu/drm/omapdrm/dss/sdi.c b/drivers/gpu/drm/omapdrm/dss/sdi.c index cd6d3bfb041d..0a96c321ce62 100644 --- a/drivers/gpu/drm/omapdrm/dss/sdi.c +++ b/drivers/gpu/drm/omapdrm/dss/sdi.c | |||
| @@ -29,7 +29,7 @@ | |||
| 29 | #include <linux/of.h> | 29 | #include <linux/of.h> |
| 30 | #include <linux/component.h> | 30 | #include <linux/component.h> |
| 31 | 31 | ||
| 32 | #include <video/omapdss.h> | 32 | #include "omapdss.h" |
| 33 | #include "dss.h" | 33 | #include "dss.h" |
| 34 | 34 | ||
| 35 | static struct { | 35 | static struct { |
diff --git a/drivers/gpu/drm/omapdrm/dss/venc.c b/drivers/gpu/drm/omapdrm/dss/venc.c index 08a2cc778ba9..6eedf2118708 100644 --- a/drivers/gpu/drm/omapdrm/dss/venc.c +++ b/drivers/gpu/drm/omapdrm/dss/venc.c | |||
| @@ -37,8 +37,7 @@ | |||
| 37 | #include <linux/of.h> | 37 | #include <linux/of.h> |
| 38 | #include <linux/component.h> | 38 | #include <linux/component.h> |
| 39 | 39 | ||
| 40 | #include <video/omapdss.h> | 40 | #include "omapdss.h" |
| 41 | |||
| 42 | #include "dss.h" | 41 | #include "dss.h" |
| 43 | #include "dss_features.h" | 42 | #include "dss_features.h" |
| 44 | 43 | ||
diff --git a/drivers/gpu/drm/omapdrm/dss/video-pll.c b/drivers/gpu/drm/omapdrm/dss/video-pll.c index c13e1accda17..7429de928d4e 100644 --- a/drivers/gpu/drm/omapdrm/dss/video-pll.c +++ b/drivers/gpu/drm/omapdrm/dss/video-pll.c | |||
| @@ -17,8 +17,7 @@ | |||
| 17 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
| 18 | #include <linux/sched.h> | 18 | #include <linux/sched.h> |
| 19 | 19 | ||
| 20 | #include <video/omapdss.h> | 20 | #include "omapdss.h" |
| 21 | |||
| 22 | #include "dss.h" | 21 | #include "dss.h" |
| 23 | #include "dss_features.h" | 22 | #include "dss_features.h" |
| 24 | 23 | ||
diff --git a/drivers/gpu/drm/omapdrm/omap_drv.h b/drivers/gpu/drm/omapdrm/omap_drv.h index 51dbb820ff1d..dcc30a98b9d4 100644 --- a/drivers/gpu/drm/omapdrm/omap_drv.h +++ b/drivers/gpu/drm/omapdrm/omap_drv.h | |||
| @@ -24,7 +24,6 @@ | |||
| 24 | #include <linux/platform_data/omap_drm.h> | 24 | #include <linux/platform_data/omap_drm.h> |
| 25 | #include <linux/types.h> | 25 | #include <linux/types.h> |
| 26 | #include <linux/wait.h> | 26 | #include <linux/wait.h> |
| 27 | #include <video/omapdss.h> | ||
| 28 | 27 | ||
| 29 | #include <drm/drmP.h> | 28 | #include <drm/drmP.h> |
| 30 | #include <drm/drm_crtc_helper.h> | 29 | #include <drm/drm_crtc_helper.h> |
diff --git a/drivers/media/platform/omap/omap_vout.c b/drivers/media/platform/omap/omap_vout.c index 70c28d19ea04..22cf60991df6 100644 --- a/drivers/media/platform/omap/omap_vout.c +++ b/drivers/media/platform/omap/omap_vout.c | |||
| @@ -45,7 +45,7 @@ | |||
| 45 | #include <media/v4l2-ioctl.h> | 45 | #include <media/v4l2-ioctl.h> |
| 46 | 46 | ||
| 47 | #include <video/omapvrfb.h> | 47 | #include <video/omapvrfb.h> |
| 48 | #include <video/omapdss.h> | 48 | #include <video/omapfb_dss.h> |
| 49 | 49 | ||
| 50 | #include "omap_voutlib.h" | 50 | #include "omap_voutlib.h" |
| 51 | #include "omap_voutdef.h" | 51 | #include "omap_voutdef.h" |
diff --git a/drivers/media/platform/omap/omap_voutdef.h b/drivers/media/platform/omap/omap_voutdef.h index 9ccfe1f475a4..94b5d65afb19 100644 --- a/drivers/media/platform/omap/omap_voutdef.h +++ b/drivers/media/platform/omap/omap_voutdef.h | |||
| @@ -11,7 +11,7 @@ | |||
| 11 | #ifndef OMAP_VOUTDEF_H | 11 | #ifndef OMAP_VOUTDEF_H |
| 12 | #define OMAP_VOUTDEF_H | 12 | #define OMAP_VOUTDEF_H |
| 13 | 13 | ||
| 14 | #include <video/omapdss.h> | 14 | #include <video/omapfb_dss.h> |
| 15 | #include <video/omapvrfb.h> | 15 | #include <video/omapvrfb.h> |
| 16 | 16 | ||
| 17 | #define YUYV_BPP 2 | 17 | #define YUYV_BPP 2 |
diff --git a/drivers/media/platform/omap/omap_voutlib.c b/drivers/media/platform/omap/omap_voutlib.c index 80b0d88f125c..58a25fdf0cce 100644 --- a/drivers/media/platform/omap/omap_voutlib.c +++ b/drivers/media/platform/omap/omap_voutlib.c | |||
| @@ -26,7 +26,7 @@ | |||
| 26 | 26 | ||
| 27 | #include <linux/dma-mapping.h> | 27 | #include <linux/dma-mapping.h> |
| 28 | 28 | ||
| 29 | #include <video/omapdss.h> | 29 | #include <video/omapfb_dss.h> |
| 30 | 30 | ||
| 31 | #include "omap_voutlib.h" | 31 | #include "omap_voutlib.h" |
| 32 | 32 | ||
diff --git a/drivers/video/fbdev/omap2/omapfb/displays/connector-analog-tv.c b/drivers/video/fbdev/omap2/omapfb/displays/connector-analog-tv.c index 8511c648a15c..9d78411a3bf7 100644 --- a/drivers/video/fbdev/omap2/omapfb/displays/connector-analog-tv.c +++ b/drivers/video/fbdev/omap2/omapfb/displays/connector-analog-tv.c | |||
| @@ -14,7 +14,7 @@ | |||
| 14 | #include <linux/platform_device.h> | 14 | #include <linux/platform_device.h> |
| 15 | #include <linux/of.h> | 15 | #include <linux/of.h> |
| 16 | 16 | ||
| 17 | #include <video/omapdss.h> | 17 | #include <video/omapfb_dss.h> |
| 18 | #include <video/omap-panel-data.h> | 18 | #include <video/omap-panel-data.h> |
| 19 | 19 | ||
| 20 | struct panel_drv_data { | 20 | struct panel_drv_data { |
| @@ -25,7 +25,6 @@ struct panel_drv_data { | |||
| 25 | 25 | ||
| 26 | struct omap_video_timings timings; | 26 | struct omap_video_timings timings; |
| 27 | 27 | ||
| 28 | enum omap_dss_venc_type connector_type; | ||
| 29 | bool invert_polarity; | 28 | bool invert_polarity; |
| 30 | }; | 29 | }; |
| 31 | 30 | ||
| @@ -45,10 +44,6 @@ static const struct omap_video_timings tvc_pal_timings = { | |||
| 45 | 44 | ||
| 46 | static const struct of_device_id tvc_of_match[]; | 45 | static const struct of_device_id tvc_of_match[]; |
| 47 | 46 | ||
| 48 | struct tvc_of_data { | ||
| 49 | enum omap_dss_venc_type connector_type; | ||
| 50 | }; | ||
| 51 | |||
| 52 | #define to_panel_data(x) container_of(x, struct panel_drv_data, dssdev) | 47 | #define to_panel_data(x) container_of(x, struct panel_drv_data, dssdev) |
| 53 | 48 | ||
| 54 | static int tvc_connect(struct omap_dss_device *dssdev) | 49 | static int tvc_connect(struct omap_dss_device *dssdev) |
| @@ -99,7 +94,7 @@ static int tvc_enable(struct omap_dss_device *dssdev) | |||
| 99 | in->ops.atv->set_timings(in, &ddata->timings); | 94 | in->ops.atv->set_timings(in, &ddata->timings); |
| 100 | 95 | ||
| 101 | if (!ddata->dev->of_node) { | 96 | if (!ddata->dev->of_node) { |
| 102 | in->ops.atv->set_type(in, ddata->connector_type); | 97 | in->ops.atv->set_type(in, OMAP_DSS_VENC_TYPE_COMPOSITE); |
| 103 | 98 | ||
| 104 | in->ops.atv->invert_vid_out_polarity(in, | 99 | in->ops.atv->invert_vid_out_polarity(in, |
| 105 | ddata->invert_polarity); | 100 | ddata->invert_polarity); |
| @@ -207,7 +202,6 @@ static int tvc_probe_pdata(struct platform_device *pdev) | |||
| 207 | 202 | ||
| 208 | ddata->in = in; | 203 | ddata->in = in; |
| 209 | 204 | ||
| 210 | ddata->connector_type = pdata->connector_type; | ||
| 211 | ddata->invert_polarity = pdata->invert_polarity; | 205 | ddata->invert_polarity = pdata->invert_polarity; |
| 212 | 206 | ||
| 213 | dssdev = &ddata->dssdev; | 207 | dssdev = &ddata->dssdev; |
diff --git a/drivers/video/fbdev/omap2/omapfb/displays/connector-dvi.c b/drivers/video/fbdev/omap2/omapfb/displays/connector-dvi.c index d811e6dcaef7..06e1db34541e 100644 --- a/drivers/video/fbdev/omap2/omapfb/displays/connector-dvi.c +++ b/drivers/video/fbdev/omap2/omapfb/displays/connector-dvi.c | |||
| @@ -16,8 +16,7 @@ | |||
| 16 | 16 | ||
| 17 | #include <drm/drm_edid.h> | 17 | #include <drm/drm_edid.h> |
| 18 | 18 | ||
| 19 | #include <video/omapdss.h> | 19 | #include <video/omapfb_dss.h> |
| 20 | #include <video/omap-panel-data.h> | ||
| 21 | 20 | ||
| 22 | static const struct omap_video_timings dvic_default_timings = { | 21 | static 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 | ||
| 239 | static 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 | |||
| 279 | static int dvic_probe_of(struct platform_device *pdev) | 238 | static 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 | ||
diff --git a/drivers/video/fbdev/omap2/omapfb/displays/connector-hdmi.c b/drivers/video/fbdev/omap2/omapfb/displays/connector-hdmi.c index 6ee4129bc0c0..58d5803ede67 100644 --- a/drivers/video/fbdev/omap2/omapfb/displays/connector-hdmi.c +++ b/drivers/video/fbdev/omap2/omapfb/displays/connector-hdmi.c | |||
| @@ -17,8 +17,7 @@ | |||
| 17 | 17 | ||
| 18 | #include <drm/drm_edid.h> | 18 | #include <drm/drm_edid.h> |
| 19 | 19 | ||
| 20 | #include <video/omapdss.h> | 20 | #include <video/omapfb_dss.h> |
| 21 | #include <video/omap-panel-data.h> | ||
| 22 | 21 | ||
| 23 | static const struct omap_video_timings hdmic_default_timings = { | 22 | static const struct omap_video_timings hdmic_default_timings = { |
| 24 | .x_res = 640, | 23 | .x_res = 640, |
| @@ -206,30 +205,6 @@ static struct omap_dss_driver hdmic_driver = { | |||
| 206 | .set_hdmi_infoframe = hdmic_set_infoframe, | 205 | .set_hdmi_infoframe = hdmic_set_infoframe, |
| 207 | }; | 206 | }; |
| 208 | 207 | ||
| 209 | static int hdmic_probe_pdata(struct platform_device *pdev) | ||
| 210 | { | ||
| 211 | struct panel_drv_data *ddata = platform_get_drvdata(pdev); | ||
| 212 | struct connector_hdmi_platform_data *pdata; | ||
| 213 | struct omap_dss_device *in, *dssdev; | ||
| 214 | |||
| 215 | pdata = dev_get_platdata(&pdev->dev); | ||
| 216 | |||
| 217 | ddata->hpd_gpio = -ENODEV; | ||
| 218 | |||
| 219 | in = omap_dss_find_output(pdata->source); | ||
| 220 | if (in == NULL) { | ||
| 221 | dev_err(&pdev->dev, "Failed to find video source\n"); | ||
| 222 | return -EPROBE_DEFER; | ||
| 223 | } | ||
| 224 | |||
| 225 | ddata->in = in; | ||
| 226 | |||
| 227 | dssdev = &ddata->dssdev; | ||
| 228 | dssdev->name = pdata->name; | ||
| 229 | |||
| 230 | return 0; | ||
| 231 | } | ||
| 232 | |||
| 233 | static int hdmic_probe_of(struct platform_device *pdev) | 208 | static int hdmic_probe_of(struct platform_device *pdev) |
| 234 | { | 209 | { |
| 235 | struct panel_drv_data *ddata = platform_get_drvdata(pdev); | 210 | struct panel_drv_data *ddata = platform_get_drvdata(pdev); |
| @@ -261,6 +236,9 @@ static int hdmic_probe(struct platform_device *pdev) | |||
| 261 | struct omap_dss_device *dssdev; | 236 | struct omap_dss_device *dssdev; |
| 262 | int r; | 237 | int r; |
| 263 | 238 | ||
| 239 | if (!pdev->dev.of_node) | ||
| 240 | return -ENODEV; | ||
| 241 | |||
| 264 | ddata = devm_kzalloc(&pdev->dev, sizeof(*ddata), GFP_KERNEL); | 242 | ddata = devm_kzalloc(&pdev->dev, sizeof(*ddata), GFP_KERNEL); |
| 265 | if (!ddata) | 243 | if (!ddata) |
| 266 | return -ENOMEM; | 244 | return -ENOMEM; |
| @@ -268,17 +246,9 @@ static int hdmic_probe(struct platform_device *pdev) | |||
| 268 | platform_set_drvdata(pdev, ddata); | 246 | platform_set_drvdata(pdev, ddata); |
| 269 | ddata->dev = &pdev->dev; | 247 | ddata->dev = &pdev->dev; |
| 270 | 248 | ||
| 271 | if (dev_get_platdata(&pdev->dev)) { | 249 | r = hdmic_probe_of(pdev); |
| 272 | r = hdmic_probe_pdata(pdev); | 250 | if (r) |
| 273 | if (r) | 251 | return r; |
| 274 | return r; | ||
| 275 | } else if (pdev->dev.of_node) { | ||
| 276 | r = hdmic_probe_of(pdev); | ||
| 277 | if (r) | ||
| 278 | return r; | ||
| 279 | } else { | ||
| 280 | return -ENODEV; | ||
| 281 | } | ||
| 282 | 252 | ||
| 283 | if (gpio_is_valid(ddata->hpd_gpio)) { | 253 | if (gpio_is_valid(ddata->hpd_gpio)) { |
| 284 | r = devm_gpio_request_one(&pdev->dev, ddata->hpd_gpio, | 254 | r = devm_gpio_request_one(&pdev->dev, ddata->hpd_gpio, |
diff --git a/drivers/video/fbdev/omap2/omapfb/displays/encoder-opa362.c b/drivers/video/fbdev/omap2/omapfb/displays/encoder-opa362.c index 8c246c213e06..a9a67167cc3d 100644 --- a/drivers/video/fbdev/omap2/omapfb/displays/encoder-opa362.c +++ b/drivers/video/fbdev/omap2/omapfb/displays/encoder-opa362.c | |||
| @@ -20,7 +20,7 @@ | |||
| 20 | #include <linux/slab.h> | 20 | #include <linux/slab.h> |
| 21 | #include <linux/of_gpio.h> | 21 | #include <linux/of_gpio.h> |
| 22 | 22 | ||
| 23 | #include <video/omapdss.h> | 23 | #include <video/omapfb_dss.h> |
| 24 | 24 | ||
| 25 | struct panel_drv_data { | 25 | struct panel_drv_data { |
| 26 | struct omap_dss_device dssdev; | 26 | struct omap_dss_device dssdev; |
diff --git a/drivers/video/fbdev/omap2/omapfb/displays/encoder-tfp410.c b/drivers/video/fbdev/omap2/omapfb/displays/encoder-tfp410.c index d9048b3df495..8c0953d069b7 100644 --- a/drivers/video/fbdev/omap2/omapfb/displays/encoder-tfp410.c +++ b/drivers/video/fbdev/omap2/omapfb/displays/encoder-tfp410.c | |||
| @@ -15,8 +15,7 @@ | |||
| 15 | #include <linux/slab.h> | 15 | #include <linux/slab.h> |
| 16 | #include <linux/of_gpio.h> | 16 | #include <linux/of_gpio.h> |
| 17 | 17 | ||
| 18 | #include <video/omapdss.h> | 18 | #include <video/omapfb_dss.h> |
| 19 | #include <video/omap-panel-data.h> | ||
| 20 | 19 | ||
| 21 | struct panel_drv_data { | 20 | struct panel_drv_data { |
| 22 | struct omap_dss_device dssdev; | 21 | struct omap_dss_device dssdev; |
| @@ -166,32 +165,6 @@ static const struct omapdss_dvi_ops tfp410_dvi_ops = { | |||
| 166 | .get_timings = tfp410_get_timings, | 165 | .get_timings = tfp410_get_timings, |
| 167 | }; | 166 | }; |
| 168 | 167 | ||
| 169 | static int tfp410_probe_pdata(struct platform_device *pdev) | ||
| 170 | { | ||
| 171 | struct panel_drv_data *ddata = platform_get_drvdata(pdev); | ||
| 172 | struct encoder_tfp410_platform_data *pdata; | ||
| 173 | struct omap_dss_device *dssdev, *in; | ||
| 174 | |||
| 175 | pdata = dev_get_platdata(&pdev->dev); | ||
| 176 | |||
| 177 | ddata->pd_gpio = pdata->power_down_gpio; | ||
| 178 | |||
| 179 | ddata->data_lines = pdata->data_lines; | ||
| 180 | |||
| 181 | in = omap_dss_find_output(pdata->source); | ||
| 182 | if (in == NULL) { | ||
| 183 | dev_err(&pdev->dev, "Failed to find video source\n"); | ||
| 184 | return -ENODEV; | ||
| 185 | } | ||
| 186 | |||
| 187 | ddata->in = in; | ||
| 188 | |||
| 189 | dssdev = &ddata->dssdev; | ||
| 190 | dssdev->name = pdata->name; | ||
| 191 | |||
| 192 | return 0; | ||
| 193 | } | ||
| 194 | |||
| 195 | static int tfp410_probe_of(struct platform_device *pdev) | 168 | static int tfp410_probe_of(struct platform_device *pdev) |
| 196 | { | 169 | { |
| 197 | struct panel_drv_data *ddata = platform_get_drvdata(pdev); | 170 | struct panel_drv_data *ddata = platform_get_drvdata(pdev); |
| @@ -225,23 +198,18 @@ static int tfp410_probe(struct platform_device *pdev) | |||
| 225 | struct omap_dss_device *dssdev; | 198 | struct omap_dss_device *dssdev; |
| 226 | int r; | 199 | int r; |
| 227 | 200 | ||
| 201 | if (!pdev->dev.of_node) | ||
| 202 | return -ENODEV; | ||
| 203 | |||
| 228 | ddata = devm_kzalloc(&pdev->dev, sizeof(*ddata), GFP_KERNEL); | 204 | ddata = devm_kzalloc(&pdev->dev, sizeof(*ddata), GFP_KERNEL); |
| 229 | if (!ddata) | 205 | if (!ddata) |
| 230 | return -ENOMEM; | 206 | return -ENOMEM; |
| 231 | 207 | ||
| 232 | platform_set_drvdata(pdev, ddata); | 208 | platform_set_drvdata(pdev, ddata); |
| 233 | 209 | ||
| 234 | if (dev_get_platdata(&pdev->dev)) { | 210 | r = tfp410_probe_of(pdev); |
| 235 | r = tfp410_probe_pdata(pdev); | 211 | if (r) |
| 236 | if (r) | 212 | return r; |
| 237 | return r; | ||
| 238 | } else if (pdev->dev.of_node) { | ||
| 239 | r = tfp410_probe_of(pdev); | ||
| 240 | if (r) | ||
| 241 | return r; | ||
| 242 | } else { | ||
| 243 | return -ENODEV; | ||
| 244 | } | ||
| 245 | 213 | ||
| 246 | if (gpio_is_valid(ddata->pd_gpio)) { | 214 | if (gpio_is_valid(ddata->pd_gpio)) { |
| 247 | r = devm_gpio_request_one(&pdev->dev, ddata->pd_gpio, | 215 | r = devm_gpio_request_one(&pdev->dev, ddata->pd_gpio, |
diff --git a/drivers/video/fbdev/omap2/omapfb/displays/encoder-tpd12s015.c b/drivers/video/fbdev/omap2/omapfb/displays/encoder-tpd12s015.c index 677e2545fcbe..80dc47347e21 100644 --- a/drivers/video/fbdev/omap2/omapfb/displays/encoder-tpd12s015.c +++ b/drivers/video/fbdev/omap2/omapfb/displays/encoder-tpd12s015.c | |||
| @@ -16,8 +16,7 @@ | |||
| 16 | #include <linux/platform_device.h> | 16 | #include <linux/platform_device.h> |
| 17 | #include <linux/gpio/consumer.h> | 17 | #include <linux/gpio/consumer.h> |
| 18 | 18 | ||
| 19 | #include <video/omapdss.h> | 19 | #include <video/omapfb_dss.h> |
| 20 | #include <video/omap-panel-data.h> | ||
| 21 | 20 | ||
| 22 | struct panel_drv_data { | 21 | struct panel_drv_data { |
| 23 | struct omap_dss_device dssdev; | 22 | struct omap_dss_device dssdev; |
diff --git a/drivers/video/fbdev/omap2/omapfb/displays/panel-dpi.c b/drivers/video/fbdev/omap2/omapfb/displays/panel-dpi.c index e780fd4f8b46..ace3d818afe5 100644 --- a/drivers/video/fbdev/omap2/omapfb/displays/panel-dpi.c +++ b/drivers/video/fbdev/omap2/omapfb/displays/panel-dpi.c | |||
| @@ -16,7 +16,7 @@ | |||
| 16 | #include <linux/of.h> | 16 | #include <linux/of.h> |
| 17 | #include <linux/of_gpio.h> | 17 | #include <linux/of_gpio.h> |
| 18 | 18 | ||
| 19 | #include <video/omapdss.h> | 19 | #include <video/omapfb_dss.h> |
| 20 | #include <video/omap-panel-data.h> | 20 | #include <video/omap-panel-data.h> |
| 21 | #include <video/of_display_timing.h> | 21 | #include <video/of_display_timing.h> |
| 22 | 22 | ||
diff --git a/drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.c b/drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.c index 3414c2609320..b58012b82b6f 100644 --- a/drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.c +++ b/drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.c | |||
| @@ -25,8 +25,7 @@ | |||
| 25 | #include <linux/of_device.h> | 25 | #include <linux/of_device.h> |
| 26 | #include <linux/of_gpio.h> | 26 | #include <linux/of_gpio.h> |
| 27 | 27 | ||
| 28 | #include <video/omapdss.h> | 28 | #include <video/omapfb_dss.h> |
| 29 | #include <video/omap-panel-data.h> | ||
| 30 | #include <video/mipi_display.h> | 29 | #include <video/mipi_display.h> |
| 31 | 30 | ||
| 32 | /* DSI Virtual channel. Hardcoded for now. */ | 31 | /* DSI Virtual channel. Hardcoded for now. */ |
| @@ -1127,40 +1126,6 @@ static struct omap_dss_driver dsicm_ops = { | |||
| 1127 | .memory_read = dsicm_memory_read, | 1126 | .memory_read = dsicm_memory_read, |
| 1128 | }; | 1127 | }; |
| 1129 | 1128 | ||
| 1130 | static int dsicm_probe_pdata(struct platform_device *pdev) | ||
| 1131 | { | ||
| 1132 | const struct panel_dsicm_platform_data *pdata; | ||
| 1133 | struct panel_drv_data *ddata = platform_get_drvdata(pdev); | ||
| 1134 | struct omap_dss_device *dssdev, *in; | ||
| 1135 | |||
| 1136 | pdata = dev_get_platdata(&pdev->dev); | ||
| 1137 | |||
| 1138 | in = omap_dss_find_output(pdata->source); | ||
| 1139 | if (in == NULL) { | ||
| 1140 | dev_err(&pdev->dev, "failed to find video source\n"); | ||
| 1141 | return -EPROBE_DEFER; | ||
| 1142 | } | ||
| 1143 | ddata->in = in; | ||
| 1144 | |||
| 1145 | ddata->reset_gpio = pdata->reset_gpio; | ||
| 1146 | |||
| 1147 | if (pdata->use_ext_te) | ||
| 1148 | ddata->ext_te_gpio = pdata->ext_te_gpio; | ||
| 1149 | else | ||
| 1150 | ddata->ext_te_gpio = -1; | ||
| 1151 | |||
| 1152 | ddata->ulps_timeout = pdata->ulps_timeout; | ||
| 1153 | |||
| 1154 | ddata->use_dsi_backlight = pdata->use_dsi_backlight; | ||
| 1155 | |||
| 1156 | ddata->pin_config = pdata->pin_config; | ||
| 1157 | |||
| 1158 | dssdev = &ddata->dssdev; | ||
| 1159 | dssdev->name = pdata->name; | ||
| 1160 | |||
| 1161 | return 0; | ||
| 1162 | } | ||
| 1163 | |||
| 1164 | static int dsicm_probe_of(struct platform_device *pdev) | 1129 | static int dsicm_probe_of(struct platform_device *pdev) |
| 1165 | { | 1130 | { |
| 1166 | struct device_node *node = pdev->dev.of_node; | 1131 | struct device_node *node = pdev->dev.of_node; |
| @@ -1207,6 +1172,9 @@ static int dsicm_probe(struct platform_device *pdev) | |||
| 1207 | 1172 | ||
| 1208 | dev_dbg(dev, "probe\n"); | 1173 | dev_dbg(dev, "probe\n"); |
| 1209 | 1174 | ||
| 1175 | if (!pdev->dev.of_node) | ||
| 1176 | return -ENODEV; | ||
| 1177 | |||
| 1210 | ddata = devm_kzalloc(dev, sizeof(*ddata), GFP_KERNEL); | 1178 | ddata = devm_kzalloc(dev, sizeof(*ddata), GFP_KERNEL); |
| 1211 | if (!ddata) | 1179 | if (!ddata) |
| 1212 | return -ENOMEM; | 1180 | return -ENOMEM; |
| @@ -1214,17 +1182,9 @@ static int dsicm_probe(struct platform_device *pdev) | |||
| 1214 | platform_set_drvdata(pdev, ddata); | 1182 | platform_set_drvdata(pdev, ddata); |
| 1215 | ddata->pdev = pdev; | 1183 | ddata->pdev = pdev; |
| 1216 | 1184 | ||
| 1217 | if (dev_get_platdata(dev)) { | 1185 | r = dsicm_probe_of(pdev); |
| 1218 | r = dsicm_probe_pdata(pdev); | 1186 | if (r) |
| 1219 | if (r) | 1187 | return r; |
| 1220 | return r; | ||
| 1221 | } else if (pdev->dev.of_node) { | ||
| 1222 | r = dsicm_probe_of(pdev); | ||
| 1223 | if (r) | ||
| 1224 | return r; | ||
| 1225 | } else { | ||
| 1226 | return -ENODEV; | ||
| 1227 | } | ||
| 1228 | 1188 | ||
| 1229 | ddata->timings.x_res = 864; | 1189 | ddata->timings.x_res = 864; |
| 1230 | ddata->timings.y_res = 480; | 1190 | ddata->timings.y_res = 480; |
diff --git a/drivers/video/fbdev/omap2/omapfb/displays/panel-lgphilips-lb035q02.c b/drivers/video/fbdev/omap2/omapfb/displays/panel-lgphilips-lb035q02.c index 18eb60e9c9ec..f14691ce8d02 100644 --- a/drivers/video/fbdev/omap2/omapfb/displays/panel-lgphilips-lb035q02.c +++ b/drivers/video/fbdev/omap2/omapfb/displays/panel-lgphilips-lb035q02.c | |||
| @@ -16,8 +16,7 @@ | |||
| 16 | #include <linux/mutex.h> | 16 | #include <linux/mutex.h> |
| 17 | #include <linux/gpio.h> | 17 | #include <linux/gpio.h> |
| 18 | 18 | ||
| 19 | #include <video/omapdss.h> | 19 | #include <video/omapfb_dss.h> |
| 20 | #include <video/omap-panel-data.h> | ||
| 21 | 20 | ||
| 22 | static struct omap_video_timings lb035q02_timings = { | 21 | static struct omap_video_timings lb035q02_timings = { |
| 23 | .x_res = 320, | 22 | .x_res = 320, |
| @@ -240,44 +239,6 @@ static struct omap_dss_driver lb035q02_ops = { | |||
| 240 | .get_resolution = omapdss_default_get_resolution, | 239 | .get_resolution = omapdss_default_get_resolution, |
| 241 | }; | 240 | }; |
| 242 | 241 | ||
| 243 | static int lb035q02_probe_pdata(struct spi_device *spi) | ||
| 244 | { | ||
| 245 | const struct panel_lb035q02_platform_data *pdata; | ||
| 246 | struct panel_drv_data *ddata = dev_get_drvdata(&spi->dev); | ||
| 247 | struct omap_dss_device *dssdev, *in; | ||
| 248 | int r; | ||
| 249 | |||
| 250 | pdata = dev_get_platdata(&spi->dev); | ||
| 251 | |||
| 252 | in = omap_dss_find_output(pdata->source); | ||
| 253 | if (in == NULL) { | ||
| 254 | dev_err(&spi->dev, "failed to find video source '%s'\n", | ||
| 255 | pdata->source); | ||
| 256 | return -EPROBE_DEFER; | ||
| 257 | } | ||
| 258 | |||
| 259 | ddata->in = in; | ||
| 260 | |||
| 261 | ddata->data_lines = pdata->data_lines; | ||
| 262 | |||
| 263 | dssdev = &ddata->dssdev; | ||
| 264 | dssdev->name = pdata->name; | ||
| 265 | |||
| 266 | r = devm_gpio_request_one(&spi->dev, pdata->enable_gpio, | ||
| 267 | GPIOF_OUT_INIT_LOW, "panel enable"); | ||
| 268 | if (r) | ||
| 269 | goto err_gpio; | ||
| 270 | |||
| 271 | ddata->enable_gpio = gpio_to_desc(pdata->enable_gpio); | ||
| 272 | |||
| 273 | ddata->backlight_gpio = pdata->backlight_gpio; | ||
| 274 | |||
| 275 | return 0; | ||
| 276 | err_gpio: | ||
| 277 | omap_dss_put_device(ddata->in); | ||
| 278 | return r; | ||
| 279 | } | ||
| 280 | |||
| 281 | static int lb035q02_probe_of(struct spi_device *spi) | 242 | static int lb035q02_probe_of(struct spi_device *spi) |
| 282 | { | 243 | { |
| 283 | struct device_node *node = spi->dev.of_node; | 244 | struct device_node *node = spi->dev.of_node; |
| @@ -312,6 +273,9 @@ static int lb035q02_panel_spi_probe(struct spi_device *spi) | |||
| 312 | struct omap_dss_device *dssdev; | 273 | struct omap_dss_device *dssdev; |
| 313 | int r; | 274 | int r; |
| 314 | 275 | ||
| 276 | if (!spi->dev.of_node) | ||
| 277 | return -ENODEV; | ||
| 278 | |||
| 315 | ddata = devm_kzalloc(&spi->dev, sizeof(*ddata), GFP_KERNEL); | 279 | ddata = devm_kzalloc(&spi->dev, sizeof(*ddata), GFP_KERNEL); |
| 316 | if (ddata == NULL) | 280 | if (ddata == NULL) |
| 317 | return -ENOMEM; | 281 | return -ENOMEM; |
| @@ -320,17 +284,9 @@ static int lb035q02_panel_spi_probe(struct spi_device *spi) | |||
| 320 | 284 | ||
| 321 | ddata->spi = spi; | 285 | ddata->spi = spi; |
| 322 | 286 | ||
| 323 | if (dev_get_platdata(&spi->dev)) { | 287 | r = lb035q02_probe_of(spi); |
| 324 | r = lb035q02_probe_pdata(spi); | 288 | if (r) |
| 325 | if (r) | 289 | return r; |
| 326 | return r; | ||
| 327 | } else if (spi->dev.of_node) { | ||
| 328 | r = lb035q02_probe_of(spi); | ||
| 329 | if (r) | ||
| 330 | return r; | ||
| 331 | } else { | ||
| 332 | return -ENODEV; | ||
| 333 | } | ||
| 334 | 290 | ||
| 335 | if (gpio_is_valid(ddata->backlight_gpio)) { | 291 | if (gpio_is_valid(ddata->backlight_gpio)) { |
| 336 | r = devm_gpio_request_one(&spi->dev, ddata->backlight_gpio, | 292 | r = devm_gpio_request_one(&spi->dev, ddata->backlight_gpio, |
diff --git a/drivers/video/fbdev/omap2/omapfb/displays/panel-nec-nl8048hl11.c b/drivers/video/fbdev/omap2/omapfb/displays/panel-nec-nl8048hl11.c index 8a928c9a2fc9..a2cbadd3eca3 100644 --- a/drivers/video/fbdev/omap2/omapfb/displays/panel-nec-nl8048hl11.c +++ b/drivers/video/fbdev/omap2/omapfb/displays/panel-nec-nl8048hl11.c | |||
| @@ -18,8 +18,7 @@ | |||
| 18 | #include <linux/gpio.h> | 18 | #include <linux/gpio.h> |
| 19 | #include <linux/of_gpio.h> | 19 | #include <linux/of_gpio.h> |
| 20 | 20 | ||
| 21 | #include <video/omapdss.h> | 21 | #include <video/omapfb_dss.h> |
| 22 | #include <video/omap-panel-data.h> | ||
| 23 | 22 | ||
| 24 | struct panel_drv_data { | 23 | struct panel_drv_data { |
| 25 | struct omap_dss_device dssdev; | 24 | struct omap_dss_device dssdev; |
| @@ -233,33 +232,6 @@ static struct omap_dss_driver nec_8048_ops = { | |||
| 233 | }; | 232 | }; |
| 234 | 233 | ||
| 235 | 234 | ||
| 236 | static int nec_8048_probe_pdata(struct spi_device *spi) | ||
| 237 | { | ||
| 238 | const struct panel_nec_nl8048hl11_platform_data *pdata; | ||
| 239 | struct panel_drv_data *ddata = dev_get_drvdata(&spi->dev); | ||
| 240 | struct omap_dss_device *dssdev, *in; | ||
| 241 | |||
| 242 | pdata = dev_get_platdata(&spi->dev); | ||
| 243 | |||
| 244 | ddata->qvga_gpio = pdata->qvga_gpio; | ||
| 245 | ddata->res_gpio = pdata->res_gpio; | ||
| 246 | |||
| 247 | in = omap_dss_find_output(pdata->source); | ||
| 248 | if (in == NULL) { | ||
| 249 | dev_err(&spi->dev, "failed to find video source '%s'\n", | ||
| 250 | pdata->source); | ||
| 251 | return -EPROBE_DEFER; | ||
| 252 | } | ||
| 253 | ddata->in = in; | ||
| 254 | |||
| 255 | ddata->data_lines = pdata->data_lines; | ||
| 256 | |||
| 257 | dssdev = &ddata->dssdev; | ||
| 258 | dssdev->name = pdata->name; | ||
| 259 | |||
| 260 | return 0; | ||
| 261 | } | ||
| 262 | |||
| 263 | static int nec_8048_probe_of(struct spi_device *spi) | 235 | static int nec_8048_probe_of(struct spi_device *spi) |
| 264 | { | 236 | { |
| 265 | struct device_node *node = spi->dev.of_node; | 237 | struct device_node *node = spi->dev.of_node; |
| @@ -296,6 +268,9 @@ static int nec_8048_probe(struct spi_device *spi) | |||
| 296 | 268 | ||
| 297 | dev_dbg(&spi->dev, "%s\n", __func__); | 269 | dev_dbg(&spi->dev, "%s\n", __func__); |
| 298 | 270 | ||
| 271 | if (!spi->dev.of_node) | ||
| 272 | return -ENODEV; | ||
| 273 | |||
| 299 | spi->mode = SPI_MODE_0; | 274 | spi->mode = SPI_MODE_0; |
| 300 | spi->bits_per_word = 32; | 275 | spi->bits_per_word = 32; |
| 301 | 276 | ||
| @@ -315,17 +290,9 @@ static int nec_8048_probe(struct spi_device *spi) | |||
| 315 | 290 | ||
| 316 | ddata->spi = spi; | 291 | ddata->spi = spi; |
| 317 | 292 | ||
| 318 | if (dev_get_platdata(&spi->dev)) { | 293 | r = nec_8048_probe_of(spi); |
| 319 | r = nec_8048_probe_pdata(spi); | 294 | if (r) |
| 320 | if (r) | 295 | return r; |
| 321 | return r; | ||
| 322 | } else if (spi->dev.of_node) { | ||
| 323 | r = nec_8048_probe_of(spi); | ||
| 324 | if (r) | ||
| 325 | return r; | ||
| 326 | } else { | ||
| 327 | return -ENODEV; | ||
| 328 | } | ||
| 329 | 296 | ||
| 330 | if (gpio_is_valid(ddata->qvga_gpio)) { | 297 | if (gpio_is_valid(ddata->qvga_gpio)) { |
| 331 | r = devm_gpio_request_one(&spi->dev, ddata->qvga_gpio, | 298 | r = devm_gpio_request_one(&spi->dev, ddata->qvga_gpio, |
diff --git a/drivers/video/fbdev/omap2/omapfb/displays/panel-sharp-ls037v7dw01.c b/drivers/video/fbdev/omap2/omapfb/displays/panel-sharp-ls037v7dw01.c index 1954ec913ce5..a8be18a87fa0 100644 --- a/drivers/video/fbdev/omap2/omapfb/displays/panel-sharp-ls037v7dw01.c +++ b/drivers/video/fbdev/omap2/omapfb/displays/panel-sharp-ls037v7dw01.c | |||
| @@ -17,8 +17,7 @@ | |||
| 17 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
| 18 | #include <linux/slab.h> | 18 | #include <linux/slab.h> |
| 19 | #include <linux/regulator/consumer.h> | 19 | #include <linux/regulator/consumer.h> |
| 20 | #include <video/omapdss.h> | 20 | #include <video/omapfb_dss.h> |
| 21 | #include <video/omap-panel-data.h> | ||
| 22 | 21 | ||
| 23 | struct panel_drv_data { | 22 | struct panel_drv_data { |
| 24 | struct omap_dss_device dssdev; | 23 | struct omap_dss_device dssdev; |
| @@ -197,69 +196,6 @@ static struct omap_dss_driver sharp_ls_ops = { | |||
| 197 | .get_resolution = omapdss_default_get_resolution, | 196 | .get_resolution = omapdss_default_get_resolution, |
| 198 | }; | 197 | }; |
| 199 | 198 | ||
| 200 | static int sharp_ls_get_gpio(struct device *dev, int gpio, unsigned long flags, | ||
| 201 | char *desc, struct gpio_desc **gpiod) | ||
| 202 | { | ||
| 203 | int r; | ||
| 204 | |||
| 205 | r = devm_gpio_request_one(dev, gpio, flags, desc); | ||
| 206 | if (r) { | ||
| 207 | *gpiod = NULL; | ||
| 208 | return r == -ENOENT ? 0 : r; | ||
| 209 | } | ||
| 210 | |||
| 211 | *gpiod = gpio_to_desc(gpio); | ||
| 212 | |||
| 213 | return 0; | ||
| 214 | } | ||
| 215 | |||
| 216 | static int sharp_ls_probe_pdata(struct platform_device *pdev) | ||
| 217 | { | ||
| 218 | const struct panel_sharp_ls037v7dw01_platform_data *pdata; | ||
| 219 | struct panel_drv_data *ddata = platform_get_drvdata(pdev); | ||
| 220 | struct omap_dss_device *dssdev, *in; | ||
| 221 | int r; | ||
| 222 | |||
| 223 | pdata = dev_get_platdata(&pdev->dev); | ||
| 224 | |||
| 225 | in = omap_dss_find_output(pdata->source); | ||
| 226 | if (in == NULL) { | ||
| 227 | dev_err(&pdev->dev, "failed to find video source '%s'\n", | ||
| 228 | pdata->source); | ||
| 229 | return -EPROBE_DEFER; | ||
| 230 | } | ||
| 231 | |||
| 232 | ddata->in = in; | ||
| 233 | |||
| 234 | ddata->data_lines = pdata->data_lines; | ||
| 235 | |||
| 236 | dssdev = &ddata->dssdev; | ||
| 237 | dssdev->name = pdata->name; | ||
| 238 | |||
| 239 | r = sharp_ls_get_gpio(&pdev->dev, pdata->mo_gpio, GPIOF_OUT_INIT_LOW, | ||
| 240 | "lcd MO", &ddata->mo_gpio); | ||
| 241 | if (r) | ||
| 242 | return r; | ||
| 243 | r = sharp_ls_get_gpio(&pdev->dev, pdata->lr_gpio, GPIOF_OUT_INIT_HIGH, | ||
| 244 | "lcd LR", &ddata->lr_gpio); | ||
| 245 | if (r) | ||
| 246 | return r; | ||
| 247 | r = sharp_ls_get_gpio(&pdev->dev, pdata->ud_gpio, GPIOF_OUT_INIT_HIGH, | ||
| 248 | "lcd UD", &ddata->ud_gpio); | ||
| 249 | if (r) | ||
| 250 | return r; | ||
| 251 | r = sharp_ls_get_gpio(&pdev->dev, pdata->resb_gpio, GPIOF_OUT_INIT_LOW, | ||
| 252 | "lcd RESB", &ddata->resb_gpio); | ||
| 253 | if (r) | ||
| 254 | return r; | ||
| 255 | r = sharp_ls_get_gpio(&pdev->dev, pdata->ini_gpio, GPIOF_OUT_INIT_LOW, | ||
| 256 | "lcd INI", &ddata->ini_gpio); | ||
| 257 | if (r) | ||
| 258 | return r; | ||
| 259 | |||
| 260 | return 0; | ||
| 261 | } | ||
| 262 | |||
| 263 | static int sharp_ls_get_gpio_of(struct device *dev, int index, int val, | 199 | static int sharp_ls_get_gpio_of(struct device *dev, int index, int val, |
| 264 | const char *desc, struct gpio_desc **gpiod) | 200 | const char *desc, struct gpio_desc **gpiod) |
| 265 | { | 201 | { |
| @@ -330,23 +266,18 @@ static int sharp_ls_probe(struct platform_device *pdev) | |||
| 330 | struct omap_dss_device *dssdev; | 266 | struct omap_dss_device *dssdev; |
| 331 | int r; | 267 | int r; |
| 332 | 268 | ||
| 269 | if (!pdev->dev.of_node) | ||
| 270 | return -ENODEV; | ||
| 271 | |||
| 333 | ddata = devm_kzalloc(&pdev->dev, sizeof(*ddata), GFP_KERNEL); | 272 | ddata = devm_kzalloc(&pdev->dev, sizeof(*ddata), GFP_KERNEL); |
| 334 | if (ddata == NULL) | 273 | if (ddata == NULL) |
| 335 | return -ENOMEM; | 274 | return -ENOMEM; |
| 336 | 275 | ||
| 337 | platform_set_drvdata(pdev, ddata); | 276 | platform_set_drvdata(pdev, ddata); |
| 338 | 277 | ||
| 339 | if (dev_get_platdata(&pdev->dev)) { | 278 | r = sharp_ls_probe_of(pdev); |
| 340 | r = sharp_ls_probe_pdata(pdev); | 279 | if (r) |
| 341 | if (r) | 280 | return r; |
| 342 | return r; | ||
| 343 | } else if (pdev->dev.of_node) { | ||
| 344 | r = sharp_ls_probe_of(pdev); | ||
| 345 | if (r) | ||
| 346 | return r; | ||
| 347 | } else { | ||
| 348 | return -ENODEV; | ||
| 349 | } | ||
| 350 | 281 | ||
| 351 | ddata->videomode = sharp_ls_timings; | 282 | ddata->videomode = sharp_ls_timings; |
| 352 | 283 | ||
diff --git a/drivers/video/fbdev/omap2/omapfb/displays/panel-sony-acx565akm.c b/drivers/video/fbdev/omap2/omapfb/displays/panel-sony-acx565akm.c index 31efcca801bd..468560a6daae 100644 --- a/drivers/video/fbdev/omap2/omapfb/displays/panel-sony-acx565akm.c +++ b/drivers/video/fbdev/omap2/omapfb/displays/panel-sony-acx565akm.c | |||
| @@ -33,7 +33,7 @@ | |||
| 33 | #include <linux/of.h> | 33 | #include <linux/of.h> |
| 34 | #include <linux/of_gpio.h> | 34 | #include <linux/of_gpio.h> |
| 35 | 35 | ||
| 36 | #include <video/omapdss.h> | 36 | #include <video/omapfb_dss.h> |
| 37 | #include <video/omap-panel-data.h> | 37 | #include <video/omap-panel-data.h> |
| 38 | 38 | ||
| 39 | #define MIPID_CMD_READ_DISP_ID 0x04 | 39 | #define MIPID_CMD_READ_DISP_ID 0x04 |
diff --git a/drivers/video/fbdev/omap2/omapfb/displays/panel-tpo-td028ttec1.c b/drivers/video/fbdev/omap2/omapfb/displays/panel-tpo-td028ttec1.c index 4d657f3ab679..b529a8c2b652 100644 --- a/drivers/video/fbdev/omap2/omapfb/displays/panel-tpo-td028ttec1.c +++ b/drivers/video/fbdev/omap2/omapfb/displays/panel-tpo-td028ttec1.c | |||
| @@ -28,8 +28,7 @@ | |||
| 28 | #include <linux/delay.h> | 28 | #include <linux/delay.h> |
| 29 | #include <linux/spi/spi.h> | 29 | #include <linux/spi/spi.h> |
| 30 | #include <linux/gpio.h> | 30 | #include <linux/gpio.h> |
| 31 | #include <video/omapdss.h> | 31 | #include <video/omapfb_dss.h> |
| 32 | #include <video/omap-panel-data.h> | ||
| 33 | 32 | ||
| 34 | struct panel_drv_data { | 33 | struct panel_drv_data { |
| 35 | struct omap_dss_device dssdev; | 34 | struct omap_dss_device dssdev; |
| @@ -365,31 +364,6 @@ static struct omap_dss_driver td028ttec1_ops = { | |||
| 365 | .check_timings = td028ttec1_panel_check_timings, | 364 | .check_timings = td028ttec1_panel_check_timings, |
| 366 | }; | 365 | }; |
| 367 | 366 | ||
| 368 | static int td028ttec1_panel_probe_pdata(struct spi_device *spi) | ||
| 369 | { | ||
| 370 | const struct panel_tpo_td028ttec1_platform_data *pdata; | ||
| 371 | struct panel_drv_data *ddata = dev_get_drvdata(&spi->dev); | ||
| 372 | struct omap_dss_device *dssdev, *in; | ||
| 373 | |||
| 374 | pdata = dev_get_platdata(&spi->dev); | ||
| 375 | |||
| 376 | in = omap_dss_find_output(pdata->source); | ||
| 377 | if (in == NULL) { | ||
| 378 | dev_err(&spi->dev, "failed to find video source '%s'\n", | ||
| 379 | pdata->source); | ||
| 380 | return -EPROBE_DEFER; | ||
| 381 | } | ||
| 382 | |||
| 383 | ddata->in = in; | ||
| 384 | |||
| 385 | ddata->data_lines = pdata->data_lines; | ||
| 386 | |||
| 387 | dssdev = &ddata->dssdev; | ||
| 388 | dssdev->name = pdata->name; | ||
| 389 | |||
| 390 | return 0; | ||
| 391 | } | ||
| 392 | |||
| 393 | static int td028ttec1_probe_of(struct spi_device *spi) | 367 | static int td028ttec1_probe_of(struct spi_device *spi) |
| 394 | { | 368 | { |
| 395 | struct device_node *node = spi->dev.of_node; | 369 | struct device_node *node = spi->dev.of_node; |
| @@ -415,6 +389,9 @@ static int td028ttec1_panel_probe(struct spi_device *spi) | |||
| 415 | 389 | ||
| 416 | dev_dbg(&spi->dev, "%s\n", __func__); | 390 | dev_dbg(&spi->dev, "%s\n", __func__); |
| 417 | 391 | ||
| 392 | if (!spi->dev.of_node) | ||
| 393 | return -ENODEV; | ||
| 394 | |||
| 418 | spi->bits_per_word = 9; | 395 | spi->bits_per_word = 9; |
| 419 | spi->mode = SPI_MODE_3; | 396 | spi->mode = SPI_MODE_3; |
| 420 | 397 | ||
| @@ -432,17 +409,9 @@ static int td028ttec1_panel_probe(struct spi_device *spi) | |||
| 432 | 409 | ||
| 433 | ddata->spi_dev = spi; | 410 | ddata->spi_dev = spi; |
| 434 | 411 | ||
| 435 | if (dev_get_platdata(&spi->dev)) { | 412 | r = td028ttec1_probe_of(spi); |
| 436 | r = td028ttec1_panel_probe_pdata(spi); | 413 | if (r) |
| 437 | if (r) | 414 | return r; |
| 438 | return r; | ||
| 439 | } else if (spi->dev.of_node) { | ||
| 440 | r = td028ttec1_probe_of(spi); | ||
| 441 | if (r) | ||
| 442 | return r; | ||
| 443 | } else { | ||
| 444 | return -ENODEV; | ||
| 445 | } | ||
| 446 | 415 | ||
| 447 | ddata->videomode = td028ttec1_panel_timings; | 416 | ddata->videomode = td028ttec1_panel_timings; |
| 448 | 417 | ||
diff --git a/drivers/video/fbdev/omap2/omapfb/displays/panel-tpo-td043mtea1.c b/drivers/video/fbdev/omap2/omapfb/displays/panel-tpo-td043mtea1.c index 68e3b68a2920..51e628b85f4a 100644 --- a/drivers/video/fbdev/omap2/omapfb/displays/panel-tpo-td043mtea1.c +++ b/drivers/video/fbdev/omap2/omapfb/displays/panel-tpo-td043mtea1.c | |||
| @@ -19,8 +19,7 @@ | |||
| 19 | #include <linux/slab.h> | 19 | #include <linux/slab.h> |
| 20 | #include <linux/of_gpio.h> | 20 | #include <linux/of_gpio.h> |
| 21 | 21 | ||
| 22 | #include <video/omapdss.h> | 22 | #include <video/omapfb_dss.h> |
| 23 | #include <video/omap-panel-data.h> | ||
| 24 | 23 | ||
| 25 | #define TPO_R02_MODE(x) ((x) & 7) | 24 | #define TPO_R02_MODE(x) ((x) & 7) |
| 26 | #define TPO_R02_MODE_800x480 7 | 25 | #define TPO_R02_MODE_800x480 7 |
| @@ -465,32 +464,6 @@ static struct omap_dss_driver tpo_td043_ops = { | |||
| 465 | }; | 464 | }; |
| 466 | 465 | ||
| 467 | 466 | ||
| 468 | static int tpo_td043_probe_pdata(struct spi_device *spi) | ||
| 469 | { | ||
| 470 | const struct panel_tpo_td043mtea1_platform_data *pdata; | ||
| 471 | struct panel_drv_data *ddata = dev_get_drvdata(&spi->dev); | ||
| 472 | struct omap_dss_device *dssdev, *in; | ||
| 473 | |||
| 474 | pdata = dev_get_platdata(&spi->dev); | ||
| 475 | |||
| 476 | ddata->nreset_gpio = pdata->nreset_gpio; | ||
| 477 | |||
| 478 | in = omap_dss_find_output(pdata->source); | ||
| 479 | if (in == NULL) { | ||
| 480 | dev_err(&spi->dev, "failed to find video source '%s'\n", | ||
| 481 | pdata->source); | ||
| 482 | return -EPROBE_DEFER; | ||
| 483 | } | ||
| 484 | ddata->in = in; | ||
| 485 | |||
| 486 | ddata->data_lines = pdata->data_lines; | ||
| 487 | |||
| 488 | dssdev = &ddata->dssdev; | ||
| 489 | dssdev->name = pdata->name; | ||
| 490 | |||
| 491 | return 0; | ||
| 492 | } | ||
| 493 | |||
| 494 | static int tpo_td043_probe_of(struct spi_device *spi) | 467 | static int tpo_td043_probe_of(struct spi_device *spi) |
| 495 | { | 468 | { |
| 496 | struct device_node *node = spi->dev.of_node; | 469 | struct device_node *node = spi->dev.of_node; |
| @@ -524,6 +497,9 @@ static int tpo_td043_probe(struct spi_device *spi) | |||
| 524 | 497 | ||
| 525 | dev_dbg(&spi->dev, "%s\n", __func__); | 498 | dev_dbg(&spi->dev, "%s\n", __func__); |
| 526 | 499 | ||
| 500 | if (!spi->dev.of_node) | ||
| 501 | return -ENODEV; | ||
| 502 | |||
| 527 | spi->bits_per_word = 16; | 503 | spi->bits_per_word = 16; |
| 528 | spi->mode = SPI_MODE_0; | 504 | spi->mode = SPI_MODE_0; |
| 529 | 505 | ||
| @@ -541,17 +517,9 @@ static int tpo_td043_probe(struct spi_device *spi) | |||
| 541 | 517 | ||
| 542 | ddata->spi = spi; | 518 | ddata->spi = spi; |
| 543 | 519 | ||
| 544 | if (dev_get_platdata(&spi->dev)) { | 520 | r = tpo_td043_probe_of(spi); |
| 545 | r = tpo_td043_probe_pdata(spi); | 521 | if (r) |
| 546 | if (r) | 522 | return r; |
| 547 | return r; | ||
| 548 | } else if (spi->dev.of_node) { | ||
| 549 | r = tpo_td043_probe_of(spi); | ||
| 550 | if (r) | ||
| 551 | return r; | ||
| 552 | } else { | ||
| 553 | return -ENODEV; | ||
| 554 | } | ||
| 555 | 523 | ||
| 556 | ddata->mode = TPO_R02_MODE_800x480; | 524 | ddata->mode = TPO_R02_MODE_800x480; |
| 557 | memcpy(ddata->gamma, tpo_td043_def_gamma, sizeof(ddata->gamma)); | 525 | memcpy(ddata->gamma, tpo_td043_def_gamma, sizeof(ddata->gamma)); |
diff --git a/drivers/video/fbdev/omap2/omapfb/dss/apply.c b/drivers/video/fbdev/omap2/omapfb/dss/apply.c index 663ccc3bf4e5..2481f4871f66 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/apply.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/apply.c | |||
| @@ -23,7 +23,7 @@ | |||
| 23 | #include <linux/spinlock.h> | 23 | #include <linux/spinlock.h> |
| 24 | #include <linux/jiffies.h> | 24 | #include <linux/jiffies.h> |
| 25 | 25 | ||
| 26 | #include <video/omapdss.h> | 26 | #include <video/omapfb_dss.h> |
| 27 | 27 | ||
| 28 | #include "dss.h" | 28 | #include "dss.h" |
| 29 | #include "dss_features.h" | 29 | #include "dss_features.h" |
diff --git a/drivers/video/fbdev/omap2/omapfb/dss/core.c b/drivers/video/fbdev/omap2/omapfb/dss/core.c index 5a87179b7312..29de4827589d 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/core.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/core.c | |||
| @@ -35,7 +35,7 @@ | |||
| 35 | #include <linux/suspend.h> | 35 | #include <linux/suspend.h> |
| 36 | #include <linux/slab.h> | 36 | #include <linux/slab.h> |
| 37 | 37 | ||
| 38 | #include <video/omapdss.h> | 38 | #include <video/omapfb_dss.h> |
| 39 | 39 | ||
| 40 | #include "dss.h" | 40 | #include "dss.h" |
| 41 | #include "dss_features.h" | 41 | #include "dss_features.h" |
| @@ -208,8 +208,6 @@ static int __init omap_dss_probe(struct platform_device *pdev) | |||
| 208 | core.default_display_name = def_disp_name; | 208 | core.default_display_name = def_disp_name; |
| 209 | else if (pdata->default_display_name) | 209 | else if (pdata->default_display_name) |
| 210 | core.default_display_name = pdata->default_display_name; | 210 | core.default_display_name = pdata->default_display_name; |
| 211 | else if (pdata->default_device) | ||
| 212 | core.default_display_name = pdata->default_device->name; | ||
| 213 | 211 | ||
| 214 | register_pm_notifier(&omap_dss_pm_notif_block); | 212 | register_pm_notifier(&omap_dss_pm_notif_block); |
| 215 | 213 | ||
diff --git a/drivers/video/fbdev/omap2/omapfb/dss/dispc-compat.c b/drivers/video/fbdev/omap2/omapfb/dss/dispc-compat.c index 6607db37a5e4..3691bde4ce0a 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/dispc-compat.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/dispc-compat.c | |||
| @@ -26,7 +26,7 @@ | |||
| 26 | #include <linux/interrupt.h> | 26 | #include <linux/interrupt.h> |
| 27 | #include <linux/seq_file.h> | 27 | #include <linux/seq_file.h> |
| 28 | 28 | ||
| 29 | #include <video/omapdss.h> | 29 | #include <video/omapfb_dss.h> |
| 30 | 30 | ||
| 31 | #include "dss.h" | 31 | #include "dss.h" |
| 32 | #include "dss_features.h" | 32 | #include "dss_features.h" |
diff --git a/drivers/video/fbdev/omap2/omapfb/dss/dispc.c b/drivers/video/fbdev/omap2/omapfb/dss/dispc.c index 5491e304f4fe..7a75dfda9845 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/dispc.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/dispc.c | |||
| @@ -41,7 +41,7 @@ | |||
| 41 | #include <linux/of.h> | 41 | #include <linux/of.h> |
| 42 | #include <linux/component.h> | 42 | #include <linux/component.h> |
| 43 | 43 | ||
| 44 | #include <video/omapdss.h> | 44 | #include <video/omapfb_dss.h> |
| 45 | 45 | ||
| 46 | #include "dss.h" | 46 | #include "dss.h" |
| 47 | #include "dss_features.h" | 47 | #include "dss_features.h" |
diff --git a/drivers/video/fbdev/omap2/omapfb/dss/dispc_coefs.c b/drivers/video/fbdev/omap2/omapfb/dss/dispc_coefs.c index 038c15b04215..59c9a5c47ca9 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/dispc_coefs.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/dispc_coefs.c | |||
| @@ -18,7 +18,7 @@ | |||
| 18 | */ | 18 | */ |
| 19 | 19 | ||
| 20 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
| 21 | #include <video/omapdss.h> | 21 | #include <video/omapfb_dss.h> |
| 22 | 22 | ||
| 23 | #include "dispc.h" | 23 | #include "dispc.h" |
| 24 | 24 | ||
diff --git a/drivers/video/fbdev/omap2/omapfb/dss/display-sysfs.c b/drivers/video/fbdev/omap2/omapfb/dss/display-sysfs.c index 75b5286029ee..b3fdbfd0b82d 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/display-sysfs.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/display-sysfs.c | |||
| @@ -25,7 +25,7 @@ | |||
| 25 | #include <linux/platform_device.h> | 25 | #include <linux/platform_device.h> |
| 26 | #include <linux/sysfs.h> | 26 | #include <linux/sysfs.h> |
| 27 | 27 | ||
| 28 | #include <video/omapdss.h> | 28 | #include <video/omapfb_dss.h> |
| 29 | #include "dss.h" | 29 | #include "dss.h" |
| 30 | 30 | ||
| 31 | static ssize_t display_name_show(struct omap_dss_device *dssdev, char *buf) | 31 | static ssize_t display_name_show(struct omap_dss_device *dssdev, char *buf) |
diff --git a/drivers/video/fbdev/omap2/omapfb/dss/display.c b/drivers/video/fbdev/omap2/omapfb/dss/display.c index ef5b9027985d..dd5468695c43 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/display.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/display.c | |||
| @@ -28,7 +28,7 @@ | |||
| 28 | #include <linux/platform_device.h> | 28 | #include <linux/platform_device.h> |
| 29 | #include <linux/of.h> | 29 | #include <linux/of.h> |
| 30 | 30 | ||
| 31 | #include <video/omapdss.h> | 31 | #include <video/omapfb_dss.h> |
| 32 | #include "dss.h" | 32 | #include "dss.h" |
| 33 | #include "dss_features.h" | 33 | #include "dss_features.h" |
| 34 | 34 | ||
diff --git a/drivers/video/fbdev/omap2/omapfb/dss/dpi.c b/drivers/video/fbdev/omap2/omapfb/dss/dpi.c index 7953e6a52346..da09806b940c 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/dpi.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/dpi.c | |||
| @@ -34,7 +34,7 @@ | |||
| 34 | #include <linux/clk.h> | 34 | #include <linux/clk.h> |
| 35 | #include <linux/component.h> | 35 | #include <linux/component.h> |
| 36 | 36 | ||
| 37 | #include <video/omapdss.h> | 37 | #include <video/omapfb_dss.h> |
| 38 | 38 | ||
| 39 | #include "dss.h" | 39 | #include "dss.h" |
| 40 | #include "dss_features.h" | 40 | #include "dss_features.h" |
diff --git a/drivers/video/fbdev/omap2/omapfb/dss/dsi.c b/drivers/video/fbdev/omap2/omapfb/dss/dsi.c index d63e59807707..9e4800a4e3d1 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/dsi.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/dsi.c | |||
| @@ -42,7 +42,7 @@ | |||
| 42 | #include <linux/of_platform.h> | 42 | #include <linux/of_platform.h> |
| 43 | #include <linux/component.h> | 43 | #include <linux/component.h> |
| 44 | 44 | ||
| 45 | #include <video/omapdss.h> | 45 | #include <video/omapfb_dss.h> |
| 46 | #include <video/mipi_display.h> | 46 | #include <video/mipi_display.h> |
| 47 | 47 | ||
| 48 | #include "dss.h" | 48 | #include "dss.h" |
diff --git a/drivers/video/fbdev/omap2/omapfb/dss/dss-of.c b/drivers/video/fbdev/omap2/omapfb/dss/dss-of.c index bf407b6ba15c..d356a252ab4a 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/dss-of.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/dss-of.c | |||
| @@ -18,7 +18,7 @@ | |||
| 18 | #include <linux/of.h> | 18 | #include <linux/of.h> |
| 19 | #include <linux/seq_file.h> | 19 | #include <linux/seq_file.h> |
| 20 | 20 | ||
| 21 | #include <video/omapdss.h> | 21 | #include <video/omapfb_dss.h> |
| 22 | 22 | ||
| 23 | #include "dss.h" | 23 | #include "dss.h" |
| 24 | 24 | ||
diff --git a/drivers/video/fbdev/omap2/omapfb/dss/dss.c b/drivers/video/fbdev/omap2/omapfb/dss/dss.c index 0078c4d1fc31..47d7f69ad9ad 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/dss.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/dss.c | |||
| @@ -41,7 +41,7 @@ | |||
| 41 | #include <linux/suspend.h> | 41 | #include <linux/suspend.h> |
| 42 | #include <linux/component.h> | 42 | #include <linux/component.h> |
| 43 | 43 | ||
| 44 | #include <video/omapdss.h> | 44 | #include <video/omapfb_dss.h> |
| 45 | 45 | ||
| 46 | #include "dss.h" | 46 | #include "dss.h" |
| 47 | #include "dss_features.h" | 47 | #include "dss_features.h" |
diff --git a/drivers/video/fbdev/omap2/omapfb/dss/dss_features.c b/drivers/video/fbdev/omap2/omapfb/dss/dss_features.c index c886a2927f73..8fc843b56b26 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/dss_features.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/dss_features.c | |||
| @@ -23,7 +23,7 @@ | |||
| 23 | #include <linux/err.h> | 23 | #include <linux/err.h> |
| 24 | #include <linux/slab.h> | 24 | #include <linux/slab.h> |
| 25 | 25 | ||
| 26 | #include <video/omapdss.h> | 26 | #include <video/omapfb_dss.h> |
| 27 | 27 | ||
| 28 | #include "dss.h" | 28 | #include "dss.h" |
| 29 | #include "dss_features.h" | 29 | #include "dss_features.h" |
diff --git a/drivers/video/fbdev/omap2/omapfb/dss/hdmi.h b/drivers/video/fbdev/omap2/omapfb/dss/hdmi.h index 53616b02b613..f6de87e078b0 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/hdmi.h +++ b/drivers/video/fbdev/omap2/omapfb/dss/hdmi.h | |||
| @@ -23,7 +23,8 @@ | |||
| 23 | #include <linux/io.h> | 23 | #include <linux/io.h> |
| 24 | #include <linux/platform_device.h> | 24 | #include <linux/platform_device.h> |
| 25 | #include <linux/hdmi.h> | 25 | #include <linux/hdmi.h> |
| 26 | #include <video/omapdss.h> | 26 | #include <video/omapfb_dss.h> |
| 27 | #include <sound/omap-hdmi-audio.h> | ||
| 27 | 28 | ||
| 28 | #include "dss.h" | 29 | #include "dss.h" |
| 29 | 30 | ||
diff --git a/drivers/video/fbdev/omap2/omapfb/dss/hdmi4.c b/drivers/video/fbdev/omap2/omapfb/dss/hdmi4.c index 2e71aec838b1..926a6f20dbb2 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/hdmi4.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/hdmi4.c | |||
| @@ -33,7 +33,7 @@ | |||
| 33 | #include <linux/gpio.h> | 33 | #include <linux/gpio.h> |
| 34 | #include <linux/regulator/consumer.h> | 34 | #include <linux/regulator/consumer.h> |
| 35 | #include <linux/component.h> | 35 | #include <linux/component.h> |
| 36 | #include <video/omapdss.h> | 36 | #include <video/omapfb_dss.h> |
| 37 | #include <sound/omap-hdmi-audio.h> | 37 | #include <sound/omap-hdmi-audio.h> |
| 38 | 38 | ||
| 39 | #include "hdmi4_core.h" | 39 | #include "hdmi4_core.h" |
diff --git a/drivers/video/fbdev/omap2/omapfb/dss/hdmi5.c b/drivers/video/fbdev/omap2/omapfb/dss/hdmi5.c index aade6d99662a..0ee829a165c3 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/hdmi5.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/hdmi5.c | |||
| @@ -38,7 +38,7 @@ | |||
| 38 | #include <linux/gpio.h> | 38 | #include <linux/gpio.h> |
| 39 | #include <linux/regulator/consumer.h> | 39 | #include <linux/regulator/consumer.h> |
| 40 | #include <linux/component.h> | 40 | #include <linux/component.h> |
| 41 | #include <video/omapdss.h> | 41 | #include <video/omapfb_dss.h> |
| 42 | #include <sound/omap-hdmi-audio.h> | 42 | #include <sound/omap-hdmi-audio.h> |
| 43 | 43 | ||
| 44 | #include "hdmi5_core.h" | 44 | #include "hdmi5_core.h" |
diff --git a/drivers/video/fbdev/omap2/omapfb/dss/hdmi_common.c b/drivers/video/fbdev/omap2/omapfb/dss/hdmi_common.c index 1b8fcc6c4ba1..189a5ad125a3 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/hdmi_common.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/hdmi_common.c | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | #include <linux/kernel.h> | 4 | #include <linux/kernel.h> |
| 5 | #include <linux/err.h> | 5 | #include <linux/err.h> |
| 6 | #include <linux/of.h> | 6 | #include <linux/of.h> |
| 7 | #include <video/omapdss.h> | 7 | #include <video/omapfb_dss.h> |
| 8 | 8 | ||
| 9 | #include "hdmi.h" | 9 | #include "hdmi.h" |
| 10 | 10 | ||
diff --git a/drivers/video/fbdev/omap2/omapfb/dss/hdmi_phy.c b/drivers/video/fbdev/omap2/omapfb/dss/hdmi_phy.c index 1f5d19c119ce..9a13c35fd6d8 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/hdmi_phy.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/hdmi_phy.c | |||
| @@ -13,7 +13,7 @@ | |||
| 13 | #include <linux/io.h> | 13 | #include <linux/io.h> |
| 14 | #include <linux/platform_device.h> | 14 | #include <linux/platform_device.h> |
| 15 | #include <linux/slab.h> | 15 | #include <linux/slab.h> |
| 16 | #include <video/omapdss.h> | 16 | #include <video/omapfb_dss.h> |
| 17 | 17 | ||
| 18 | #include "dss.h" | 18 | #include "dss.h" |
| 19 | #include "hdmi.h" | 19 | #include "hdmi.h" |
diff --git a/drivers/video/fbdev/omap2/omapfb/dss/hdmi_pll.c b/drivers/video/fbdev/omap2/omapfb/dss/hdmi_pll.c index 06e23a7c432c..eac3665aba6c 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/hdmi_pll.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/hdmi_pll.c | |||
| @@ -17,7 +17,7 @@ | |||
| 17 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
| 18 | #include <linux/clk.h> | 18 | #include <linux/clk.h> |
| 19 | 19 | ||
| 20 | #include <video/omapdss.h> | 20 | #include <video/omapfb_dss.h> |
| 21 | 21 | ||
| 22 | #include "dss.h" | 22 | #include "dss.h" |
| 23 | #include "hdmi.h" | 23 | #include "hdmi.h" |
diff --git a/drivers/video/fbdev/omap2/omapfb/dss/hdmi_wp.c b/drivers/video/fbdev/omap2/omapfb/dss/hdmi_wp.c index 7c544bc56fb5..705373e4cf38 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/hdmi_wp.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/hdmi_wp.c | |||
| @@ -14,7 +14,7 @@ | |||
| 14 | #include <linux/err.h> | 14 | #include <linux/err.h> |
| 15 | #include <linux/io.h> | 15 | #include <linux/io.h> |
| 16 | #include <linux/platform_device.h> | 16 | #include <linux/platform_device.h> |
| 17 | #include <video/omapdss.h> | 17 | #include <video/omapfb_dss.h> |
| 18 | 18 | ||
| 19 | #include "dss.h" | 19 | #include "dss.h" |
| 20 | #include "hdmi.h" | 20 | #include "hdmi.h" |
diff --git a/drivers/video/fbdev/omap2/omapfb/dss/manager-sysfs.c b/drivers/video/fbdev/omap2/omapfb/dss/manager-sysfs.c index a7414fb12830..9e2a67fdf4d2 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/manager-sysfs.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/manager-sysfs.c | |||
| @@ -26,7 +26,7 @@ | |||
| 26 | #include <linux/platform_device.h> | 26 | #include <linux/platform_device.h> |
| 27 | #include <linux/jiffies.h> | 27 | #include <linux/jiffies.h> |
| 28 | 28 | ||
| 29 | #include <video/omapdss.h> | 29 | #include <video/omapfb_dss.h> |
| 30 | 30 | ||
| 31 | #include "dss.h" | 31 | #include "dss.h" |
| 32 | #include "dss_features.h" | 32 | #include "dss_features.h" |
diff --git a/drivers/video/fbdev/omap2/omapfb/dss/manager.c b/drivers/video/fbdev/omap2/omapfb/dss/manager.c index 11f67ac88089..69f86d2cc274 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/manager.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/manager.c | |||
| @@ -28,7 +28,7 @@ | |||
| 28 | #include <linux/platform_device.h> | 28 | #include <linux/platform_device.h> |
| 29 | #include <linux/jiffies.h> | 29 | #include <linux/jiffies.h> |
| 30 | 30 | ||
| 31 | #include <video/omapdss.h> | 31 | #include <video/omapfb_dss.h> |
| 32 | 32 | ||
| 33 | #include "dss.h" | 33 | #include "dss.h" |
| 34 | #include "dss_features.h" | 34 | #include "dss_features.h" |
diff --git a/drivers/video/fbdev/omap2/omapfb/dss/output.c b/drivers/video/fbdev/omap2/omapfb/dss/output.c index 16072159bd24..bed9a978269d 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/output.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/output.c | |||
| @@ -21,7 +21,7 @@ | |||
| 21 | #include <linux/slab.h> | 21 | #include <linux/slab.h> |
| 22 | #include <linux/of.h> | 22 | #include <linux/of.h> |
| 23 | 23 | ||
| 24 | #include <video/omapdss.h> | 24 | #include <video/omapfb_dss.h> |
| 25 | 25 | ||
| 26 | #include "dss.h" | 26 | #include "dss.h" |
| 27 | 27 | ||
diff --git a/drivers/video/fbdev/omap2/omapfb/dss/overlay-sysfs.c b/drivers/video/fbdev/omap2/omapfb/dss/overlay-sysfs.c index 4cc5ddebfb34..f1f6c0aea752 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/overlay-sysfs.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/overlay-sysfs.c | |||
| @@ -26,7 +26,7 @@ | |||
| 26 | #include <linux/kobject.h> | 26 | #include <linux/kobject.h> |
| 27 | #include <linux/platform_device.h> | 27 | #include <linux/platform_device.h> |
| 28 | 28 | ||
| 29 | #include <video/omapdss.h> | 29 | #include <video/omapfb_dss.h> |
| 30 | 30 | ||
| 31 | #include "dss.h" | 31 | #include "dss.h" |
| 32 | #include "dss_features.h" | 32 | #include "dss_features.h" |
diff --git a/drivers/video/fbdev/omap2/omapfb/dss/overlay.c b/drivers/video/fbdev/omap2/omapfb/dss/overlay.c index 2f7cee985cdd..d6c5d75d2ef8 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/overlay.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/overlay.c | |||
| @@ -30,7 +30,7 @@ | |||
| 30 | #include <linux/delay.h> | 30 | #include <linux/delay.h> |
| 31 | #include <linux/slab.h> | 31 | #include <linux/slab.h> |
| 32 | 32 | ||
| 33 | #include <video/omapdss.h> | 33 | #include <video/omapfb_dss.h> |
| 34 | 34 | ||
| 35 | #include "dss.h" | 35 | #include "dss.h" |
| 36 | #include "dss_features.h" | 36 | #include "dss_features.h" |
diff --git a/drivers/video/fbdev/omap2/omapfb/dss/pll.c b/drivers/video/fbdev/omap2/omapfb/dss/pll.c index f974ddcd3b6e..0564c5606cd0 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/pll.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/pll.c | |||
| @@ -22,7 +22,7 @@ | |||
| 22 | #include <linux/regulator/consumer.h> | 22 | #include <linux/regulator/consumer.h> |
| 23 | #include <linux/sched.h> | 23 | #include <linux/sched.h> |
| 24 | 24 | ||
| 25 | #include <video/omapdss.h> | 25 | #include <video/omapfb_dss.h> |
| 26 | 26 | ||
| 27 | #include "dss.h" | 27 | #include "dss.h" |
| 28 | 28 | ||
diff --git a/drivers/video/fbdev/omap2/omapfb/dss/rfbi.c b/drivers/video/fbdev/omap2/omapfb/dss/rfbi.c index aea6a1d0fb20..562b0c4ae0c6 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/rfbi.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/rfbi.c | |||
| @@ -38,7 +38,7 @@ | |||
| 38 | #include <linux/pm_runtime.h> | 38 | #include <linux/pm_runtime.h> |
| 39 | #include <linux/component.h> | 39 | #include <linux/component.h> |
| 40 | 40 | ||
| 41 | #include <video/omapdss.h> | 41 | #include <video/omapfb_dss.h> |
| 42 | #include "dss.h" | 42 | #include "dss.h" |
| 43 | 43 | ||
| 44 | struct rfbi_reg { u16 idx; }; | 44 | struct rfbi_reg { u16 idx; }; |
diff --git a/drivers/video/fbdev/omap2/omapfb/dss/sdi.c b/drivers/video/fbdev/omap2/omapfb/dss/sdi.c index d747cc6b59e1..c4be732a4714 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/sdi.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/sdi.c | |||
| @@ -29,7 +29,7 @@ | |||
| 29 | #include <linux/of.h> | 29 | #include <linux/of.h> |
| 30 | #include <linux/component.h> | 30 | #include <linux/component.h> |
| 31 | 31 | ||
| 32 | #include <video/omapdss.h> | 32 | #include <video/omapfb_dss.h> |
| 33 | #include "dss.h" | 33 | #include "dss.h" |
| 34 | 34 | ||
| 35 | static struct { | 35 | static struct { |
diff --git a/drivers/video/fbdev/omap2/omapfb/dss/venc.c b/drivers/video/fbdev/omap2/omapfb/dss/venc.c index 26e0ee30adf8..392464da12e4 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/venc.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/venc.c | |||
| @@ -37,7 +37,7 @@ | |||
| 37 | #include <linux/of.h> | 37 | #include <linux/of.h> |
| 38 | #include <linux/component.h> | 38 | #include <linux/component.h> |
| 39 | 39 | ||
| 40 | #include <video/omapdss.h> | 40 | #include <video/omapfb_dss.h> |
| 41 | 41 | ||
| 42 | #include "dss.h" | 42 | #include "dss.h" |
| 43 | #include "dss_features.h" | 43 | #include "dss_features.h" |
diff --git a/drivers/video/fbdev/omap2/omapfb/dss/video-pll.c b/drivers/video/fbdev/omap2/omapfb/dss/video-pll.c index b1ec59e42940..a890540f2037 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/video-pll.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/video-pll.c | |||
| @@ -17,7 +17,7 @@ | |||
| 17 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
| 18 | #include <linux/sched.h> | 18 | #include <linux/sched.h> |
| 19 | 19 | ||
| 20 | #include <video/omapdss.h> | 20 | #include <video/omapfb_dss.h> |
| 21 | 21 | ||
| 22 | #include "dss.h" | 22 | #include "dss.h" |
| 23 | #include "dss_features.h" | 23 | #include "dss_features.h" |
diff --git a/drivers/video/fbdev/omap2/omapfb/omapfb-ioctl.c b/drivers/video/fbdev/omap2/omapfb/omapfb-ioctl.c index 9ddfdd63b84c..ef69273074ba 100644 --- a/drivers/video/fbdev/omap2/omapfb/omapfb-ioctl.c +++ b/drivers/video/fbdev/omap2/omapfb/omapfb-ioctl.c | |||
| @@ -30,7 +30,7 @@ | |||
| 30 | #include <linux/export.h> | 30 | #include <linux/export.h> |
| 31 | #include <linux/sizes.h> | 31 | #include <linux/sizes.h> |
| 32 | 32 | ||
| 33 | #include <video/omapdss.h> | 33 | #include <video/omapfb_dss.h> |
| 34 | #include <video/omapvrfb.h> | 34 | #include <video/omapvrfb.h> |
| 35 | 35 | ||
| 36 | #include "omapfb.h" | 36 | #include "omapfb.h" |
diff --git a/drivers/video/fbdev/omap2/omapfb/omapfb-main.c b/drivers/video/fbdev/omap2/omapfb/omapfb-main.c index d3af01c94a58..2fb90cb6803f 100644 --- a/drivers/video/fbdev/omap2/omapfb/omapfb-main.c +++ b/drivers/video/fbdev/omap2/omapfb/omapfb-main.c | |||
| @@ -30,7 +30,7 @@ | |||
| 30 | #include <linux/platform_device.h> | 30 | #include <linux/platform_device.h> |
| 31 | #include <linux/omapfb.h> | 31 | #include <linux/omapfb.h> |
| 32 | 32 | ||
| 33 | #include <video/omapdss.h> | 33 | #include <video/omapfb_dss.h> |
| 34 | #include <video/omapvrfb.h> | 34 | #include <video/omapvrfb.h> |
| 35 | 35 | ||
| 36 | #include "omapfb.h" | 36 | #include "omapfb.h" |
diff --git a/drivers/video/fbdev/omap2/omapfb/omapfb-sysfs.c b/drivers/video/fbdev/omap2/omapfb/omapfb-sysfs.c index 18fa9e1d0033..8087a009c54f 100644 --- a/drivers/video/fbdev/omap2/omapfb/omapfb-sysfs.c +++ b/drivers/video/fbdev/omap2/omapfb/omapfb-sysfs.c | |||
| @@ -29,7 +29,7 @@ | |||
| 29 | #include <linux/mm.h> | 29 | #include <linux/mm.h> |
| 30 | #include <linux/omapfb.h> | 30 | #include <linux/omapfb.h> |
| 31 | 31 | ||
| 32 | #include <video/omapdss.h> | 32 | #include <video/omapfb_dss.h> |
| 33 | #include <video/omapvrfb.h> | 33 | #include <video/omapvrfb.h> |
| 34 | 34 | ||
| 35 | #include "omapfb.h" | 35 | #include "omapfb.h" |
diff --git a/drivers/video/fbdev/omap2/omapfb/omapfb.h b/drivers/video/fbdev/omap2/omapfb/omapfb.h index 623cd872a367..bcb9ff4a607d 100644 --- a/drivers/video/fbdev/omap2/omapfb/omapfb.h +++ b/drivers/video/fbdev/omap2/omapfb/omapfb.h | |||
| @@ -31,7 +31,7 @@ | |||
| 31 | #include <linux/dma-attrs.h> | 31 | #include <linux/dma-attrs.h> |
| 32 | #include <linux/dma-mapping.h> | 32 | #include <linux/dma-mapping.h> |
| 33 | 33 | ||
| 34 | #include <video/omapdss.h> | 34 | #include <video/omapfb_dss.h> |
| 35 | 35 | ||
| 36 | #ifdef DEBUG | 36 | #ifdef DEBUG |
| 37 | extern bool omapfb_debug; | 37 | extern bool omapfb_debug; |
diff --git a/include/linux/platform_data/omapdss.h b/include/linux/platform_data/omapdss.h new file mode 100644 index 000000000000..679177929045 --- /dev/null +++ b/include/linux/platform_data/omapdss.h | |||
| @@ -0,0 +1,37 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2016 Texas Instruments, Inc. | ||
| 3 | * | ||
| 4 | * This program is free software; you can redistribute it and/or modify | ||
| 5 | * it under the terms of the GNU General Public License as published by | ||
| 6 | * the Free Software Foundation; either version 2 of the License, or | ||
| 7 | * (at your option) any later version. | ||
| 8 | */ | ||
| 9 | |||
| 10 | #ifndef __OMAPDSS_PDATA_H | ||
| 11 | #define __OMAPDSS_PDATA_H | ||
| 12 | |||
| 13 | enum omapdss_version { | ||
| 14 | OMAPDSS_VER_UNKNOWN = 0, | ||
| 15 | OMAPDSS_VER_OMAP24xx, | ||
| 16 | OMAPDSS_VER_OMAP34xx_ES1, /* OMAP3430 ES1.0, 2.0 */ | ||
| 17 | OMAPDSS_VER_OMAP34xx_ES3, /* OMAP3430 ES3.0+ */ | ||
| 18 | OMAPDSS_VER_OMAP3630, | ||
| 19 | OMAPDSS_VER_AM35xx, | ||
| 20 | OMAPDSS_VER_OMAP4430_ES1, /* OMAP4430 ES1.0 */ | ||
| 21 | OMAPDSS_VER_OMAP4430_ES2, /* OMAP4430 ES2.0, 2.1, 2.2 */ | ||
| 22 | OMAPDSS_VER_OMAP4, /* All other OMAP4s */ | ||
| 23 | OMAPDSS_VER_OMAP5, | ||
| 24 | OMAPDSS_VER_AM43xx, | ||
| 25 | OMAPDSS_VER_DRA7xx, | ||
| 26 | }; | ||
| 27 | |||
| 28 | /* Board specific data */ | ||
| 29 | struct omap_dss_board_info { | ||
| 30 | const char *default_display_name; | ||
| 31 | int (*dsi_enable_pads)(int dsi_id, unsigned int lane_mask); | ||
| 32 | void (*dsi_disable_pads)(int dsi_id, unsigned int lane_mask); | ||
| 33 | int (*set_min_bus_tput)(struct device *dev, unsigned long r); | ||
| 34 | enum omapdss_version version; | ||
| 35 | }; | ||
| 36 | |||
| 37 | #endif /* __OMAPDSS_PDATA_H */ | ||
diff --git a/include/sound/omap-hdmi-audio.h b/include/sound/omap-hdmi-audio.h index afdb416898e0..1df2ff61a4dd 100644 --- a/include/sound/omap-hdmi-audio.h +++ b/include/sound/omap-hdmi-audio.h | |||
| @@ -16,11 +16,16 @@ | |||
| 16 | * | 16 | * |
| 17 | */ | 17 | */ |
| 18 | 18 | ||
| 19 | #include <video/omapdss.h> | ||
| 20 | |||
| 21 | #ifndef __OMAP_HDMI_AUDIO_H__ | 19 | #ifndef __OMAP_HDMI_AUDIO_H__ |
| 22 | #define __OMAP_HDMI_AUDIO_H__ | 20 | #define __OMAP_HDMI_AUDIO_H__ |
| 23 | 21 | ||
| 22 | #include <linux/platform_data/omapdss.h> | ||
| 23 | |||
| 24 | struct omap_dss_audio { | ||
| 25 | struct snd_aes_iec958 *iec; | ||
| 26 | struct snd_cea_861_aud_if *cea; | ||
| 27 | }; | ||
| 28 | |||
| 24 | struct omap_hdmi_audio_ops { | 29 | struct omap_hdmi_audio_ops { |
| 25 | int (*audio_startup)(struct device *dev, | 30 | int (*audio_startup)(struct device *dev, |
| 26 | void (*abort_cb)(struct device *dev)); | 31 | void (*abort_cb)(struct device *dev)); |
diff --git a/include/video/omap-panel-data.h b/include/video/omap-panel-data.h index 56830d1dc762..e7003ee6e063 100644 --- a/include/video/omap-panel-data.h +++ b/include/video/omap-panel-data.h | |||
| @@ -27,59 +27,18 @@ | |||
| 27 | #ifndef __OMAP_PANEL_DATA_H | 27 | #ifndef __OMAP_PANEL_DATA_H |
| 28 | #define __OMAP_PANEL_DATA_H | 28 | #define __OMAP_PANEL_DATA_H |
| 29 | 29 | ||
| 30 | #include <video/omapdss.h> | ||
| 31 | #include <video/display_timing.h> | 30 | #include <video/display_timing.h> |
| 32 | 31 | ||
| 33 | struct omap_dss_device; | ||
| 34 | |||
| 35 | /** | ||
| 36 | * encoder_tfp410 platform data | ||
| 37 | * @name: name for this display entity | ||
| 38 | * @power_down_gpio: gpio number for PD pin (or -1 if not available) | ||
| 39 | * @data_lines: number of DPI datalines | ||
| 40 | */ | ||
| 41 | struct encoder_tfp410_platform_data { | ||
| 42 | const char *name; | ||
| 43 | const char *source; | ||
| 44 | int power_down_gpio; | ||
| 45 | int data_lines; | ||
| 46 | }; | ||
| 47 | |||
| 48 | |||
| 49 | /** | ||
| 50 | * connector_dvi platform data | ||
| 51 | * @name: name for this display entity | ||
| 52 | * @source: name of the display entity used as a video source | ||
| 53 | * @i2c_bus_num: i2c bus number to be used for reading EDID | ||
| 54 | */ | ||
| 55 | struct connector_dvi_platform_data { | ||
| 56 | const char *name; | ||
| 57 | const char *source; | ||
| 58 | int i2c_bus_num; | ||
| 59 | }; | ||
| 60 | |||
| 61 | /** | ||
| 62 | * connector_hdmi platform data | ||
| 63 | * @name: name for this display entity | ||
| 64 | * @source: name of the display entity used as a video source | ||
| 65 | */ | ||
| 66 | struct connector_hdmi_platform_data { | ||
| 67 | const char *name; | ||
| 68 | const char *source; | ||
| 69 | }; | ||
| 70 | |||
| 71 | /** | 32 | /** |
| 72 | * connector_atv platform data | 33 | * connector_atv platform data |
| 73 | * @name: name for this display entity | 34 | * @name: name for this display entity |
| 74 | * @source: name of the display entity used as a video source | 35 | * @source: name of the display entity used as a video source |
| 75 | * @connector_type: composite/svideo | ||
| 76 | * @invert_polarity: invert signal polarity | 36 | * @invert_polarity: invert signal polarity |
| 77 | */ | 37 | */ |
| 78 | struct connector_atv_platform_data { | 38 | struct connector_atv_platform_data { |
| 79 | const char *name; | 39 | const char *name; |
| 80 | const char *source; | 40 | const char *source; |
| 81 | 41 | ||
| 82 | enum omap_dss_venc_type connector_type; | ||
| 83 | bool invert_polarity; | 42 | bool invert_polarity; |
| 84 | }; | 43 | }; |
| 85 | 44 | ||
| @@ -105,33 +64,6 @@ struct panel_dpi_platform_data { | |||
| 105 | }; | 64 | }; |
| 106 | 65 | ||
| 107 | /** | 66 | /** |
| 108 | * panel_dsicm platform data | ||
| 109 | * @name: name for this display entity | ||
| 110 | * @source: name of the display entity used as a video source | ||
| 111 | * @reset_gpio: gpio to reset the panel (or -1) | ||
| 112 | * @use_ext_te: use external TE GPIO | ||
| 113 | * @ext_te_gpio: external TE GPIO | ||
| 114 | * @ulps_timeout: time to wait before entering ULPS, 0 = disabled (ms) | ||
| 115 | * @use_dsi_backlight: true if panel uses DSI command to control backlight | ||
| 116 | * @pin_config: DSI pin configuration | ||
| 117 | */ | ||
| 118 | struct panel_dsicm_platform_data { | ||
| 119 | const char *name; | ||
| 120 | const char *source; | ||
| 121 | |||
| 122 | int reset_gpio; | ||
| 123 | |||
| 124 | bool use_ext_te; | ||
| 125 | int ext_te_gpio; | ||
| 126 | |||
| 127 | unsigned ulps_timeout; | ||
| 128 | |||
| 129 | bool use_dsi_backlight; | ||
| 130 | |||
| 131 | struct omap_dsi_pin_config pin_config; | ||
| 132 | }; | ||
| 133 | |||
| 134 | /** | ||
| 135 | * panel_acx565akm platform data | 67 | * panel_acx565akm platform data |
| 136 | * @name: name for this display entity | 68 | * @name: name for this display entity |
| 137 | * @source: name of the display entity used as a video source | 69 | * @source: name of the display entity used as a video source |
| @@ -147,93 +79,4 @@ struct panel_acx565akm_platform_data { | |||
| 147 | int datapairs; | 79 | int datapairs; |
| 148 | }; | 80 | }; |
| 149 | 81 | ||
| 150 | /** | ||
| 151 | * panel_lb035q02 platform data | ||
| 152 | * @name: name for this display entity | ||
| 153 | * @source: name of the display entity used as a video source | ||
| 154 | * @data_lines: number of DPI datalines | ||
| 155 | * @backlight_gpio: gpio to enable/disable the backlight (or -1) | ||
| 156 | * @enable_gpio: gpio to enable/disable the panel (or -1) | ||
| 157 | */ | ||
| 158 | struct panel_lb035q02_platform_data { | ||
| 159 | const char *name; | ||
| 160 | const char *source; | ||
| 161 | |||
| 162 | int data_lines; | ||
| 163 | |||
| 164 | int backlight_gpio; | ||
| 165 | int enable_gpio; | ||
| 166 | }; | ||
| 167 | |||
| 168 | /** | ||
| 169 | * panel_sharp_ls037v7dw01 platform data | ||
| 170 | * @name: name for this display entity | ||
| 171 | * @source: name of the display entity used as a video source | ||
| 172 | * @data_lines: number of DPI datalines | ||
| 173 | * @resb_gpio: reset signal GPIO | ||
| 174 | * @ini_gpio: power on control GPIO | ||
| 175 | * @mo_gpio: selection for resolution(VGA/QVGA) GPIO | ||
| 176 | * @lr_gpio: selection for horizontal scanning direction GPIO | ||
| 177 | * @ud_gpio: selection for vertical scanning direction GPIO | ||
| 178 | */ | ||
| 179 | struct panel_sharp_ls037v7dw01_platform_data { | ||
| 180 | const char *name; | ||
| 181 | const char *source; | ||
| 182 | |||
| 183 | int data_lines; | ||
| 184 | |||
| 185 | int resb_gpio; | ||
| 186 | int ini_gpio; | ||
| 187 | int mo_gpio; | ||
| 188 | int lr_gpio; | ||
| 189 | int ud_gpio; | ||
| 190 | }; | ||
| 191 | |||
| 192 | /** | ||
| 193 | * panel-tpo-td043mtea1 platform data | ||
| 194 | * @name: name for this display entity | ||
| 195 | * @source: name of the display entity used as a video source | ||
| 196 | * @data_lines: number of DPI datalines | ||
| 197 | * @nreset_gpio: reset signal | ||
| 198 | */ | ||
| 199 | struct panel_tpo_td043mtea1_platform_data { | ||
| 200 | const char *name; | ||
| 201 | const char *source; | ||
| 202 | |||
| 203 | int data_lines; | ||
| 204 | |||
| 205 | int nreset_gpio; | ||
| 206 | }; | ||
| 207 | |||
| 208 | /** | ||
| 209 | * panel-nec-nl8048hl11 platform data | ||
| 210 | * @name: name for this display entity | ||
| 211 | * @source: name of the display entity used as a video source | ||
| 212 | * @data_lines: number of DPI datalines | ||
| 213 | * @res_gpio: reset signal | ||
| 214 | * @qvga_gpio: selection for resolution(QVGA/WVGA) | ||
| 215 | */ | ||
| 216 | struct panel_nec_nl8048hl11_platform_data { | ||
| 217 | const char *name; | ||
| 218 | const char *source; | ||
| 219 | |||
| 220 | int data_lines; | ||
| 221 | |||
| 222 | int res_gpio; | ||
| 223 | int qvga_gpio; | ||
| 224 | }; | ||
| 225 | |||
| 226 | /** | ||
| 227 | * panel-tpo-td028ttec1 platform data | ||
| 228 | * @name: name for display entity | ||
| 229 | * @source: name of the display entity used as a video source | ||
| 230 | * @data_lines: number of DPI datalines | ||
| 231 | */ | ||
| 232 | struct panel_tpo_td028ttec1_platform_data { | ||
| 233 | const char *name; | ||
| 234 | const char *source; | ||
| 235 | |||
| 236 | int data_lines; | ||
| 237 | }; | ||
| 238 | |||
| 239 | #endif /* __OMAP_PANEL_DATA_H */ | 82 | #endif /* __OMAP_PANEL_DATA_H */ |
diff --git a/include/video/omapdss.h b/include/video/omapfb_dss.h index 6bd9d03b1030..1d38901d599d 100644 --- a/include/video/omapdss.h +++ b/include/video/omapfb_dss.h | |||
| @@ -1,27 +1,20 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (C) 2008 Nokia Corporation | 2 | * Copyright (C) 2016 Texas Instruments, Inc. |
| 3 | * Author: Tomi Valkeinen <tomi.valkeinen@nokia.com> | ||
| 4 | * | 3 | * |
| 5 | * This program is free software; you can redistribute it and/or modify it | 4 | * This program is free software; you can redistribute it and/or modify |
| 6 | * under the terms of the GNU General Public License version 2 as published by | 5 | * it under the terms of the GNU General Public License as published by |
| 7 | * the Free Software Foundation. | 6 | * the Free Software Foundation; either version 2 of the License, or |
| 8 | * | 7 | * (at your option) any later version. |
| 9 | * This program is distributed in the hope that it will be useful, but WITHOUT | ||
| 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
| 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
| 12 | * more details. | ||
| 13 | * | ||
| 14 | * You should have received a copy of the GNU General Public License along with | ||
| 15 | * this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 16 | */ | 8 | */ |
| 17 | 9 | ||
| 18 | #ifndef __OMAP_OMAPDSS_H | 10 | #ifndef __OMAPFB_DSS_H |
| 19 | #define __OMAP_OMAPDSS_H | 11 | #define __OMAPFB_DSS_H |
| 20 | 12 | ||
| 21 | #include <linux/list.h> | 13 | #include <linux/list.h> |
| 22 | #include <linux/kobject.h> | 14 | #include <linux/kobject.h> |
| 23 | #include <linux/device.h> | 15 | #include <linux/device.h> |
| 24 | #include <linux/interrupt.h> | 16 | #include <linux/interrupt.h> |
| 17 | #include <linux/platform_data/omapdss.h> | ||
| 25 | 18 | ||
| 26 | #include <video/videomode.h> | 19 | #include <video/videomode.h> |
| 27 | 20 | ||
| @@ -167,11 +160,6 @@ enum omap_dss_display_state { | |||
| 167 | OMAP_DSS_DISPLAY_ACTIVE, | 160 | OMAP_DSS_DISPLAY_ACTIVE, |
| 168 | }; | 161 | }; |
| 169 | 162 | ||
| 170 | struct omap_dss_audio { | ||
| 171 | struct snd_aes_iec958 *iec; | ||
| 172 | struct snd_cea_861_aud_if *cea; | ||
| 173 | }; | ||
| 174 | |||
| 175 | enum omap_dss_rotation_type { | 163 | enum omap_dss_rotation_type { |
| 176 | OMAP_DSS_ROT_DMA = 1 << 0, | 164 | OMAP_DSS_ROT_DMA = 1 << 0, |
| 177 | OMAP_DSS_ROT_VRFB = 1 << 1, | 165 | OMAP_DSS_ROT_VRFB = 1 << 1, |
| @@ -284,36 +272,6 @@ struct omap_dss_dsi_config { | |||
| 284 | enum omap_dss_dsi_trans_mode trans_mode; | 272 | enum omap_dss_dsi_trans_mode trans_mode; |
| 285 | }; | 273 | }; |
| 286 | 274 | ||
| 287 | enum omapdss_version { | ||
| 288 | OMAPDSS_VER_UNKNOWN = 0, | ||
| 289 | OMAPDSS_VER_OMAP24xx, | ||
| 290 | OMAPDSS_VER_OMAP34xx_ES1, /* OMAP3430 ES1.0, 2.0 */ | ||
| 291 | OMAPDSS_VER_OMAP34xx_ES3, /* OMAP3430 ES3.0+ */ | ||
| 292 | OMAPDSS_VER_OMAP3630, | ||
| 293 | OMAPDSS_VER_AM35xx, | ||
| 294 | OMAPDSS_VER_OMAP4430_ES1, /* OMAP4430 ES1.0 */ | ||
| 295 | OMAPDSS_VER_OMAP4430_ES2, /* OMAP4430 ES2.0, 2.1, 2.2 */ | ||
| 296 | OMAPDSS_VER_OMAP4, /* All other OMAP4s */ | ||
| 297 | OMAPDSS_VER_OMAP5, | ||
| 298 | OMAPDSS_VER_AM43xx, | ||
| 299 | OMAPDSS_VER_DRA7xx, | ||
| 300 | }; | ||
| 301 | |||
| 302 | /* Board specific data */ | ||
| 303 | struct omap_dss_board_info { | ||
| 304 | int num_devices; | ||
| 305 | struct omap_dss_device **devices; | ||
| 306 | struct omap_dss_device *default_device; | ||
| 307 | const char *default_display_name; | ||
| 308 | int (*dsi_enable_pads)(int dsi_id, unsigned lane_mask); | ||
| 309 | void (*dsi_disable_pads)(int dsi_id, unsigned lane_mask); | ||
| 310 | int (*set_min_bus_tput)(struct device *dev, unsigned long r); | ||
| 311 | enum omapdss_version version; | ||
| 312 | }; | ||
| 313 | |||
| 314 | /* Init with the board info */ | ||
| 315 | extern int omap_display_init(struct omap_dss_board_info *board_data); | ||
| 316 | |||
| 317 | struct omap_video_timings { | 275 | struct omap_video_timings { |
| 318 | /* Unit: pixels */ | 276 | /* Unit: pixels */ |
| 319 | u16 x_res; | 277 | u16 x_res; |
| @@ -899,4 +857,4 @@ omapdss_of_get_first_endpoint(const struct device_node *parent); | |||
| 899 | struct omap_dss_device * | 857 | struct omap_dss_device * |
| 900 | omapdss_of_find_source_for_first_ep(struct device_node *node); | 858 | omapdss_of_find_source_for_first_ep(struct device_node *node); |
| 901 | 859 | ||
| 902 | #endif | 860 | #endif /* __OMAPFB_DSS_H */ |
diff --git a/sound/soc/omap/omap-hdmi-audio.c b/sound/soc/omap/omap-hdmi-audio.c index 64425d352962..888133f9e65d 100644 --- a/sound/soc/omap/omap-hdmi-audio.c +++ b/sound/soc/omap/omap-hdmi-audio.c | |||
| @@ -28,7 +28,6 @@ | |||
| 28 | #include <sound/asoundef.h> | 28 | #include <sound/asoundef.h> |
| 29 | #include <sound/omap-pcm.h> | 29 | #include <sound/omap-pcm.h> |
| 30 | #include <sound/omap-hdmi-audio.h> | 30 | #include <sound/omap-hdmi-audio.h> |
| 31 | #include <video/omapdss.h> | ||
| 32 | 31 | ||
| 33 | #define DRV_NAME "omap-hdmi-audio" | 32 | #define DRV_NAME "omap-hdmi-audio" |
| 34 | 33 | ||
