]> git.karo-electronics.de Git - linux-beck.git/commitdiff
OMAPDSS: add pdata->default_display_name
authorTomi Valkeinen <tomi.valkeinen@ti.com>
Fri, 16 Nov 2012 12:59:56 +0000 (14:59 +0200)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Mon, 17 Jun 2013 11:00:26 +0000 (14:00 +0300)
We can currently set the default display (i.e. the initial display) in
the omapdss platform data by using a pointer to the default
omap_dss_device. Internally omapdss uses the device's name to resolve
the default display.

As it's difficult to get the omap_dss_device pointer in the future,
after we've changed the omapdss device model, this patch adds a new way
to define the default display, by using the name of the display.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Archit Taneja <archit@ti.com>
drivers/video/omap2/dss/core.c
include/video/omapdss.h

index c9c2252e371945939dcf0b5e1f667359cd7ba42d..710e9f9a4436add4e774dc0023071186d25d0dc5 100644 (file)
@@ -243,6 +243,8 @@ static int __init omap_dss_probe(struct platform_device *pdev)
 
        if (def_disp_name)
                core.default_display_name = def_disp_name;
+       else if (pdata->default_display_name)
+               core.default_display_name = pdata->default_display_name;
        else if (pdata->default_device)
                core.default_display_name = pdata->default_device->name;
 
index aeb4e9a0c5d1c1e4dbd484286983bc3eada936df..6462f689a16d6dd8b9a4466c5cda0e5b6b79b7e4 100644 (file)
@@ -365,6 +365,7 @@ struct omap_dss_board_info {
        int num_devices;
        struct omap_dss_device **devices;
        struct omap_dss_device *default_device;
+       const char *default_display_name;
        int (*dsi_enable_pads)(int dsi_id, unsigned lane_mask);
        void (*dsi_disable_pads)(int dsi_id, unsigned lane_mask);
        int (*set_min_bus_tput)(struct device *dev, unsigned long r);