linux/drivers/video/fbdev/imxfb.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 *  Freescale i.MX Frame Buffer device driver
 *
 *  Copyright (C) 2004 Sascha Hauer, Pengutronix
 *   Based on acornfb.c Copyright (C) Russell King.
 *
 * Please direct your questions and comments on this driver to the following
 * email address:
 *
 *	[email protected]
 */

#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/string.h>
#include <linux/interrupt.h>
#include <linux/slab.h>
#include <linux/mm.h>
#include <linux/fb.h>
#include <linux/delay.h>
#include <linux/init.h>
#include <linux/ioport.h>
#include <linux/cpufreq.h>
#include <linux/clk.h>
#include <linux/platform_device.h>
#include <linux/dma-mapping.h>
#include <linux/io.h>
#include <linux/lcd.h>
#include <linux/math64.h>
#include <linux/of.h>
#include <linux/of_device.h>
#include <linux/bitfield.h>

#include <linux/regulator/consumer.h>

#include <video/of_display_timing.h>
#include <video/of_videomode.h>
#include <video/videomode.h>

struct imx_fb_videomode {};

/*
 * Complain if VAR is out of range.
 */
#define DEBUG_VAR

#define DRIVER_NAME

#define LCDC_SSA

#define LCDC_SIZE
#define SIZE_XMAX_MASK

#define YMAX_MASK_IMX1
#define YMAX_MASK_IMX21

#define LCDC_VPW
#define VPW_VPW_MASK

#define LCDC_CPOS
#define CPOS_CC1
#define CPOS_CC0
#define CPOS_OP
#define CPOS_CXP_MASK

#define LCDC_LCWHB
#define LCWHB_BK_EN
#define LCWHB_CW_MASK
#define LCWHB_CH_MASK
#define LCWHB_BD_MASK

#define LCDC_LCHCC

#define LCDC_PCR
#define PCR_TFT
#define PCR_COLOR
#define PCR_BPIX_MASK
#define PCR_BPIX_8
#define PCR_BPIX_12
#define PCR_BPIX_16
#define PCR_BPIX_18
#define PCR_PCD_MASK

#define LCDC_HCR
#define HCR_H_WIDTH_MASK
#define HCR_H_WAIT_1_MASK
#define HCR_H_WAIT_2_MASK

#define LCDC_VCR
#define VCR_V_WIDTH_MASK
#define VCR_V_WAIT_1_MASK
#define VCR_V_WAIT_2_MASK

#define LCDC_POS
#define POS_POS_MASK

#define LCDC_LSCR1
/* bit fields in imxfb.h */

#define LCDC_PWMR
/* bit fields in imxfb.h */

#define LCDC_DMACR
/* bit fields in imxfb.h */

#define LCDC_RMCR

#define RMCR_LCDC_EN_MX1

#define RMCR_SELF_REF

#define LCDC_LCDICR
#define LCDICR_INT_SYN
#define LCDICR_INT_CON

#define LCDC_LCDISR
#define LCDISR_UDR_ERR
#define LCDISR_ERR_RES
#define LCDISR_EOF
#define LCDISR_BOF

#define IMXFB_LSCR1_DEFAULT

#define LCDC_LAUSCR
#define LAUSCR_AUS_MODE

/* Used fb-mode. Can be set on kernel command line, therefore file-static. */
static const char *fb_mode;

/*
 * These are the bitfields for each
 * display depth that we support.
 */
struct imxfb_rgb {};

enum imxfb_type {};

enum imxfb_panel_type {};

struct imxfb_info {};

static const struct platform_device_id imxfb_devtype[] =;
MODULE_DEVICE_TABLE(platform, imxfb_devtype);

static const struct of_device_id imxfb_of_dev_id[] =;
MODULE_DEVICE_TABLE(of, imxfb_of_dev_id);

static inline int is_imx1_fb(struct imxfb_info *fbi)
{}

#define IMX_NAME

/*
 * Minimum X and Y resolutions
 */
#define MIN_XRES
#define MIN_YRES

/* Actually this really is 18bit support, the lowest 2 bits of each colour
 * are unused in hardware. We claim to have 24bit support to make software
 * like X work, which does not support 18bit.
 */
static struct imxfb_rgb def_rgb_18 =;

static struct imxfb_rgb def_rgb_16_tft =;

static struct imxfb_rgb def_rgb_16_stn =;

static struct imxfb_rgb def_rgb_8 =;

static int imxfb_activate_var(struct fb_var_screeninfo *var,
		struct fb_info *info);

static inline u_int chan_to_field(u_int chan, struct fb_bitfield *bf)
{}

static int imxfb_setpalettereg(u_int regno, u_int red, u_int green, u_int blue,
		u_int trans, struct fb_info *info)
{}

static int imxfb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
		   u_int trans, struct fb_info *info)
{}

static const struct imx_fb_videomode *imxfb_find_mode(struct imxfb_info *fbi)
{}

/*
 *  imxfb_check_var():
 *    Round up in the following order: bits_per_pixel, xres,
 *    yres, xres_virtual, yres_virtual, xoffset, yoffset, grayscale,
 *    bitfields, horizontal timing, vertical timing.
 */
static int imxfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
{}

/*
 * imxfb_set_par():
 *	Set the user defined part of the display for the specified console
 */
static int imxfb_set_par(struct fb_info *info)
{}

static int imxfb_enable_controller(struct imxfb_info *fbi)
{}

static void imxfb_disable_controller(struct imxfb_info *fbi)
{}

static int imxfb_blank(int blank, struct fb_info *info)
{}

static const struct fb_ops imxfb_ops =;

/*
 * imxfb_activate_var():
 *	Configures LCD Controller based on entries in var parameter.  Settings are
 *	only written to the controller if changes were made.
 */
static int imxfb_activate_var(struct fb_var_screeninfo *var, struct fb_info *info)
{}

static int imxfb_init_fbinfo(struct platform_device *pdev)
{}

static int imxfb_of_read_mode(struct device *dev, struct device_node *np,
		struct imx_fb_videomode *imxfb_mode)
{}

static int imxfb_lcd_check_fb(struct lcd_device *lcddev, struct fb_info *fi)
{}

static int imxfb_lcd_get_contrast(struct lcd_device *lcddev)
{}

static int imxfb_lcd_set_contrast(struct lcd_device *lcddev, int contrast)
{}

static int imxfb_lcd_get_power(struct lcd_device *lcddev)
{}

static int imxfb_regulator_set(struct imxfb_info *fbi, int enable)
{}

static int imxfb_lcd_set_power(struct lcd_device *lcddev, int power)
{}

static const struct lcd_ops imxfb_lcd_ops =;

static int imxfb_setup(void)
{}

static int imxfb_probe(struct platform_device *pdev)
{}

static void imxfb_remove(struct platform_device *pdev)
{}

static int imxfb_suspend(struct device *dev)
{}

static int imxfb_resume(struct device *dev)
{}

static DEFINE_SIMPLE_DEV_PM_OPS(imxfb_pm_ops, imxfb_suspend, imxfb_resume);

static struct platform_driver imxfb_driver =;
module_platform_driver();

MODULE_DESCRIPTION();
MODULE_AUTHOR();
MODULE_LICENSE();