mipi_dsi: update mipi dsi framework driver

This commit is contained in:
hhb
2013-05-20 15:54:19 +08:00
parent 459e3a26c6
commit 30907a6bc2
2 changed files with 28 additions and 5 deletions

View File

@@ -61,7 +61,7 @@ EXPORT_SYMBOL(del_dsi_ops);
int dsi_probe_current_chip(void) {
int i = 0, id;
u32 i = 0, id;
struct mipi_dsi_ops *ops = NULL;
if(cur_dsi_ops)
return 0;
@@ -71,10 +71,10 @@ int dsi_probe_current_chip(void) {
id = ops->get_id();
if(id == ops->id) {
cur_dsi_ops = ops;
printk("load mipi dsi chip:%s id:%04x\n", ops->name, ops->id);
printk("load mipi dsi chip:%s id:%08x\n", ops->name, ops->id);
break;
} else {
printk("mipi dsi chip is not found, read id:%04x, but %04x is correct\n", id, ops->id);
printk("mipi dsi chip is not found, read id:%08x, but %08x is correct\n", id, ops->id);
dsi_ops[i] = NULL;
cur_dsi_ops = NULL;
}

View File

@@ -20,37 +20,59 @@
#define DTYPE_GEN_SWRITE_1P 0X13
#define DTYPE_GEN_SWRITE_0P 0X03
//Video Mode
#define VM_NBMWSP 0X00 //Non burst mode with sync pulses
#define VM_NBMWSE 0X01 //Non burst mode with sync events
#define VM_BM 0X02 //Burst mode
//Video Pixel Format
#define VPF_16BPP 0X00
#define VPF_18BPP 0X01 //packed
#define VPF_18BPPL 0X02 //loosely packed
#define VPF_24BPP 0X03
//iomux
#define OLD_RK_IOMUX 0
struct spi_t {
int cs;
#if OLD_RK_IOMUX
char* cs_mux_name;
#endif
int sck;
#if OLD_RK_IOMUX
char* sck_mux_name;
#endif
int miso;
#if OLD_RK_IOMUX
char* miso_mux_name;
#endif
int mosi;
#if OLD_RK_IOMUX
char* mosi_mux_name;
#endif
};
struct power_t {
int enable_pin; //gpio that control power
#if OLD_RK_IOMUX
char* mux_name;
u32 mux_mode;
#endif
u32 effect_value;
u32 min_voltage;
u32 max_voltage;
char *name;
u32 voltage;
int (*enable)(void *);
int (*disable)(void *);
};
struct reset_t {
int reset_pin; //gpio that control reset
#if OLD_RK_IOMUX
char* mux_name;
u32 mux_mode;
#endif
u32 effect_value;
u32 time_before_reset; //ms
@@ -76,6 +98,7 @@ struct tc358768_t {
struct ssd2828_t {
u32 id;
struct reset_t reset;
struct power_t shut;
struct power_t vddio;
struct power_t vdd_mipi;