#include <linux/aperture.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/string.h>
#include <linux/mm.h>
#include <linux/delay.h>
#include <linux/fb.h>
#include <linux/ioport.h>
#include <linux/init.h>
#include <linux/platform_device.h>
#include <linux/screen_info.h>
#include <asm/io.h>
#include <video/vga.h>
#define MODE_SKIP4 …
#define MODE_8BPP …
#define MODE_CFB …
#define MODE_TEXT …
struct vga16fb_par { … };
static struct fb_var_screeninfo vga16fb_defined = …;
static const struct fb_fix_screeninfo vga16fb_fix = …;
static inline void rmw(volatile char __iomem *p)
{ … }
static inline int setmode(int mode)
{ … }
static inline int selectmask(void)
{ … }
static inline void setmask(int mask)
{ … }
static inline int setop(int op)
{ … }
static inline int setsr(int sr)
{ … }
static inline int setcolor(int color)
{ … }
static inline int getindex(void)
{ … }
static inline void setindex(int index)
{ … }
static inline int check_mode_supported(const struct screen_info *si)
{ … }
static void vga16fb_pan_var(struct fb_info *info,
struct fb_var_screeninfo *var)
{ … }
static void vga16fb_update_fix(struct fb_info *info)
{ … }
static void vga16fb_clock_chip(struct vga16fb_par *par,
unsigned int *pixclock,
const struct fb_info *info,
int mul, int div)
{ … }
#define FAIL …
static int vga16fb_open(struct fb_info *info, int user)
{ … }
static int vga16fb_release(struct fb_info *info, int user)
{ … }
static int vga16fb_check_var(struct fb_var_screeninfo *var,
struct fb_info *info)
{ … }
#undef FAIL
static int vga16fb_set_par(struct fb_info *info)
{ … }
static void ega16_setpalette(int regno, unsigned red, unsigned green, unsigned blue)
{ … }
static void vga16_setpalette(int regno, unsigned red, unsigned green, unsigned blue)
{ … }
static int vga16fb_setcolreg(unsigned regno, unsigned red, unsigned green,
unsigned blue, unsigned transp,
struct fb_info *info)
{ … }
static int vga16fb_pan_display(struct fb_var_screeninfo *var,
struct fb_info *info)
{ … }
static void vga_vesa_blank(struct vga16fb_par *par, int mode)
{ … }
static void vga_vesa_unblank(struct vga16fb_par *par)
{ … }
static void vga_pal_blank(void)
{ … }
static int vga16fb_blank(int blank, struct fb_info *info)
{ … }
static void vga_8planes_fillrect(struct fb_info *info, const struct fb_fillrect *rect)
{ … }
static void vga16fb_fillrect(struct fb_info *info, const struct fb_fillrect *rect)
{ … }
static void vga_8planes_copyarea(struct fb_info *info, const struct fb_copyarea *area)
{ … }
static void vga16fb_copyarea(struct fb_info *info, const struct fb_copyarea *area)
{ … }
#define TRANS_MASK_LOW …
#define TRANS_MASK_HIGH …
#if defined(__LITTLE_ENDIAN)
static const u16 transl_l[] = …;
static const u16 transl_h[] = …;
#elif defined(__BIG_ENDIAN)
static const u16 transl_l[] = TRANS_MASK_HIGH;
static const u16 transl_h[] = TRANS_MASK_LOW;
#else
#error "Only __BIG_ENDIAN and __LITTLE_ENDIAN are supported in vga-planes"
#endif
static void vga_8planes_imageblit(struct fb_info *info, const struct fb_image *image)
{ … }
static void vga_imageblit_expand(struct fb_info *info, const struct fb_image *image)
{ … }
static void vga_imageblit_color(struct fb_info *info, const struct fb_image *image)
{ … }
static void vga16fb_imageblit(struct fb_info *info, const struct fb_image *image)
{ … }
static void vga16fb_destroy(struct fb_info *info)
{ … }
static const struct fb_ops vga16fb_ops = …;
static int vga16fb_probe(struct platform_device *dev)
{ … }
static void vga16fb_remove(struct platform_device *dev)
{ … }
static const struct platform_device_id vga16fb_driver_id_table[] = …;
MODULE_DEVICE_TABLE(platform, vga16fb_driver_id_table);
static struct platform_driver vga16fb_driver = …;
module_platform_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;