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

// SPDX-License-Identifier: GPL-2.0+
/*
 * Copyright (C) 2019, Amarula Solutions.
 * Author: Jagan Teki <[email protected]>
 */

#include <drm/drm_mipi_dbi.h>
#include <drm/drm_mipi_dsi.h>
#include <drm/drm_modes.h>
#include <drm/drm_panel.h>

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

#include <video/mipi_display.h>

/* Command2 BKx selection command */
#define ST7701_CMD2BKX_SEL
#define ST7701_CMD1
#define ST7701_CMD2
#define ST7701_CMD2BK_MASK

/* Command2, BK0 commands */
#define ST7701_CMD2_BK0_PVGAMCTRL
#define ST7701_CMD2_BK0_NVGAMCTRL
#define ST7701_CMD2_BK0_LNESET
#define ST7701_CMD2_BK0_PORCTRL
#define ST7701_CMD2_BK0_INVSEL

/* Command2, BK1 commands */
#define ST7701_CMD2_BK1_VRHS
#define ST7701_CMD2_BK1_VCOM
#define ST7701_CMD2_BK1_VGHSS
#define ST7701_CMD2_BK1_TESTCMD
#define ST7701_CMD2_BK1_VGLS
#define ST7701_CMD2_BK1_PWCTLR1
#define ST7701_CMD2_BK1_PWCTLR2
#define ST7701_CMD2_BK1_SPD1
#define ST7701_CMD2_BK1_SPD2
#define ST7701_CMD2_BK1_MIPISET1

/* Command2, BK0 bytes */
#define ST7701_CMD2_BK0_GAMCTRL_AJ_MASK
#define ST7701_CMD2_BK0_GAMCTRL_VC0_MASK
#define ST7701_CMD2_BK0_GAMCTRL_VC4_MASK
#define ST7701_CMD2_BK0_GAMCTRL_VC8_MASK
#define ST7701_CMD2_BK0_GAMCTRL_VC16_MASK
#define ST7701_CMD2_BK0_GAMCTRL_VC24_MASK
#define ST7701_CMD2_BK0_GAMCTRL_VC52_MASK
#define ST7701_CMD2_BK0_GAMCTRL_VC80_MASK
#define ST7701_CMD2_BK0_GAMCTRL_VC108_MASK
#define ST7701_CMD2_BK0_GAMCTRL_VC147_MASK
#define ST7701_CMD2_BK0_GAMCTRL_VC175_MASK
#define ST7701_CMD2_BK0_GAMCTRL_VC203_MASK
#define ST7701_CMD2_BK0_GAMCTRL_VC231_MASK
#define ST7701_CMD2_BK0_GAMCTRL_VC239_MASK
#define ST7701_CMD2_BK0_GAMCTRL_VC247_MASK
#define ST7701_CMD2_BK0_GAMCTRL_VC251_MASK
#define ST7701_CMD2_BK0_GAMCTRL_VC255_MASK
#define ST7701_CMD2_BK0_LNESET_LINE_MASK
#define ST7701_CMD2_BK0_LNESET_LDE_EN
#define ST7701_CMD2_BK0_LNESET_LINEDELTA
#define ST7701_CMD2_BK0_PORCTRL_VBP_MASK
#define ST7701_CMD2_BK0_PORCTRL_VFP_MASK
#define ST7701_CMD2_BK0_INVSEL_ONES_MASK
#define ST7701_CMD2_BK0_INVSEL_NLINV_MASK
#define ST7701_CMD2_BK0_INVSEL_RTNI_MASK

/* Command2, BK1 bytes */
#define ST7701_CMD2_BK1_VRHA_MASK
#define ST7701_CMD2_BK1_VCOM_MASK
#define ST7701_CMD2_BK1_VGHSS_MASK
#define ST7701_CMD2_BK1_TESTCMD_VAL
#define ST7701_CMD2_BK1_VGLS_ONES
#define ST7701_CMD2_BK1_VGLS_MASK
#define ST7701_CMD2_BK1_PWRCTRL1_AP_MASK
#define ST7701_CMD2_BK1_PWRCTRL1_APIS_MASK
#define ST7701_CMD2_BK1_PWRCTRL1_APOS_MASK
#define ST7701_CMD2_BK1_PWRCTRL2_AVDD_MASK
#define ST7701_CMD2_BK1_PWRCTRL2_AVCL_MASK
#define ST7701_CMD2_BK1_SPD1_ONES_MASK
#define ST7701_CMD2_BK1_SPD1_T2D_MASK
#define ST7701_CMD2_BK1_SPD2_ONES_MASK
#define ST7701_CMD2_BK1_SPD2_T3D_MASK
#define ST7701_CMD2_BK1_MIPISET1_ONES
#define ST7701_CMD2_BK1_MIPISET1_EOT_EN

#define CFIELD_PREP(_mask, _val)

enum op_bias {};

struct st7701;

struct st7701_panel_desc {};

struct st7701 {};

static inline struct st7701 *panel_to_st7701(struct drm_panel *panel)
{}

static int st7701_dsi_write(struct st7701 *st7701, u8 cmd, const u8 *seq,
			    size_t len)
{}

static int st7701_dbi_write(struct st7701 *st7701, u8 cmd, const u8 *seq,
			    size_t len)
{}

#define ST7701_WRITE(st7701, cmd, seq...)

static u8 st7701_vgls_map(struct st7701 *st7701)
{}

static void st7701_switch_cmd_bkx(struct st7701 *st7701, bool cmd2, u8 bkx)
{}

static void st7701_init_sequence(struct st7701 *st7701)
{}

static void ts8550b_gip_sequence(struct st7701 *st7701)
{}

static void dmt028vghmcmi_1a_gip_sequence(struct st7701 *st7701)
{}

static void kd50t048a_gip_sequence(struct st7701 *st7701)
{}

static void rg_arc_gip_sequence(struct st7701 *st7701)
{}

static void rg28xx_gip_sequence(struct st7701 *st7701)
{}

static int st7701_prepare(struct drm_panel *panel)
{}

static int st7701_enable(struct drm_panel *panel)
{}

static int st7701_disable(struct drm_panel *panel)
{}

static int st7701_unprepare(struct drm_panel *panel)
{}

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

static enum drm_panel_orientation st7701_get_orientation(struct drm_panel *panel)
{}

static const struct drm_panel_funcs st7701_funcs =;

static const struct drm_display_mode ts8550b_mode =;

static const struct st7701_panel_desc ts8550b_desc =;

static const struct drm_display_mode dmt028vghmcmi_1a_mode =;

static const struct st7701_panel_desc dmt028vghmcmi_1a_desc =;

static const struct drm_display_mode kd50t048a_mode =;

static const struct st7701_panel_desc kd50t048a_desc =;

static const struct drm_display_mode rg_arc_mode =;

static const struct st7701_panel_desc rg_arc_desc =;

static const struct drm_display_mode rg28xx_mode =;

static const struct st7701_panel_desc rg28xx_desc =;

static void st7701_cleanup(void *data)
{}

static int st7701_probe(struct device *dev, int connector_type)
{}

static int st7701_dsi_probe(struct mipi_dsi_device *dsi)
{}

static int st7701_spi_probe(struct spi_device *spi)
{}

static void st7701_dsi_remove(struct mipi_dsi_device *dsi)
{}

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

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

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

static struct mipi_dsi_driver st7701_dsi_driver =;

static struct spi_driver st7701_spi_driver =;

static int __init st7701_driver_init(void)
{}
module_init();

static void __exit st7701_driver_exit(void)
{}
module_exit(st7701_driver_exit);

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