linux/drivers/gpu/drm/panel/panel-sony-acx565akm.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Sony ACX565AKM LCD Panel driver
 *
 * Copyright (C) 2019 Texas Instruments Incorporated
 *
 * Based on the omapdrm-specific panel-sony-acx565akm driver
 *
 * Copyright (C) 2010 Nokia Corporation
 * Author: Imre Deak <[email protected]>
 */

/*
 * TODO (to be addressed with hardware access to test the changes):
 *
 * - Update backlight support to use backlight_update_status() etc.
 * - Use prepare/unprepare for the basic power on/off of the backligt
 */

#include <linux/backlight.h>
#include <linux/delay.h>
#include <linux/gpio/consumer.h>
#include <linux/jiffies.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/sched.h>
#include <linux/spi/spi.h>
#include <video/mipi_display.h>

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

#define CTRL_DISP_BRIGHTNESS_CTRL_ON
#define CTRL_DISP_AMBIENT_LIGHT_CTRL_ON
#define CTRL_DISP_BACKLIGHT_ON
#define CTRL_DISP_AUTO_BRIGHTNESS_ON

#define MIPID_CMD_WRITE_CABC
#define MIPID_CMD_READ_CABC

#define MIPID_VER_LPH8923
#define MIPID_VER_LS041Y3
#define MIPID_VER_L4F00311
#define MIPID_VER_ACX565AKM

struct acx565akm_panel {};

#define to_acx565akm_device(p)

static void acx565akm_transfer(struct acx565akm_panel *lcd, int cmd,
			      const u8 *wbuf, int wlen, u8 *rbuf, int rlen)
{}

static inline void acx565akm_cmd(struct acx565akm_panel *lcd, int cmd)
{}

static inline void acx565akm_write(struct acx565akm_panel *lcd,
			       int reg, const u8 *buf, int len)
{}

static inline void acx565akm_read(struct acx565akm_panel *lcd,
			      int reg, u8 *buf, int len)
{}

/* -----------------------------------------------------------------------------
 * Auto Brightness Control Via sysfs
 */

static unsigned int acx565akm_get_cabc_mode(struct acx565akm_panel *lcd)
{}

static void acx565akm_set_cabc_mode(struct acx565akm_panel *lcd,
				    unsigned int mode)
{}

static unsigned int acx565akm_get_hw_cabc_mode(struct acx565akm_panel *lcd)
{}

static const char * const acx565akm_cabc_modes[] =;

static ssize_t cabc_mode_show(struct device *dev,
			      struct device_attribute *attr,
			      char *buf)
{}

static ssize_t cabc_mode_store(struct device *dev,
			       struct device_attribute *attr,
			       const char *buf, size_t count)
{}

static ssize_t cabc_available_modes_show(struct device *dev,
					 struct device_attribute *attr,
					 char *buf)
{}

static DEVICE_ATTR_RW(cabc_mode);
static DEVICE_ATTR_RO(cabc_available_modes);

static struct attribute *acx565akm_cabc_attrs[] =;

static const struct attribute_group acx565akm_cabc_attr_group =;

/* -----------------------------------------------------------------------------
 * Backlight Device
 */

static int acx565akm_get_actual_brightness(struct acx565akm_panel *lcd)
{}

static void acx565akm_set_brightness(struct acx565akm_panel *lcd, int level)
{}

static int acx565akm_bl_update_status_locked(struct backlight_device *dev)
{}

static int acx565akm_bl_update_status(struct backlight_device *dev)
{}

static int acx565akm_bl_get_intensity(struct backlight_device *dev)
{}

static const struct backlight_ops acx565akm_bl_ops =;

static int acx565akm_backlight_init(struct acx565akm_panel *lcd)
{}

static void acx565akm_backlight_cleanup(struct acx565akm_panel *lcd)
{}

/* -----------------------------------------------------------------------------
 * DRM Bridge Operations
 */

static void acx565akm_set_sleep_mode(struct acx565akm_panel *lcd, int on)
{}

static void acx565akm_set_display_state(struct acx565akm_panel *lcd,
					int enabled)
{}

static int acx565akm_power_on(struct acx565akm_panel *lcd)
{}

static void acx565akm_power_off(struct acx565akm_panel *lcd)
{}

static int acx565akm_disable(struct drm_panel *panel)
{}

static int acx565akm_enable(struct drm_panel *panel)
{}

static const struct drm_display_mode acx565akm_mode =;

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

static const struct drm_panel_funcs acx565akm_funcs =;

/* -----------------------------------------------------------------------------
 * Probe, Detect and Remove
 */

static int acx565akm_detect(struct acx565akm_panel *lcd)
{}

static int acx565akm_probe(struct spi_device *spi)
{}

static void acx565akm_remove(struct spi_device *spi)
{}

static const struct of_device_id acx565akm_of_match[] =;

MODULE_DEVICE_TABLE(of, acx565akm_of_match);

static const struct spi_device_id acx565akm_ids[] =;

MODULE_DEVICE_TABLE(spi, acx565akm_ids);

static struct spi_driver acx565akm_driver =;

module_spi_driver();

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