Merge commit 'v2.6.34-rc6' into core/locking
[firefly-linux-kernel-4.4.55.git] / include / video / broadsheetfb.h
index a758534c02725fc01ec9f796adcc7e62923a464d..548d28f4ec67c8e5fc16cb252ab661f3eb5df073 100644 (file)
 #define BS_CMD_UPD_FULL                0x33
 #define BS_CMD_UPD_GDRV_CLR    0x37
 
+/* Broadsheet register interface defines */
+#define BS_REG_REV             0x00
+#define BS_REG_PRC             0x02
+
 /* Broadsheet pin interface specific defines */
 #define BS_CS  0x01
 #define BS_DC  0x02
 #define BS_WR  0x03
 
+/* Broadsheet IO interface specific defines */
+#define BS_MMIO_CMD    0x01
+#define BS_MMIO_DATA   0x02
+
 /* struct used by broadsheet. board specific stuff comes from *board */
 struct broadsheetfb_par {
        struct fb_info *info;
@@ -41,6 +49,8 @@ struct broadsheetfb_par {
        void (*write_reg)(struct broadsheetfb_par *, u16 reg, u16 val);
        u16 (*read_reg)(struct broadsheetfb_par *, u16 reg);
        wait_queue_head_t waitq;
+       int panel_index;
+       struct mutex io_lock;
 };
 
 /* board specific routines */
@@ -48,12 +58,17 @@ struct broadsheet_board {
        struct module *owner;
        int (*init)(struct broadsheetfb_par *);
        int (*wait_for_rdy)(struct broadsheetfb_par *);
-       void (*set_ctl)(struct broadsheetfb_par *, unsigned char, u8);
-       void (*set_hdb)(struct broadsheetfb_par *, u16);
-       u16 (*get_hdb)(struct broadsheetfb_par *);
        void (*cleanup)(struct broadsheetfb_par *);
        int (*get_panel_type)(void);
        int (*setup_irq)(struct fb_info *);
-};
 
+       /* Functions for boards that use GPIO */
+       void (*set_ctl)(struct broadsheetfb_par *, unsigned char, u8);
+       void (*set_hdb)(struct broadsheetfb_par *, u16);
+       u16 (*get_hdb)(struct broadsheetfb_par *);
+
+       /* Functions for boards that have specialized MMIO */
+       void (*mmio_write)(struct broadsheetfb_par *, int type, u16);
+       u16 (*mmio_read)(struct broadsheetfb_par *);
+};
 #endif