mipi_dsi: update mipi dsi framework driver
authorhhb <hhb@rock-chips.com>
Mon, 20 May 2013 07:54:19 +0000 (15:54 +0800)
committerhhb <hhb@rock-chips.com>
Mon, 20 May 2013 07:54:19 +0000 (15:54 +0800)
drivers/video/display/transmitter/mipi_dsi.c
drivers/video/display/transmitter/mipi_dsi.h

index cc9d538d8a198a17d4eb01e13f4b84f5d0f8bcf0..e14fd2a1800a56bb5446af662bde7a239c0b6e8b 100644 (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;
                        }
index 831427af94ad97d192dbf0f27de85e816a034063..b0d54f8035396f69a9b42d38cdf3b23a65c050b4 100644 (file)
 #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;