~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise-security

« back to all changes in this revision

Viewing changes to drivers/staging/msm/mddi_ext_lcd.c

  • Committer: Package Import Robot
  • Author(s): Paolo Pisati, Paolo Pisati
  • Date: 2011-12-06 15:56:07 UTC
  • Revision ID: package-import@ubuntu.com-20111206155607-pcf44kv5fmhk564f
Tags: 3.2.0-1401.1
[ Paolo Pisati ]

* Rebased on top of Ubuntu-3.2.0-3.8
* Tilt-tracking @ ef2487af4bb15bdd0689631774b5a5e3a59f74e2
* Delete debian.ti-omap4/control, it shoudln't be tracked
* Fix architecture spelling (s/armel/armhf/)
* [Config] Update configs following 3.2 import
* [Config] Fix compilation: disable CODA and ARCH_OMAP3
* [Config] Fix compilation: disable Ethernet Faraday
* Update series to precise

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Copyright (c) 2008-2009, Code Aurora Forum. All rights reserved.
2
 
 *
3
 
 * This program is free software; you can redistribute it and/or modify
4
 
 * it under the terms of the GNU General Public License version 2 and
5
 
 * only version 2 as published by the Free Software Foundation.
6
 
 *
7
 
 * This program is distributed in the hope that it will be useful,
8
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10
 
 * GNU General Public License for more details.
11
 
 *
12
 
 * You should have received a copy of the GNU General Public License
13
 
 * along with this program; if not, write to the Free Software
14
 
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
15
 
 * 02110-1301, USA.
16
 
 */
17
 
 
18
 
#include "msm_fb.h"
19
 
#include "mddihost.h"
20
 
#include "mddihosti.h"
21
 
 
22
 
static int mddi_ext_lcd_on(struct platform_device *pdev);
23
 
static int mddi_ext_lcd_off(struct platform_device *pdev);
24
 
 
25
 
static int mddi_ext_lcd_on(struct platform_device *pdev)
26
 
{
27
 
        return 0;
28
 
}
29
 
 
30
 
static int mddi_ext_lcd_off(struct platform_device *pdev)
31
 
{
32
 
        return 0;
33
 
}
34
 
 
35
 
static int __init mddi_ext_lcd_probe(struct platform_device *pdev)
36
 
{
37
 
        msm_fb_add_device(pdev);
38
 
 
39
 
        return 0;
40
 
}
41
 
 
42
 
static struct platform_driver this_driver = {
43
 
        .probe  = mddi_ext_lcd_probe,
44
 
        .driver = {
45
 
                .name   = "extmddi_svga",
46
 
        },
47
 
};
48
 
 
49
 
static struct msm_fb_panel_data mddi_ext_lcd_panel_data = {
50
 
        .panel_info.xres = 800,
51
 
        .panel_info.yres = 600,
52
 
        .panel_info.type = EXT_MDDI_PANEL,
53
 
        .panel_info.pdest = DISPLAY_1,
54
 
        .panel_info.wait_cycle = 0,
55
 
        .panel_info.bpp = 18,
56
 
        .panel_info.fb_num = 2,
57
 
        .panel_info.clk_rate = 122880000,
58
 
        .panel_info.clk_min  = 120000000,
59
 
        .panel_info.clk_max  = 125000000,
60
 
        .on = mddi_ext_lcd_on,
61
 
        .off = mddi_ext_lcd_off,
62
 
};
63
 
 
64
 
static struct platform_device this_device = {
65
 
        .name   = "extmddi_svga",
66
 
        .id     = 0,
67
 
        .dev    = {
68
 
                .platform_data = &mddi_ext_lcd_panel_data,
69
 
        }
70
 
};
71
 
 
72
 
static int __init mddi_ext_lcd_init(void)
73
 
{
74
 
        int ret;
75
 
        struct msm_panel_info *pinfo;
76
 
 
77
 
        ret = platform_driver_register(&this_driver);
78
 
        if (!ret) {
79
 
                pinfo = &mddi_ext_lcd_panel_data.panel_info;
80
 
                pinfo->lcd.vsync_enable = FALSE;
81
 
                pinfo->mddi.vdopkt = MDDI_DEFAULT_PRIM_PIX_ATTR;
82
 
 
83
 
                ret = platform_device_register(&this_device);
84
 
                if (ret)
85
 
                        platform_driver_unregister(&this_driver);
86
 
        }
87
 
 
88
 
        return ret;
89
 
}
90
 
 
91
 
module_init(mddi_ext_lcd_init);