#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 { … };
struct tpg110 { … };
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)
{ … }
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(…) …;