linux/drivers/gpu/drm/panel/panel-samsung-s6e8aa0.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * MIPI-DSI based s6e8aa0 AMOLED LCD 5.3 inch panel driver.
 *
 * Copyright (c) 2013 Samsung Electronics Co., Ltd
 *
 * Inki Dae, <[email protected]>
 * Donghwa Lee, <[email protected]>
 * Joongmock Shin <[email protected]>
 * Eunchul Kim <[email protected]>
 * Tomasz Figa <[email protected]>
 * Andrzej Hajda <[email protected]>
*/

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

#include <video/mipi_display.h>
#include <video/of_videomode.h>
#include <video/videomode.h>

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

#define LDI_MTP_LENGTH
#define GAMMA_LEVEL_NUM
#define GAMMA_TABLE_LEN

#define PANELCTL_SS_MASK
#define PANELCTL_SS_1_800
#define PANELCTL_SS_800_1
#define PANELCTL_GTCON_MASK
#define PANELCTL_GTCON_110
#define PANELCTL_GTCON_111

#define PANELCTL_CLK1_CON_MASK
#define PANELCTL_CLK1_000
#define PANELCTL_CLK1_001
#define PANELCTL_CLK2_CON_MASK
#define PANELCTL_CLK2_000
#define PANELCTL_CLK2_001

#define PANELCTL_INT1_CON_MASK
#define PANELCTL_INT1_000
#define PANELCTL_INT1_001
#define PANELCTL_INT2_CON_MASK
#define PANELCTL_INT2_000
#define PANELCTL_INT2_001

#define PANELCTL_BICTL_CON_MASK
#define PANELCTL_BICTL_000
#define PANELCTL_BICTL_001
#define PANELCTL_BICTLB_CON_MASK
#define PANELCTL_BICTLB_000
#define PANELCTL_BICTLB_001

#define PANELCTL_EM_CLK1_CON_MASK
#define PANELCTL_EM_CLK1_110
#define PANELCTL_EM_CLK1_111
#define PANELCTL_EM_CLK1B_CON_MASK
#define PANELCTL_EM_CLK1B_110
#define PANELCTL_EM_CLK1B_111

#define PANELCTL_EM_CLK2_CON_MASK
#define PANELCTL_EM_CLK2_110
#define PANELCTL_EM_CLK2_111
#define PANELCTL_EM_CLK2B_CON_MASK
#define PANELCTL_EM_CLK2B_110
#define PANELCTL_EM_CLK2B_111

#define PANELCTL_EM_INT1_CON_MASK
#define PANELCTL_EM_INT1_000
#define PANELCTL_EM_INT1_001
#define PANELCTL_EM_INT2_CON_MASK
#define PANELCTL_EM_INT2_000
#define PANELCTL_EM_INT2_001

#define AID_DISABLE
#define AID_1
#define AID_2
#define AID_3

s6e8aa0_gamma_table;

struct s6e8aa0_variant {};

struct s6e8aa0 {};

static inline struct s6e8aa0 *panel_to_s6e8aa0(struct drm_panel *panel)
{}

static int s6e8aa0_clear_error(struct s6e8aa0 *ctx)
{}

static void s6e8aa0_dcs_write(struct s6e8aa0 *ctx, const void *data, size_t len)
{}

static int s6e8aa0_dcs_read(struct s6e8aa0 *ctx, u8 cmd, void *data, size_t len)
{}

#define s6e8aa0_dcs_write_seq(ctx, seq...)

#define s6e8aa0_dcs_write_seq_static(ctx, seq...)

static void s6e8aa0_apply_level_1_key(struct s6e8aa0 *ctx)
{}

static void s6e8aa0_panel_cond_set_v142(struct s6e8aa0 *ctx)
{}

static void s6e8aa0_panel_cond_set(struct s6e8aa0 *ctx)
{}

static void s6e8aa0_display_condition_set(struct s6e8aa0 *ctx)
{}

static void s6e8aa0_etc_source_control(struct s6e8aa0 *ctx)
{}

static void s6e8aa0_etc_pentile_control(struct s6e8aa0 *ctx)
{}

static void s6e8aa0_etc_power_control(struct s6e8aa0 *ctx)
{}

static void s6e8aa0_etc_elvss_control(struct s6e8aa0 *ctx)
{}

static void s6e8aa0_elvss_nvm_set_v142(struct s6e8aa0 *ctx)
{}

static void s6e8aa0_elvss_nvm_set(struct s6e8aa0 *ctx)
{
	if (ctx->version < 142)
		s6e8aa0_dcs_write_seq_static(ctx,
			0xd9, 0x14, 0x40, 0x0c, 0xcb, 0xce, 0x6e, 0xc4, 0x07,
			0x40, 0x41, 0xc1, 0x00, 0x60, 0x19);
	else
		s6e8aa0_elvss_nvm_set_v142(ctx);
};

static void s6e8aa0_apply_level_2_key(struct s6e8aa0 *ctx)
{}

static const s6e8aa0_gamma_table s6e8aa0_gamma_tables_v142[GAMMA_LEVEL_NUM] =;

static const s6e8aa0_gamma_table s6e8aa0_gamma_tables_v96[GAMMA_LEVEL_NUM] =;

static const s6e8aa0_gamma_table s6e8aa0_gamma_tables_v32[GAMMA_LEVEL_NUM] =;

static const struct s6e8aa0_variant s6e8aa0_variants[] =;

static void s6e8aa0_brightness_set(struct s6e8aa0 *ctx)
{}

static void s6e8aa0_panel_init(struct s6e8aa0 *ctx)
{}

static void s6e8aa0_set_maximum_return_packet_size(struct s6e8aa0 *ctx,
						   u16 size)
{}

static void s6e8aa0_read_mtp_id(struct s6e8aa0 *ctx)
{}

static void s6e8aa0_set_sequence(struct s6e8aa0 *ctx)
{}

static int s6e8aa0_power_on(struct s6e8aa0 *ctx)
{}

static int s6e8aa0_power_off(struct s6e8aa0 *ctx)
{}

static int s6e8aa0_disable(struct drm_panel *panel)
{}

static int s6e8aa0_unprepare(struct drm_panel *panel)
{}

static int s6e8aa0_prepare(struct drm_panel *panel)
{}

static int s6e8aa0_enable(struct drm_panel *panel)
{}

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

static const struct drm_panel_funcs s6e8aa0_drm_funcs =;

static int s6e8aa0_parse_dt(struct s6e8aa0 *ctx)
{}

static int s6e8aa0_probe(struct mipi_dsi_device *dsi)
{}

static void s6e8aa0_remove(struct mipi_dsi_device *dsi)
{}

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

static struct mipi_dsi_driver s6e8aa0_driver =;
module_mipi_dsi_driver();

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