#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 <video/mipi_display.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>
#define ILI9486_ITFCTR1 …
#define ILI9486_PWCTRL1 …
#define ILI9486_VMCTRL1 …
#define ILI9486_PGAMCTRL …
#define ILI9486_NGAMCTRL …
#define ILI9486_DGAMCTRL …
#define ILI9486_MADCTL_BGR …
#define ILI9486_MADCTL_MV …
#define ILI9486_MADCTL_MX …
#define ILI9486_MADCTL_MY …
static int waveshare_command(struct mipi_dbi *mipi, u8 *cmd, u8 *par,
size_t num)
{ … }
static void waveshare_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 waveshare_pipe_funcs = …;
static const struct drm_display_mode waveshare_mode = …;
DEFINE_DRM_GEM_DMA_FOPS(ili9486_fops);
static const struct drm_driver ili9486_driver = …;
static const struct of_device_id ili9486_of_match[] = …;
MODULE_DEVICE_TABLE(of, ili9486_of_match);
static const struct spi_device_id ili9486_id[] = …;
MODULE_DEVICE_TABLE(spi, ili9486_id);
static int ili9486_probe(struct spi_device *spi)
{ … }
static void ili9486_remove(struct spi_device *spi)
{ … }
static void ili9486_shutdown(struct spi_device *spi)
{ … }
static struct spi_driver ili9486_spi_driver = …;
module_spi_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;