2 * Definitions for AUO-K190X framebuffer drivers
4 * Copyright (C) 2012 Heiko Stuebner <heiko@sntech.de>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
11 #ifndef _LINUX_VIDEO_AUO_K190XFB_H_
12 #define _LINUX_VIDEO_AUO_K190XFB_H_
14 /* Controller standby command needs a param */
15 #define AUOK190X_QUIRK_STANDBYPARAM (1 << 0)
17 /* Controller standby is completely broken */
18 #define AUOK190X_QUIRK_STANDBYBROKEN (1 << 1)
21 * Resolutions for the displays
23 #define AUOK190X_RESOLUTION_800_600 0
24 #define AUOK190X_RESOLUTION_1024_768 1
27 * struct used by auok190x. board specific stuff comes from *board
29 struct auok190xfb_par
{
31 struct auok190x_board
*board
;
33 struct regulator
*regulator
;
36 struct delayed_work work
;
37 wait_queue_head_t waitq
;
40 int consecutive_threshold
;
43 /* panel and controller informations */
51 /* individual controller callbacks */
52 void (*update_partial
)(struct auok190xfb_par
*par
, u16 y1
, u16 y2
);
53 void (*update_all
)(struct auok190xfb_par
*par
);
54 bool (*need_refresh
)(struct auok190xfb_par
*par
);
55 void (*init
)(struct auok190xfb_par
*par
);
56 void (*recover
)(struct auok190xfb_par
*par
);
58 int update_mode
; /* mode to use for updates */
59 int last_mode
; /* update mode last used */
62 /* power management */
63 int autosuspend_delay
;
69 * Board specific platform-data
70 * @init: initialize the controller interface
71 * @cleanup: cleanup the controller interface
72 * @wait_for_rdy: wait until the controller is not busy anymore
73 * @set_ctl: change an interface control
74 * @set_hdb: write a value to the data register
75 * @get_hdb: read a value from the data register
76 * @setup_irq: method to setup the irq handling on the busy gpio
77 * @gpio_nsleep: sleep gpio
78 * @gpio_nrst: reset gpio
79 * @gpio_nbusy: busy gpio
80 * @resolution: one of the AUOK190X_RESOLUTION constants
81 * @rotation: rotation of the framebuffer
82 * @quirks: controller quirks to honor
83 * @fps: frames per second for defio
85 struct auok190x_board
{
86 int (*init
)(struct auok190xfb_par
*);
87 void (*cleanup
)(struct auok190xfb_par
*);
88 int (*wait_for_rdy
)(struct auok190xfb_par
*);
90 void (*set_ctl
)(struct auok190xfb_par
*, unsigned char, u8
);
91 void (*set_hdb
)(struct auok190xfb_par
*, u16
);
92 u16 (*get_hdb
)(struct auok190xfb_par
*);
94 int (*setup_irq
)(struct fb_info
*);