Blame view

include/video/broadsheetfb.h 2.12 KB
0d4ff4df3   Jaya Kumar   [ARM] 5353/1: fbd...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
  /*
   * broadsheetfb.h - definitions for the broadsheet framebuffer driver
   *
   * Copyright (C) 2008 by Jaya Kumar
   *
   * This file is subject to the terms and conditions of the GNU General Public
   * License. See the file COPYING in the main directory of this archive for
   * more details.
   *
   */
  
  #ifndef _LINUX_BROADSHEETFB_H_
  #define _LINUX_BROADSHEETFB_H_
  
  /* Broadsheet command defines */
  #define BS_CMD_INIT_SYS_RUN	0x06
  #define BS_CMD_INIT_DSPE_CFG	0x09
  #define BS_CMD_INIT_DSPE_TMG	0x0A
  #define BS_CMD_INIT_ROTMODE	0x0B
  #define BS_CMD_RD_REG		0x10
  #define BS_CMD_WR_REG		0x11
  #define BS_CMD_LD_IMG		0x20
  #define BS_CMD_LD_IMG_AREA	0x22
  #define BS_CMD_LD_IMG_END	0x23
  #define BS_CMD_WAIT_DSPE_TRG	0x28
  #define BS_CMD_WAIT_DSPE_FREND	0x29
  #define BS_CMD_RD_WFM_INFO	0x30
  #define BS_CMD_UPD_INIT		0x32
  #define BS_CMD_UPD_FULL		0x33
  #define BS_CMD_UPD_GDRV_CLR	0x37
b32bfc384   Jaya Kumar   broadsheetfb: sup...
31
32
33
  /* Broadsheet register interface defines */
  #define BS_REG_REV		0x00
  #define BS_REG_PRC		0x02
0d4ff4df3   Jaya Kumar   [ARM] 5353/1: fbd...
34
35
36
37
  /* Broadsheet pin interface specific defines */
  #define BS_CS	0x01
  #define BS_DC 	0x02
  #define BS_WR 	0x03
2afb18981   Jaya Kumar   broadsheetfb: add...
38
39
40
  /* Broadsheet IO interface specific defines */
  #define BS_MMIO_CMD	0x01
  #define BS_MMIO_DATA	0x02
0d4ff4df3   Jaya Kumar   [ARM] 5353/1: fbd...
41
42
43
44
45
46
47
  /* struct used by broadsheet. board specific stuff comes from *board */
  struct broadsheetfb_par {
  	struct fb_info *info;
  	struct broadsheet_board *board;
  	void (*write_reg)(struct broadsheetfb_par *, u16 reg, u16 val);
  	u16 (*read_reg)(struct broadsheetfb_par *, u16 reg);
  	wait_queue_head_t waitq;
c1c341a06   Jaya Kumar   broadsheetfb: add...
48
  	int panel_index;
b32bfc384   Jaya Kumar   broadsheetfb: sup...
49
  	struct mutex io_lock;
0d4ff4df3   Jaya Kumar   [ARM] 5353/1: fbd...
50
51
52
53
54
55
56
  };
  
  /* board specific routines */
  struct broadsheet_board {
  	struct module *owner;
  	int (*init)(struct broadsheetfb_par *);
  	int (*wait_for_rdy)(struct broadsheetfb_par *);
0d4ff4df3   Jaya Kumar   [ARM] 5353/1: fbd...
57
58
59
  	void (*cleanup)(struct broadsheetfb_par *);
  	int (*get_panel_type)(void);
  	int (*setup_irq)(struct fb_info *);
0d4ff4df3   Jaya Kumar   [ARM] 5353/1: fbd...
60

2afb18981   Jaya Kumar   broadsheetfb: add...
61
62
63
64
65
66
67
68
69
  	/* 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 *);
  };
0d4ff4df3   Jaya Kumar   [ARM] 5353/1: fbd...
70
  #endif