linux/drivers/gpu/drm/panel/panel-sitronix-st7789v.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (C) 2017 Free Electrons
 */

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

#include <video/mipi_display.h>
#include <linux/media-bus-format.h>

#include <drm/drm_device.h>
#include <drm/drm_modes.h>
#include <drm/drm_panel.h>

#define ST7789V_RAMCTRL_CMD
#define ST7789V_RAMCTRL_RM_RGB
#define ST7789V_RAMCTRL_DM_RGB
#define ST7789V_RAMCTRL_MAGIC
#define ST7789V_RAMCTRL_EPF(n)

#define ST7789V_RGBCTRL_CMD
#define ST7789V_RGBCTRL_WO
#define ST7789V_RGBCTRL_RCM(n)
#define ST7789V_RGBCTRL_VSYNC_HIGH
#define ST7789V_RGBCTRL_HSYNC_HIGH
#define ST7789V_RGBCTRL_PCLK_FALLING
#define ST7789V_RGBCTRL_DE_LOW
#define ST7789V_RGBCTRL_VBP(n)
#define ST7789V_RGBCTRL_HBP(n)

#define ST7789V_PORCTRL_CMD
#define ST7789V_PORCTRL_IDLE_BP(n)
#define ST7789V_PORCTRL_IDLE_FP(n)
#define ST7789V_PORCTRL_PARTIAL_BP(n)
#define ST7789V_PORCTRL_PARTIAL_FP(n)

#define ST7789V_GCTRL_CMD
#define ST7789V_GCTRL_VGHS(n)
#define ST7789V_GCTRL_VGLS(n)

#define ST7789V_VCOMS_CMD

#define ST7789V_LCMCTRL_CMD
#define ST7789V_LCMCTRL_XBGR
#define ST7789V_LCMCTRL_XMX
#define ST7789V_LCMCTRL_XMH

#define ST7789V_VDVVRHEN_CMD
#define ST7789V_VDVVRHEN_CMDEN

#define ST7789V_VRHS_CMD

#define ST7789V_VDVS_CMD

#define ST7789V_FRCTRL2_CMD

#define ST7789V_PWCTRL1_CMD
#define ST7789V_PWCTRL1_MAGIC
#define ST7789V_PWCTRL1_AVDD(n)
#define ST7789V_PWCTRL1_AVCL(n)
#define ST7789V_PWCTRL1_VDS(n)

#define ST7789V_PVGAMCTRL_CMD
#define ST7789V_PVGAMCTRL_JP0(n)
#define ST7789V_PVGAMCTRL_JP1(n)
#define ST7789V_PVGAMCTRL_VP0(n)
#define ST7789V_PVGAMCTRL_VP1(n)
#define ST7789V_PVGAMCTRL_VP2(n)
#define ST7789V_PVGAMCTRL_VP4(n)
#define ST7789V_PVGAMCTRL_VP6(n)
#define ST7789V_PVGAMCTRL_VP13(n)
#define ST7789V_PVGAMCTRL_VP20(n)
#define ST7789V_PVGAMCTRL_VP27(n)
#define ST7789V_PVGAMCTRL_VP36(n)
#define ST7789V_PVGAMCTRL_VP43(n)
#define ST7789V_PVGAMCTRL_VP50(n)
#define ST7789V_PVGAMCTRL_VP57(n)
#define ST7789V_PVGAMCTRL_VP59(n)
#define ST7789V_PVGAMCTRL_VP61(n)
#define ST7789V_PVGAMCTRL_VP62(n)
#define ST7789V_PVGAMCTRL_VP63(n)

#define ST7789V_NVGAMCTRL_CMD
#define ST7789V_NVGAMCTRL_JN0(n)
#define ST7789V_NVGAMCTRL_JN1(n)
#define ST7789V_NVGAMCTRL_VN0(n)
#define ST7789V_NVGAMCTRL_VN1(n)
#define ST7789V_NVGAMCTRL_VN2(n)
#define ST7789V_NVGAMCTRL_VN4(n)
#define ST7789V_NVGAMCTRL_VN6(n)
#define ST7789V_NVGAMCTRL_VN13(n)
#define ST7789V_NVGAMCTRL_VN20(n)
#define ST7789V_NVGAMCTRL_VN27(n)
#define ST7789V_NVGAMCTRL_VN36(n)
#define ST7789V_NVGAMCTRL_VN43(n)
#define ST7789V_NVGAMCTRL_VN50(n)
#define ST7789V_NVGAMCTRL_VN57(n)
#define ST7789V_NVGAMCTRL_VN59(n)
#define ST7789V_NVGAMCTRL_VN61(n)
#define ST7789V_NVGAMCTRL_VN62(n)
#define ST7789V_NVGAMCTRL_VN63(n)

#define ST7789V_TEST(val, func)

#define ST7789V_IDS
#define ST7789V_IDS_SIZE

struct st7789_panel_info {};

struct st7789v {};

enum st7789v_prefix {};

static inline struct st7789v *panel_to_st7789v(struct drm_panel *panel)
{}

static int st7789v_spi_write(struct st7789v *ctx, enum st7789v_prefix prefix,
			     u8 data)
{}

static int st7789v_write_command(struct st7789v *ctx, u8 cmd)
{}

static int st7789v_write_data(struct st7789v *ctx, u8 cmd)
{}

static int st7789v_read_data(struct st7789v *ctx, u8 cmd, u8 *buf,
			     unsigned int len)
{}

static int st7789v_check_id(struct drm_panel *panel)
{}

static const struct drm_display_mode default_mode =;

static const struct drm_display_mode t28cp45tn89_mode =;

static const struct drm_display_mode et028013dma_mode =;

static const struct drm_display_mode jt240mhqs_hwt_ek_e3_mode =;

static const struct st7789_panel_info default_panel =;

static const struct st7789_panel_info t28cp45tn89_panel =;

static const struct st7789_panel_info et028013dma_panel =;

static const struct st7789_panel_info jt240mhqs_hwt_ek_e3_panel =;

static int st7789v_get_modes(struct drm_panel *panel,
			     struct drm_connector *connector)
{}

static enum drm_panel_orientation st7789v_get_orientation(struct drm_panel *p)
{}

static int st7789v_prepare(struct drm_panel *panel)
{}

static int st7789v_enable(struct drm_panel *panel)
{}

static int st7789v_disable(struct drm_panel *panel)
{}

static int st7789v_unprepare(struct drm_panel *panel)
{}

static const struct drm_panel_funcs st7789v_drm_funcs =;

static int st7789v_probe(struct spi_device *spi)
{}

static void st7789v_remove(struct spi_device *spi)
{}

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

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

static struct spi_driver st7789v_driver =;
module_spi_driver();

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