linux/drivers/gpu/drm/panel/panel-tpo-tpg110.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Panel driver for the TPO TPG110 400CH LTPS TFT LCD Single Chip
 * Digital Driver.
 *
 * This chip drives a TFT LCD, so it does not know what kind of
 * display is actually connected to it, so the width and height of that
 * display needs to be supplied from the machine configuration.
 *
 * Author:
 * Linus Walleij <[email protected]>
 */
#include <drm/drm_modes.h>
#include <drm/drm_panel.h>

#include <linux/bitops.h>
#include <linux/delay.h>
#include <linux/gpio/consumer.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/spi/spi.h>

#define TPG110_TEST
#define TPG110_CHIPID
#define TPG110_CTRL1
#define TPG110_RES_MASK
#define TPG110_RES_800X480
#define TPG110_RES_640X480
#define TPG110_RES_480X272
#define TPG110_RES_480X640
#define TPG110_RES_480X272_D
#define TPG110_RES_400X240_D
#define TPG110_CTRL2
#define TPG110_CTRL2_PM
#define TPG110_CTRL2_RES_PM_CTRL

/**
 * struct tpg110_panel_mode - lookup struct for the supported modes
 */
struct tpg110_panel_mode {};

/**
 * struct tpg110 - state container for the TPG110 panel
 */
struct tpg110 {};

/*
 * TPG110 modes, these are the simple modes, the dualscan modes that
 * take 400x240 or 480x272 in and display as 800x480 are not listed.
 */
static const struct tpg110_panel_mode tpg110_modes[] =;

static inline struct tpg110 *
to_tpg110(struct drm_panel *panel)
{}

static u8 tpg110_readwrite_reg(struct tpg110 *tpg, bool write,
			       u8 address, u8 outval)
{}

static u8 tpg110_read_reg(struct tpg110 *tpg, u8 address)
{}

static void tpg110_write_reg(struct tpg110 *tpg, u8 address, u8 outval)
{}

static int tpg110_startup(struct tpg110 *tpg)
{}

static int tpg110_disable(struct drm_panel *panel)
{}

static int tpg110_enable(struct drm_panel *panel)
{}

/**
 * tpg110_get_modes() - return the appropriate mode
 * @panel: the panel to get the mode for
 * @connector: reference to the central DRM connector control structure
 *
 * This currently does not present a forest of modes, instead it
 * presents the mode that is configured for the system under use,
 * and which is detected by reading the registers of the display.
 */
static int tpg110_get_modes(struct drm_panel *panel,
			    struct drm_connector *connector)
{}

static const struct drm_panel_funcs tpg110_drm_funcs =;

static int tpg110_probe(struct spi_device *spi)
{}

static void tpg110_remove(struct spi_device *spi)
{}

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

static const struct spi_device_id tpg110_ids[] =;
MODULE_DEVICE_TABLE(spi, tpg110_ids);

static struct spi_driver tpg110_driver =;
module_spi_driver();

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