1 /* Copyright (c) 2008-2009, Code Aurora Forum. All rights reserved.
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.
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.
13 #ifndef MSM_FB_PANEL_H
14 #define MSM_FB_PANEL_H
16 #include "msm_fb_def.h"
18 struct msm_fb_data_type
;
20 typedef void (*msm_fb_vsync_handler_type
) (void *arg
);
23 typedef struct panel_id_s
{
29 #define NO_PANEL 0xffff /* No Panel */
30 #define MDDI_PANEL 1 /* MDDI */
31 #define EBI2_PANEL 2 /* EBI2 */
32 #define LCDC_PANEL 3 /* internal LCDC type */
33 #define EXT_MDDI_PANEL 4 /* Ext.MDDI */
34 #define TV_PANEL 5 /* TV */
35 #define HDMI_PANEL 6 /* HDMI TV */
39 DISPLAY_LCD
= 0, /* lcd = ebi2/mddi */
40 DISPLAY_LCDC
, /* lcdc */
41 DISPLAY_TV
, /* TV Out */
42 DISPLAY_EXT_MDDI
, /* External MDDI */
45 /* panel device locaiton */
47 DISPLAY_1
= 0, /* attached as first device */
48 DISPLAY_2
, /* attached on second device */
53 struct lcd_panel_info
{
60 __u32 vsync_notifier_period
;
63 struct lcdc_panel_info
{
75 struct mddi_panel_info
{
79 struct msm_panel_info
{
85 DISP_TARGET_PHYS pdest
;
95 struct mddi_panel_info mddi
;
99 struct lcd_panel_info lcd
;
100 struct lcdc_panel_info lcdc
;
104 struct msm_fb_panel_data
{
105 struct msm_panel_info panel_info
;
106 void (*set_rect
) (int x
, int y
, int xres
, int yres
);
107 void (*set_vsync_notifier
) (msm_fb_vsync_handler_type
, void *arg
);
108 void (*set_backlight
) (struct msm_fb_data_type
*);
110 /* function entry chain */
111 int (*on
) (struct platform_device
*pdev
);
112 int (*off
) (struct platform_device
*pdev
);
113 struct platform_device
*next
;
116 /*===========================================================================
118 ============================================================================*/
119 struct platform_device
*msm_fb_device_alloc(struct msm_fb_panel_data
*pdata
,
121 int panel_next_on(struct platform_device
*pdev
);
122 int panel_next_off(struct platform_device
*pdev
);
124 int lcdc_device_register(struct msm_panel_info
*pinfo
);
126 int mddi_toshiba_device_register(struct msm_panel_info
*pinfo
,
127 u32 channel
, u32 panel
);
129 #endif /* MSM_FB_PANEL_H */