linux/drivers/gpu/drm/tiny/ili9341.c

// SPDX-License-Identifier: GPL-2.0+
/*
 * DRM driver for Ilitek ILI9341 panels
 *
 * Copyright 2018 David Lechner <[email protected]>
 *
 * Based on mi0283qt.c:
 * Copyright 2016 Noralf Trønnes
 */

#include <linux/backlight.h>
#include <linux/delay.h>
#include <linux/gpio/consumer.h>
#include <linux/module.h>
#include <linux/property.h>
#include <linux/spi/spi.h>

#include <drm/drm_atomic_helper.h>
#include <drm/drm_drv.h>
#include <drm/drm_fbdev_dma.h>
#include <drm/drm_gem_atomic_helper.h>
#include <drm/drm_gem_dma_helper.h>
#include <drm/drm_managed.h>
#include <drm/drm_mipi_dbi.h>
#include <drm/drm_modeset_helper.h>
#include <video/mipi_display.h>

#define ILI9341_FRMCTR1
#define ILI9341_DISCTRL
#define ILI9341_ETMOD

#define ILI9341_PWCTRL1
#define ILI9341_PWCTRL2
#define ILI9341_VMCTRL1
#define ILI9341_VMCTRL2
#define ILI9341_PWCTRLA
#define ILI9341_PWCTRLB

#define ILI9341_PGAMCTRL
#define ILI9341_NGAMCTRL
#define ILI9341_DTCTRLA
#define ILI9341_DTCTRLB
#define ILI9341_PWRSEQ

#define ILI9341_EN3GAM
#define ILI9341_PUMPCTRL

#define ILI9341_MADCTL_BGR
#define ILI9341_MADCTL_MV
#define ILI9341_MADCTL_MX
#define ILI9341_MADCTL_MY

static void yx240qv29_enable(struct drm_simple_display_pipe *pipe,
			     struct drm_crtc_state *crtc_state,
			     struct drm_plane_state *plane_state)
{}

static const struct drm_simple_display_pipe_funcs ili9341_pipe_funcs =;

static const struct drm_display_mode yx240qv29_mode =;

DEFINE_DRM_GEM_DMA_FOPS(ili9341_fops);

static const struct drm_driver ili9341_driver =;

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

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

static int ili9341_probe(struct spi_device *spi)
{}

static void ili9341_remove(struct spi_device *spi)
{}

static void ili9341_shutdown(struct spi_device *spi)
{}

static struct spi_driver ili9341_spi_driver =;
module_spi_driver();

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