2 * metronomefb.h - definitions for the metronome framebuffer driver
4 * Copyright (C) 2008 by Jaya Kumar
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
12 #ifndef _LINUX_METRONOMEFB_H_
13 #define _LINUX_METRONOMEFB_H_
15 /* command structure used by metronome controller */
20 } __attribute__((packed
));
24 /* struct used by metronome. board specific stuff comes from *board */
25 struct metronomefb_par
{
26 struct metromem_cmd
*metromem_cmd
;
27 unsigned char *metromem_wfm
;
28 unsigned char *metromem_img
;
29 u16
*metromem_img_csum
;
31 dma_addr_t metromem_dma
;
32 const struct firmware
*firmware
;
34 struct metronome_board
*board
;
35 struct platform_device
*pdev
;
36 wait_queue_head_t waitq
;
41 unsigned int manual_refresh_threshold
;
42 unsigned int partial_autorefresh_interval
;
43 const struct epd_frame
*epd_frame
;
47 unsigned int partial_updates_count
;
48 unsigned is_first_update
:1;
53 #define METRONOME_POWER_OFF 0
54 #define METRONOME_POWER_ON 1
56 /* board specific routines and data */
57 struct metronome_board
{
58 struct module
*owner
; /* the platform device */
59 void (*power_ctl
)(struct metronomefb_par
*, int);
60 void (*set_rst
)(struct metronomefb_par
*, int);
61 void (*set_stdby
)(struct metronomefb_par
*, int);
62 int (*get_err
)(struct metronomefb_par
*);
63 int (*get_rdy
)(struct metronomefb_par
*);
64 void (*cleanup
)(struct metronomefb_par
*);
65 int (*met_wait_event
)(struct metronomefb_par
*);
66 int (*met_wait_event_intr
)(struct metronomefb_par
*);
67 int (*setup_irq
)(struct fb_info
*);
68 int (*setup_fb
)(struct metronomefb_par
*);
69 int (*setup_io
)(struct metronomefb_par
*);
70 int (*get_panel_type
)(void);