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

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * DRM driver for Ilitek ILI9225 panels
 *
 * Copyright 2017 David Lechner <[email protected]>
 *
 * Some code copied from mipi-dbi.c
 * Copyright 2016 Noralf Trønnes
 */

#include <linux/delay.h>
#include <linux/dma-buf.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_damage_helper.h>
#include <drm/drm_drv.h>
#include <drm/drm_fb_dma_helper.h>
#include <drm/drm_fbdev_dma.h>
#include <drm/drm_fourcc.h>
#include <drm/drm_framebuffer.h>
#include <drm/drm_gem_atomic_helper.h>
#include <drm/drm_gem_dma_helper.h>
#include <drm/drm_gem_framebuffer_helper.h>
#include <drm/drm_managed.h>
#include <drm/drm_mipi_dbi.h>
#include <drm/drm_rect.h>

#define ILI9225_DRIVER_READ_CODE
#define ILI9225_DRIVER_OUTPUT_CONTROL
#define ILI9225_LCD_AC_DRIVING_CONTROL
#define ILI9225_ENTRY_MODE
#define ILI9225_DISPLAY_CONTROL_1
#define ILI9225_BLANK_PERIOD_CONTROL_1
#define ILI9225_FRAME_CYCLE_CONTROL
#define ILI9225_INTERFACE_CONTROL
#define ILI9225_OSCILLATION_CONTROL
#define ILI9225_POWER_CONTROL_1
#define ILI9225_POWER_CONTROL_2
#define ILI9225_POWER_CONTROL_3
#define ILI9225_POWER_CONTROL_4
#define ILI9225_POWER_CONTROL_5
#define ILI9225_VCI_RECYCLING
#define ILI9225_RAM_ADDRESS_SET_1
#define ILI9225_RAM_ADDRESS_SET_2
#define ILI9225_WRITE_DATA_TO_GRAM
#define ILI9225_SOFTWARE_RESET
#define ILI9225_GATE_SCAN_CONTROL
#define ILI9225_VERTICAL_SCROLL_1
#define ILI9225_VERTICAL_SCROLL_2
#define ILI9225_VERTICAL_SCROLL_3
#define ILI9225_PARTIAL_DRIVING_POS_1
#define ILI9225_PARTIAL_DRIVING_POS_2
#define ILI9225_HORIZ_WINDOW_ADDR_1
#define ILI9225_HORIZ_WINDOW_ADDR_2
#define ILI9225_VERT_WINDOW_ADDR_1
#define ILI9225_VERT_WINDOW_ADDR_2
#define ILI9225_GAMMA_CONTROL_1
#define ILI9225_GAMMA_CONTROL_2
#define ILI9225_GAMMA_CONTROL_3
#define ILI9225_GAMMA_CONTROL_4
#define ILI9225_GAMMA_CONTROL_5
#define ILI9225_GAMMA_CONTROL_6
#define ILI9225_GAMMA_CONTROL_7
#define ILI9225_GAMMA_CONTROL_8
#define ILI9225_GAMMA_CONTROL_9
#define ILI9225_GAMMA_CONTROL_10

static inline int ili9225_command(struct mipi_dbi *dbi, u8 cmd, u16 data)
{}

static void ili9225_fb_dirty(struct iosys_map *src, struct drm_framebuffer *fb,
			     struct drm_rect *rect, struct drm_format_conv_state *fmtcnv_state)
{}

static void ili9225_pipe_update(struct drm_simple_display_pipe *pipe,
				struct drm_plane_state *old_state)
{}

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

static void ili9225_pipe_disable(struct drm_simple_display_pipe *pipe)
{}

static int ili9225_dbi_command(struct mipi_dbi *dbi, u8 *cmd, u8 *par,
			       size_t num)
{}

static const struct drm_simple_display_pipe_funcs ili9225_pipe_funcs =;

static const struct drm_display_mode ili9225_mode =;

DEFINE_DRM_GEM_DMA_FOPS(ili9225_fops);

static const struct drm_driver ili9225_driver =;

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

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

static int ili9225_probe(struct spi_device *spi)
{}

static void ili9225_remove(struct spi_device *spi)
{}

static void ili9225_shutdown(struct spi_device *spi)
{}

static struct spi_driver ili9225_spi_driver =;
module_spi_driver();

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