1 /* Copyright (c) 2008-2009, Code Aurora Forum. All rights reserved.
3 * Redistribution and use in source and binary forms, with or without
4 * modification, are permitted provided that the following conditions are met:
5 * * Redistributions of source code must retain the above copyright
6 * notice, this list of conditions and the following disclaimer.
7 * * Redistributions in binary form must reproduce the above copyright
8 * notice, this list of conditions and the following disclaimer in the
9 * documentation and/or other materials provided with the distribution.
10 * * Neither the name of Code Aurora nor
11 * the names of its contributors may be used to endorse or promote
12 * products derived from this software without specific prior written
15 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
16 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17 * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18 * NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
19 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
20 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
21 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
22 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
23 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
24 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
25 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 #ifndef MSM_FB_PANEL_H
30 #define MSM_FB_PANEL_H
32 #include "msm_fb_def.h"
34 struct msm_fb_data_type;
36 typedef void (*msm_fb_vsync_handler_type) (void *arg);
39 typedef struct panel_id_s {
45 #define NO_PANEL 0xffff /* No Panel */
46 #define MDDI_PANEL 1 /* MDDI */
47 #define EBI2_PANEL 2 /* EBI2 */
48 #define LCDC_PANEL 3 /* internal LCDC type */
49 #define EXT_MDDI_PANEL 4 /* Ext.MDDI */
50 #define TV_PANEL 5 /* TV */
51 #define HDMI_PANEL 6 /* HDMI TV */
55 DISPLAY_LCD = 0, /* lcd = ebi2/mddi */
56 DISPLAY_LCDC, /* lcdc */
57 DISPLAY_TV, /* TV Out */
58 DISPLAY_EXT_MDDI, /* External MDDI */
61 /* panel device locaiton */
63 DISPLAY_1 = 0, /* attached as first device */
64 DISPLAY_2, /* attached on second device */
69 struct lcd_panel_info {
76 __u32 vsync_notifier_period;
79 struct lcdc_panel_info {
91 struct mddi_panel_info {
95 struct msm_panel_info {
101 DISP_TARGET_PHYS pdest;
111 struct mddi_panel_info mddi;
115 struct lcd_panel_info lcd;
116 struct lcdc_panel_info lcdc;
120 struct msm_fb_panel_data {
121 struct msm_panel_info panel_info;
122 void (*set_rect) (int x, int y, int xres, int yres);
123 void (*set_vsync_notifier) (msm_fb_vsync_handler_type, void *arg);
124 void (*set_backlight) (struct msm_fb_data_type *);
126 /* function entry chain */
127 int (*on) (struct platform_device *pdev);
128 int (*off) (struct platform_device *pdev);
129 struct platform_device *next;
132 /*===========================================================================
134 ============================================================================*/
135 struct platform_device *msm_fb_device_alloc(struct msm_fb_panel_data *pdata,
137 int panel_next_on(struct platform_device *pdev);
138 int panel_next_off(struct platform_device *pdev);
140 int lcdc_device_register(struct msm_panel_info *pinfo);
142 int mddi_toshiba_device_register(struct msm_panel_info *pinfo,
143 u32 channel, u32 panel);
145 #endif /* MSM_FB_PANEL_H */