Merge tag 'for-linus-20171120' of git://git.infradead.org/linux-mtd
[sfrench/cifs-2.6.git] / include / linux / platform_data / video_s3c.h
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __PLATFORM_DATA_VIDEO_S3C
3 #define __PLATFORM_DATA_VIDEO_S3C
4
5 /* S3C_FB_MAX_WIN
6  * Set to the maximum number of windows that any of the supported hardware
7  * can use. Since the platform data uses this for an array size, having it
8  * set to the maximum of any version of the hardware can do is safe.
9  */
10 #define S3C_FB_MAX_WIN  (5)
11
12 /**
13  * struct s3c_fb_pd_win - per window setup data
14  * @xres     : The window X size.
15  * @yres     : The window Y size.
16  * @virtual_x: The virtual X size.
17  * @virtual_y: The virtual Y size.
18  */
19 struct s3c_fb_pd_win {
20         unsigned short          default_bpp;
21         unsigned short          max_bpp;
22         unsigned short          xres;
23         unsigned short          yres;
24         unsigned short          virtual_x;
25         unsigned short          virtual_y;
26 };
27
28 /**
29  * struct s3c_fb_platdata -  S3C driver platform specific information
30  * @setup_gpio: Setup the external GPIO pins to the right state to transfer
31  *              the data from the display system to the connected display
32  *              device.
33  * @vidcon0: The base vidcon0 values to control the panel data format.
34  * @vidcon1: The base vidcon1 values to control the panel data output.
35  * @vtiming: Video timing when connected to a RGB type panel.
36  * @win: The setup data for each hardware window, or NULL for unused.
37  * @display_mode: The LCD output display mode.
38  *
39  * The platform data supplies the video driver with all the information
40  * it requires to work with the display(s) attached to the machine. It
41  * controls the initial mode, the number of display windows (0 is always
42  * the base framebuffer) that are initialised etc.
43  *
44  */
45 struct s3c_fb_platdata {
46         void    (*setup_gpio)(void);
47
48         struct s3c_fb_pd_win    *win[S3C_FB_MAX_WIN];
49         struct fb_videomode     *vtiming;
50
51         u32                      vidcon0;
52         u32                      vidcon1;
53 };
54
55 #endif