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
25 #define AUOK190X_RESOLUTION_600_800 4
26 #define AUOK190X_RESOLUTION_768_1024 5
29 * struct used by auok190x. board specific stuff comes from *board
31 struct auok190xfb_par {
33 struct auok190x_board *board;
35 struct regulator *regulator;
38 struct delayed_work work;
39 wait_queue_head_t waitq;
42 int consecutive_threshold;
45 /* panel and controller informations */
53 /* individual controller callbacks */
54 void (*update_partial)(struct auok190xfb_par *par, u16 y1, u16 y2);
55 void (*update_all)(struct auok190xfb_par *par);
56 bool (*need_refresh)(struct auok190xfb_par *par);
57 void (*init)(struct auok190xfb_par *par);
58 void (*recover)(struct auok190xfb_par *par);
60 int update_mode; /* mode to use for updates */
61 int last_mode; /* update mode last used */
64 /* power management */
65 int autosuspend_delay;
71 * Board specific platform-data
72 * @init: initialize the controller interface
73 * @cleanup: cleanup the controller interface
74 * @wait_for_rdy: wait until the controller is not busy anymore
75 * @set_ctl: change an interface control
76 * @set_hdb: write a value to the data register
77 * @get_hdb: read a value from the data register
78 * @setup_irq: method to setup the irq handling on the busy gpio
79 * @gpio_nsleep: sleep gpio
80 * @gpio_nrst: reset gpio
81 * @gpio_nbusy: busy gpio
82 * @resolution: one of the AUOK190X_RESOLUTION constants
83 * @rotation: rotation of the framebuffer
84 * @quirks: controller quirks to honor
85 * @fps: frames per second for defio
87 struct auok190x_board {
88 int (*init)(struct auok190xfb_par *);
89 void (*cleanup)(struct auok190xfb_par *);
90 int (*wait_for_rdy)(struct auok190xfb_par *);
92 void (*set_ctl)(struct auok190xfb_par *, unsigned char, u8);
93 void (*set_hdb)(struct auok190xfb_par *, u16);
94 u16 (*get_hdb)(struct auok190xfb_par *);
96 int (*setup_irq)(struct fb_info *);