linux/drivers/staging/fbtft/fb_ili9325.c

// SPDX-License-Identifier: GPL-2.0+
/*
 * FB driver for the ILI9325 LCD Controller
 *
 * Copyright (C) 2013 Noralf Tronnes
 *
 * Based on ili9325.c by Jeroen Domburg
 */

#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/delay.h>

#include "fbtft.h"

#define DRVNAME
#define WIDTH
#define HEIGHT
#define BPP
#define FPS
#define DEFAULT_GAMMA

static unsigned int bt =; /* VGL=Vci*4 , VGH=Vci*4 */
module_param(bt, uint, 0000);
MODULE_PARM_DESC();

static unsigned int vc =; /* Vci1=Vci*0.80 */
module_param(vc, uint, 0000);
MODULE_PARM_DESC();

static unsigned int vrh =; /* VREG1OUT=Vci*1.85 */
module_param(vrh, uint, 0000);
MODULE_PARM_DESC();

static unsigned int vdv =; /* VCOMH amplitude=VREG1OUT*0.98 */
module_param(vdv, uint, 0000);
MODULE_PARM_DESC();

static unsigned int vcm =; /* VCOMH=VREG1OUT*0.735 */
module_param(vcm, uint, 0000);
MODULE_PARM_DESC();

/*
 * Verify that this configuration is within the Voltage limits
 *
 * Display module configuration: Vcc = IOVcc = Vci = 3.3V
 *
 * Voltages
 * ----------
 * Vci                                =   3.3
 * Vci1           =  Vci * 0.80       =   2.64
 * DDVDH          =  Vci1 * 2         =   5.28
 * VCL            = -Vci1             =  -2.64
 * VREG1OUT       =  Vci * 1.85       =   4.88
 * VCOMH          =  VREG1OUT * 0.735 =   3.59
 * VCOM amplitude =  VREG1OUT * 0.98  =   4.79
 * VGH            =  Vci * 4          =  13.2
 * VGL            = -Vci * 4          = -13.2
 *
 * Limits
 * --------
 * Power supplies
 * 1.65 < IOVcc < 3.30   =>  1.65 < 3.3 < 3.30
 * 2.40 < Vcc   < 3.30   =>  2.40 < 3.3 < 3.30
 * 2.50 < Vci   < 3.30   =>  2.50 < 3.3 < 3.30
 *
 * Source/VCOM power supply voltage
 *  4.50 < DDVDH < 6.0   =>  4.50 <  5.28 <  6.0
 * -3.0  < VCL   < -2.0  =>  -3.0 < -2.64 < -2.0
 * VCI - VCL < 6.0       =>  5.94 < 6.0
 *
 * Gate driver output voltage
 *  10  < VGH   < 20     =>   10 <  13.2  < 20
 * -15  < VGL   < -5     =>  -15 < -13.2  < -5
 * VGH - VGL < 32        =>   26.4 < 32
 *
 * VCOM driver output voltage
 * VCOMH - VCOML < 6.0   =>  4.79 < 6.0
 */

static int init_display(struct fbtft_par *par)
{}

static void set_addr_win(struct fbtft_par *par, int xs, int ys, int xe, int ye)
{}

static int set_var(struct fbtft_par *par)
{}

/*
 * Gamma string format:
 *  VRP0 VRP1 RP0 RP1 KP0 KP1 KP2 KP3 KP4 KP5
 *  VRN0 VRN1 RN0 RN1 KN0 KN1 KN2 KN3 KN4 KN5
 */
#define CURVE
static int set_gamma(struct fbtft_par *par, u32 *curves)
{}

#undef CURVE

static struct fbtft_display display =;

FBTFT_REGISTER_DRIVER();

MODULE_ALIAS();
MODULE_ALIAS();
MODULE_ALIAS();
MODULE_ALIAS();

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