2 * Copyright (C) 2009 Nokia Corporation
5 * Some code and ideas taken from drivers/video/omap/ driver
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License version 2 as published by
10 * the Free Software Foundation.
12 * This program is distributed in the hope that it will be useful, but WITHOUT
13 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
17 * You should have received a copy of the GNU General Public License along with
18 * this program. If not, see <http://www.gnu.org/licenses/>.
21 #define DSS_SUBSYS_NAME "DISPLAY"
23 #include <linux/kernel.h>
28 static int disp_num_counter;
30 void omapdss_display_init(struct omap_dss_device *dssdev)
35 * Note: this presumes that all displays either have an DT alias, or
38 id = of_alias_get_id(dssdev->dev->of_node, "display");
40 id = disp_num_counter++;
42 dssdev->alias_id = id;
44 /* Use 'label' property for name, if it exists */
45 of_property_read_string(dssdev->dev->of_node, "label", &dssdev->name);
47 if (dssdev->name == NULL)
48 dssdev->name = devm_kasprintf(dssdev->dev, GFP_KERNEL,
51 EXPORT_SYMBOL_GPL(omapdss_display_init);
53 struct omap_dss_device *omapdss_display_get(struct omap_dss_device *output)
56 output = output->next;
58 return omapdss_device_get(output);
60 EXPORT_SYMBOL_GPL(omapdss_display_get);