Add support for the n516
[openwrt/staging/wigyori.git] / target / linux / xburst / files-2.6.32 / include / video / metronomefb.h
1 /*
2 * metronomefb.h - definitions for the metronome framebuffer driver
3 *
4 * Copyright (C) 2008 by Jaya Kumar
5 *
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file COPYING in the main directory of this archive for
8 * more details.
9 *
10 */
11
12 #ifndef _LINUX_METRONOMEFB_H_
13 #define _LINUX_METRONOMEFB_H_
14
15 /* command structure used by metronome controller */
16 struct metromem_cmd {
17 u16 opcode;
18 u16 args[((64-2)/2)];
19 u16 csum;
20 } __attribute__(packed);
21
22 /* struct used by metronome. board specific stuff comes from *board */
23 struct metronomefb_par {
24 struct metromem_cmd *metromem_cmd;
25 unsigned char *metromem_wfm;
26 unsigned char *metromem_img;
27 u16 *metromem_img_csum;
28 u16 *csum_table;
29 dma_addr_t metromem_dma;
30 const struct firmware *firmware;
31 struct fb_info *info;
32 struct metronome_board *board;
33 struct platform_device *pdev;
34 wait_queue_head_t waitq;
35 u8 frame_count;
36 int extra_size;
37 int current_wf_mode;
38 int current_wf_temp;
39 unsigned int manual_refresh_threshold;
40 unsigned int partial_autorefresh_interval;
41 int dt;
42 u32 *fxbuckets;
43 u32 *fybuckets;
44 struct mutex lock;
45 };
46
47 #define METRONOME_POWER_OFF 0
48 #define METRONOME_POWER_ON 1
49
50 /* board specific routines and data */
51 struct metronome_board {
52 struct module *owner; /* the platform device */
53 void (*power_ctl)(struct metronomefb_par *, int);
54 void (*set_rst)(struct metronomefb_par *, int);
55 void (*set_stdby)(struct metronomefb_par *, int);
56 int (*get_err)(struct metronomefb_par *);
57 int (*get_rdy)(struct metronomefb_par *);
58 void (*cleanup)(struct metronomefb_par *);
59 int (*met_wait_event)(struct metronomefb_par *);
60 int (*met_wait_event_intr)(struct metronomefb_par *);
61 int (*setup_irq)(struct fb_info *);
62 int (*setup_fb)(struct metronomefb_par *);
63 int (*setup_io)(struct metronomefb_par *);
64 int (*get_panel_type)(void);
65 };
66
67 #endif