diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2013-03-06 04:10:29 -0500 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2013-04-03 08:19:17 -0400 |
commit | 777f05cc79892c1a5c25a72cfb3cc24554378a45 (patch) | |
tree | 4913a4a29399b315e764d2ab846d7d78040847c4 /drivers/video/omap2/displays | |
parent | 17518189218cdf4c8136ce6f0284519b9a878a09 (diff) |
OMAPDSS: DSI: simplify dsi configuration
We have a bunch of dsi functions that are used to do the basic
configuration for DSI. To simplify things, and to make sure we have all
the necessary information, create a single dsi config function, which
does the basic configuration.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video/omap2/displays')
-rw-r--r-- | drivers/video/omap2/displays/panel-taal.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/video/omap2/displays/panel-taal.c b/drivers/video/omap2/displays/panel-taal.c index bc4c95ee41cc..eb86cbae8c2a 100644 --- a/drivers/video/omap2/displays/panel-taal.c +++ b/drivers/video/omap2/displays/panel-taal.c | |||
@@ -919,6 +919,13 @@ static int taal_power_on(struct omap_dss_device *dssdev) | |||
919 | struct taal_data *td = dev_get_drvdata(&dssdev->dev); | 919 | struct taal_data *td = dev_get_drvdata(&dssdev->dev); |
920 | u8 id1, id2, id3; | 920 | u8 id1, id2, id3; |
921 | int r; | 921 | int r; |
922 | struct omap_dss_dsi_config dsi_config = { | ||
923 | .mode = OMAP_DSS_DSI_CMD_MODE, | ||
924 | .pixel_format = OMAP_DSS_DSI_FMT_RGB888, | ||
925 | .timings = &dssdev->panel.timings, | ||
926 | .hs_clk = 216000000, | ||
927 | .lp_clk = 10000000, | ||
928 | }; | ||
922 | 929 | ||
923 | r = omapdss_dsi_configure_pins(dssdev, &td->pin_config); | 930 | r = omapdss_dsi_configure_pins(dssdev, &td->pin_config); |
924 | if (r) { | 931 | if (r) { |
@@ -926,14 +933,9 @@ static int taal_power_on(struct omap_dss_device *dssdev) | |||
926 | goto err0; | 933 | goto err0; |
927 | }; | 934 | }; |
928 | 935 | ||
929 | omapdss_dsi_set_size(dssdev, dssdev->panel.timings.x_res, | 936 | r = omapdss_dsi_set_config(dssdev, &dsi_config); |
930 | dssdev->panel.timings.y_res); | ||
931 | omapdss_dsi_set_pixel_format(dssdev, OMAP_DSS_DSI_FMT_RGB888); | ||
932 | omapdss_dsi_set_operation_mode(dssdev, OMAP_DSS_DSI_CMD_MODE); | ||
933 | |||
934 | r = omapdss_dsi_set_clocks(dssdev, 216000000, 10000000); | ||
935 | if (r) { | 937 | if (r) { |
936 | dev_err(&dssdev->dev, "failed to set HS and LP clocks\n"); | 938 | dev_err(&dssdev->dev, "failed to configure DSI\n"); |
937 | goto err0; | 939 | goto err0; |
938 | } | 940 | } |
939 | 941 | ||