linux/drivers/gpu/drm/panel/panel-widechips-ws2401.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Panel driver for the WideChips WS2401 480x800 DPI RGB panel, used in
 * the Samsung Mobile Display (SMD) LMS380KF01.
 * Found in the Samsung Galaxy Ace 2 GT-I8160 mobile phone.
 * Linus Walleij <[email protected]>
 * Inspired by code and know-how in the vendor driver by Gareth Phillips.
 */
#include <drm/drm_mipi_dbi.h>
#include <drm/drm_modes.h>
#include <drm/drm_panel.h>

#include <linux/backlight.h>
#include <linux/delay.h>
#include <linux/gpio/consumer.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/media-bus-format.h>
#include <linux/module.h>
#include <linux/regulator/consumer.h>
#include <linux/spi/spi.h>

#include <video/mipi_display.h>

#define WS2401_RESCTL
#define WS2401_PSMPS
#define WS2401_NSMPS
#define WS2401_SMPS
#define WS2401_BCMODE
#define WS2401_WRBLCTL
#define WS2401_WRDISBV
#define WS2401_WRCTRLD
#define WS2401_WRMIE
#define WS2401_READ_ID1
#define WS2401_READ_ID2
#define WS2401_READ_ID3
#define WS2401_GAMMA_R1
#define WS2401_GAMMA_G1
#define WS2401_GAMMA_B1
#define WS2401_GAMMA_R2
#define WS2401_GAMMA_G2
#define WS2401_GAMMA_B2
#define WS2401_PASSWD1
#define WS2401_DISCTL
#define WS2401_PWRCTL
#define WS2401_VCOMCTL
#define WS2401_SRCCTL
#define WS2401_PANELCTL

static const u8 ws2401_dbi_read_commands[] =;

/**
 * struct ws2401 - state container for a panel controlled by the WS2401
 * controller
 */
struct ws2401 {};

static const struct drm_display_mode lms380kf01_480_800_mode =;

static inline struct ws2401 *to_ws2401(struct drm_panel *panel)
{}

static void ws2401_read_mtp_id(struct ws2401 *ws)
{}

static int ws2401_power_on(struct ws2401 *ws)
{}

static int ws2401_power_off(struct ws2401 *ws)
{}

static int ws2401_unprepare(struct drm_panel *panel)
{}

static int ws2401_disable(struct drm_panel *panel)
{}

static int ws2401_prepare(struct drm_panel *panel)
{}

static int ws2401_enable(struct drm_panel *panel)
{}

/**
 * ws2401_get_modes() - return the mode
 * @panel: the panel to get the mode for
 * @connector: reference to the central DRM connector control structure
 */
static int ws2401_get_modes(struct drm_panel *panel,
			    struct drm_connector *connector)
{}

static const struct drm_panel_funcs ws2401_drm_funcs =;

static int ws2401_set_brightness(struct backlight_device *bl)
{}

static const struct backlight_ops ws2401_bl_ops =;

static const struct backlight_properties ws2401_bl_props =;

static int ws2401_probe(struct spi_device *spi)
{}

static void ws2401_remove(struct spi_device *spi)
{}

/*
 * Samsung LMS380KF01 is the one instance of this display controller that we
 * know about, but if more are found, the controller can be parameterized
 * here and used for other configurations.
 */
static const struct of_device_id ws2401_match[] =;
MODULE_DEVICE_TABLE(of, ws2401_match);

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

static struct spi_driver ws2401_driver =;
module_spi_driver();

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