2 * Copyright (C) 2012 Spreadtrum Communications Inc.
4 * This software is licensed under the terms of the GNU General Public
5 * License version 2, as published by the Free Software Foundation, and
6 * may be copied, distributed, and modified under those terms.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
20 #define FB_PRINT printk
25 #define mdelay(a) udelay(a * 1000)
29 SPRDFB_PANEL_IF_DBI = 0,
37 MCU_LCD_REGISTER_TIMING = 0,
39 MCU_LCD_TIMING_KIND_MAX
45 RGB_LCD_TIMING_KIND_MAX
54 int32_t (*panel_if_check)(struct panel_spec *self);
55 void (*panel_if_mount)(struct sprdfb_device *dev);
56 void (*panel_if_init)(struct sprdfb_device *dev);
57 void (*panel_if_ready)(struct sprdfb_device *dev);
58 void (*panel_if_uninit)(struct sprdfb_device *dev);
59 void (*panel_if_before_refresh)(struct sprdfb_device *dev);
60 void (*panel_if_after_refresh)(struct sprdfb_device *dev);
61 void (*panel_if_suspend)(struct sprdfb_device *dev);
62 void (*panel_if_resume)(struct sprdfb_device *dev);
66 struct sprdfb_device {
70 uint32_t mcu_timing[MCU_LCD_TIMING_KIND_MAX];
71 uint32_t rgb_timing[RGB_LCD_TIMING_KIND_MAX];
74 uint16_t panel_if_type; /*panel IF*/
75 struct panel_spec *panel;
76 struct panel_if_ctrl *if_ctrl;
77 struct display_ctrl *ctrl;
83 int32_t (*early_init) (struct sprdfb_device *dev);
84 int32_t (*init) (struct sprdfb_device *dev);
85 int32_t (*uninit) (struct sprdfb_device *dev);
87 int32_t (*refresh) (struct sprdfb_device *dev);